title: Maven Assembly Plugin is executed on child projects
body: <p>I have the following problem. I have a multimodule project. I want to run maven-assembly plugin on the toplevel pom that is also a parent pom for its modules. I want the plugin to be executed only on the top level pom. Currently it tries to execute also on all the submodules. I do not want this as I just need to grab all the sources from all the modules and submodules in one place (toplevel target directory.) </p>
  
  <p>Here is my descriptor:</p>
  
  <pre><code>&lt;assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"&gt;
  &lt;id&gt;src&lt;/id&gt;
  &lt;formats&gt;
      &lt;format&gt;zip&lt;/format&gt;
  &lt;/formats&gt;
  &lt;moduleSets&gt;
      &lt;moduleSet&gt;
          &lt;includeSubModules&gt;true&lt;/includeSubModules&gt;
          &lt;sources&gt;
              &lt;useDefaultExcludes&gt;true&lt;/useDefaultExcludes&gt;
              &lt;includeModuleDirectory&gt;false&lt;/includeModuleDirectory&gt;
              &lt;fileSets&gt;
                  &lt;fileSet&gt;
                      &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
                      &lt;useDefaultExcludes&gt;true&lt;/useDefaultExcludes&gt;
                      &lt;includes&gt;
                          &lt;include&gt;src/main/**&lt;/include&gt;
                          &lt;include&gt;src/test/**&lt;/include&gt;
                          &lt;include&gt;target/classes/**&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/fileSet&gt;
              &lt;/fileSets&gt;
          &lt;/sources&gt;
      &lt;/moduleSet&gt;
  &lt;/moduleSets&gt;
  </code></pre>
  
  <p></p>
  
  <p>The pom file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project
        xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
        &gt;
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
      &lt;groupId&gt;myid&lt;/groupId&gt;
      &lt;artifactId&gt;myartid&lt;/artifactId&gt;
      &lt;version&gt;1.1&lt;/version&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;myid2&lt;/groupId&gt;
  &lt;artifactId&gt;TopLevelBuild&lt;/artifactId&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;version&gt;5.5-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;Some Application&lt;/name&gt;
  &lt;modules&gt;
      &lt;module&gt;1&lt;/module&gt;
      &lt;module&gt;2&lt;/module&gt;
      &lt;module&gt;3&lt;/module&gt;
      &lt;module&gt;4&lt;/module&gt;
      &lt;module&gt;5&lt;/module&gt;
      &lt;module&gt;6&lt;/module&gt;
  &lt;/modules&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit-dep&lt;/artifactId&gt;
          &lt;version&gt;4.8.2&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Parent pom just contains some dependencies that I want to be inheritaed in all modules. Submodules have the current pom as parent. 
  Now if I run : </p>
  
  <blockquote>
    <p>mvn assembly:single -Ddescriptor=somedes.xml </p>
  </blockquote>
  
  <p>it runs ok on the toplevel pom and collect all the sources that I need. But it does not stop and start to execute this goal on all the subprojects, and of course there is no descriptor defined for the. How can I force the execution only on the toplevel pom?</p>
  
  <pre><code>...
  [INFO] Processing sources for module project: LAST MODULE
  [INFO] Building zip: ..../target/TopLevelBuild-5.5-SNAPSHOT-src.zip
  [INFO] ------------------------------------------------------------------------
  [INFO] Building deploy
  [INFO]    task-segment: [assembly:single]
  [INFO] ------------------------------------------------------------------------
  [INFO] [assembly:single {execution: default-cli}]
  [INFO] Processing sources for module project: module1-submodule1:jar:5.5-SNAPSHOT
  [INFO] Processing sources for module project: module1-submodule1:jar:5.5-SNAPSHOT
  [INFO] Building zip: .../module1/target/module1-5.5-SNAPSHOT-src.zip
  [INFO] ------------------------------------------------------------------------
  [INFO] Building module1
  [INFO]    task-segment: [assembly:single]
  [INFO] ------------------------------------------------------------------------
  [INFO] [assembly:single {execution: default-cli}]
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] Failed to create assembly: Error creating assembly archive src: You must set at least one file.
  </code></pre>
  
  <p>I have tried to add:</p>
  
  <blockquote>
    <p>-Dexecution.inherited=false </p>
  </blockquote>
  
  <p>but it doesn't help.Adding </p>
  
  <blockquote>
    <p>-Dassembly.ignoreMissingDescriptor=true </p>
  </blockquote>
  
  <p>also didn't help. Any ideas?</p>