Question

I have a project with a parent POM and three child projects with.I want to execute the goal assembly:assembly only on one child POM. I already read the following post, but I didn't get it to work with the maven assembly plugin.

Execute Maven plugin goal on child modules, but not on parent

If I run

mvn -DskipTests=true assembly:assembly

I get the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project inhouse: Error reading assemblies: No assembly descriptors found. -> [Help 1]

It seems that it always parses the plugin configuration and looks for the assembly descriptor, even then, if I do not put the plugin into the parent POM at all. Has anyone a solution for the assembly plugin?

Was it helpful?

Solution 3

You can configure in the aggregation pom.xml the assembly plugin to skip execution.

In <build><plugins> section

<configuration><skip>true</skip></configuration>

OTHER TIPS

the rigth option is : <skipAssembly>true</skipAssembly> in order to skip the parent project.

you can define in parent pom properties

<assembly.skipAssembly>true</assembly.skipAssembly>

and overwritte this property in your module pom properties

<assembly.skipAssembly>false</assembly.skipAssembly>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top