Muti-modules project with assembly in sub modules have build problem

A parent pom have several modules and each module use assembly to build different distribution jars.

 

Issue:

Building going back to already built modules and recursive

 

Cause:

One module use assembly as the goal in assembly plugin, this will force maven to build all poms.

 

Reference:

http://maven.apache.org/plugins/maven-assembly-plugin/attached-mojo.html

assembly:attached

Full name:

org.apache.maven.plugins:maven-assembly-plugin:2.4:attached

This plugin goal has been deprecated:

Use assembly:single instead! The assembly:attached mojo leads to non-standard builds.

Description:

Assemble an application bundle or distribution from an assembly descriptor, WITHOUT first forcing Maven to build all POMs to the package phase (as is required by the assembly:assembly goal).
NOTE: This goal should ONLY be run from the command line, and if building a multimodule project it should be used from the root POM. Use the assembly:single goal for binding your assembly to the lifecycle.

你可能感兴趣的:(assembly)