Is there a way to selectively specify which modules to install while building a complete reactor project?
In essence I would like to package the complete reactor content but only install a few.
Is there a way to selectively specify which modules to install while building a complete reactor project?
In essence I would like to package the complete reactor content but only install a few.
No; a single invocation of Maven will use the same phases for all modules.
You could chain invocations; for example:
mvn package && mvn -pl web-app install
But then the dependencies of web-app
would be taken from your local repository and not from the reactor used in the first invocation.
The safest option would be (as in Maven Modules + Building a Single Specific Module) to use -am
and -pl
to install only a specific module along with all its dependencies:
mvn -pl web-app -am install
Note that this will still install other modules, but only those necessary to build web-app
.
There are many option that allow you to manage a modulare project in maven.
To Resume Build
Example mvn --resume-from yourmodule install
Specifying a Subset of Projects
Example mvn --projects yourmodule1,yourmodule2 install
Making a Subset of Projects
Example mvn --projects sample-services --also-make install
You can find more detail on Maven: The complete references