I have a Maven pom that uses . But actually, I don\'t want build the war-file, I just want all the dependent jars collect
I would like to upgrade onto @Michael Wyraz answer and just include install skip settings in case if someone executes mvn clean install build on top level of multimodule project and one of sub-module is web application.
This stands inside war module:
war_explode
org.apache.maven.plugins
maven-war-plugin
2.6
default-war
none
war-exploded
package
exploded
org.apache.maven.plugins
maven-install-plugin
default-install
none
Without install skip build fails as it tries to install war into .m2 folder. Error message looks like this:
[INFO] --- maven-install-plugin:2.4:install (default-install) @ *** ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project ***: The packaging for this project did not assign a file to the build artifact -> [Help 1]
Executing mvn clean install -P war_explode with this settings (enclosed in maven profile named war_explode) it finishes build without error.