4

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?

Community
  • 1
  • 1
markus
  • 6,258
  • 13
  • 41
  • 68
  • FYI, `assembly:assembly` is [deprecated](http://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html). Use `assembly:single` instead. Also, the latest assembly plugin is version 2.4, sometimes a version upgrade contains bug fixes that might help. – user944849 Oct 07 '13 at 13:23

3 Answers3

11

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

mohamedf
  • 111
  • 1
  • 4
2

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>
Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
danipenaperez
  • 583
  • 5
  • 12
-5

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

In <build><plugins> section

<configuration><skip>true</skip></configuration>
ssedano
  • 8,322
  • 9
  • 60
  • 98
  • I have this in my parent POM, but I still get the error "No assembly descriptors found.": maven-assembly-plugin true assembly package – markus Oct 07 '13 at 12:40
  • Where does the assembly file exist? If you are referencing it using property substitution it might be in the wrong location. If you post the structure of your multi-module project and the location of the assembly I can probably figure it out for you. – ngreen Jan 06 '14 at 17:32
  • 1
    **The good answer is [this one](http://stackoverflow.com/a/24214396/1667004)** `true` ** – ppeterka Mar 13 '17 at 14:31