I am working on multi-module Java EE web application project(maven project) which have 23 modules. It have main 4 modules which can be used separately and other modules are supported back end module for those 4 modules.
When the project is built, it takes 4-15 minutes to finish the build process because all the modules are built along with the build process.
I am aware of maven up to some level also. Please someone help me to overcome these problems.
You can use and select those projects you would like to build via '--projects' like the following. Just let us imaging you have three modules like this:
root (pom.xml)
+--- m1 (pom.xml)
+--- m2 (pom.xml)
+--- m3 (pom.xml)
furthermore m3 depends on m2 and m1. So if you like to build only m3 if no other module has changed you can use:
mvn -pl m3
(Please call from root location). with that maven build m3 module and will get the other dependencies from the local repository if not found there from your remote repository (repository manager). If wan't to be sure to work just with your current state you have to do a mvn install
once before and afterwards you can reuses the other modules from the local repository.
There are other options available like the following:
-am,--also-make If project list is specified, also
build projects required by the
list
-amd,--also-make-dependents If project list is specified, also
build projects that depend on
projects on the list
which can be given as supplemental arguments to build those modules.
I have my doubts that in IntelliJ there are just buttons/keystrokes which are configured in the way to use that from within IntelliJ directly. But you can configure the calls of Maven from within IntelliJ...