I've been working in the .NET environment for the past 2 1/2 years and through change of employer have now made the transition back to the Java world. In the past I worked on only small Java EE projects which I could set up to build, deploy on my Wildfly server and start in the browser in a smooth and swift manner. However, the current project I am working on consists of about 10 submodules that need to be build and deployed to Wildfly. We are using Maven for the build process and the problem I have is to figure out how I could set up my local dev environment so that I can have build + deploy after code changes in a timely manner. The web-part of the app is built using GWT which is a new technology for me. The build normally takes ~5-10 minutes, which is way too long to be able to just make some code changes and deploy a new version to debug it when fixing an error. So I have two problems right now:
a) I wasn't able so far to run the code on wildfly and hook the debugger into the run to be able to work with breakpoints and inspect some data flow and logic. What is a good practice when it comes to debugging multi-module applications in IntelliJ? Do you start Wildfly with the --debug parameter and use the functionality under Run -> Attach to process?
b) In order to build the source, I have to process 2 different pom.xml files and then copy a .war file to wildfly. These are the commands that I was given to build the app:
mvn clean install -PmyConnectionName -f=focus/pom.xml
cd focus/apps/focus-web/focus-dev
mvn package -PmyConnectionName -Dgwt.skipCompilation=true -DwebappDirectory=$wildFlyDirectory/standalone/deployments/focus.war
mvn gwt:devmode -PmyConnectionName -Dgwt.skipCompilation=true -DwebappDirectory=$wildFlyDirectory/standalone/deployments/focus.war
In the build configuration I tried to set up a Wildfly server and in that menue there is this section where I can Run Maven Goals. Would that be the right way to go here? And to speed up the build process in case of minor changes that I want to test, is there a way to compile only the modules / classes that have been modified?
