title: Maven Assembly plugin parent descriptor sharing
body: <p>I have a project, with a parent module. Parent and child both using maven-assembly-plugin. </p>
  
  <p>Parent uses it's own descriptor (zip.xml):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"&gt;
      &lt;id&gt;bin&lt;/id&gt;
      &lt;includeBaseDirectory&gt;false&lt;/includeBaseDirectory&gt;
      &lt;formats&gt;
          &lt;format&gt;zip&lt;/format&gt;
      &lt;/formats&gt;
      &lt;fileSets&gt;
          &lt;fileSet&gt;
              &lt;directory&gt;${svn.scripts}&lt;/directory&gt;
              &lt;includes&gt;
                  &lt;include&gt;query.*&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/fileSet&gt;
          &lt;fileSet&gt;
              &lt;directory&gt;${cfgreader.dist}&lt;/directory&gt;
              &lt;includes&gt;
                  &lt;include&gt;*.jar&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/fileSet&gt;
      &lt;/fileSets&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>this way:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;descriptor&gt;${basedir}/descriptors/zip.xml&lt;/descriptor&gt;
                  &lt;finalName&gt;${patch.prefix}_rev&lt;/finalName&gt;
                  &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;make-assembly&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;single&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>while my child's module pom.xml has:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;archive&gt;
                  &lt;manifest&gt;
                      &lt;mainClass&gt;com.test.cfgReader&lt;/mainClass&gt;
                  &lt;/manifest&gt;
              &lt;/archive&gt;
              &lt;descriptorRefs&gt;
                  &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
              &lt;/descriptorRefs&gt;
              &lt;finalName&gt;cfgreader&lt;/finalName&gt;
              &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;id&gt;make-assembly&lt;/id&gt;
                  &lt;phase&gt;package&lt;/phase&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;single&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>The problem is that the child module tries to use zip.xml descriptor and it causes errors:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.
  2-beta-5:single (make-assembly) on project dist: Error reading assemblies: Error
   locating assembly descriptor: D:\dist/descriptors/zip.xml
  [ERROR]
  [ERROR] [1] [INFO] Searching for file location: D:\dist\D\dist\D:\dist\descriptors\zip.xml
  [ERROR]
  [ERROR] [2] [INFO] File: D:\\dist\D:\\dist\descriptors\zip.xml does not exist.
  [ERROR]
  [ERROR] [3] [INFO] Invalid artifact specification: 'D:\\dist\D:\\dist\descriptors\zip.xml'. Must contain at le
  ast three fields, separated by ':'.
  [ERROR]
  [ERROR] [4] [INFO] Failed to resolve classpath resource: assemblies/D:\dist/descriptors/zip.xml from
   classloader: ClassRealm[plugin&gt;org.apache.maven.plugins:maven-assembly-plugin:2
  .2-beta-5, parent: sun.misc.Launcher$AppClassLoader@33d626a4]
  [ERROR]
  [ERROR] [5] [INFO] Failed to resolve classpath resource: D:\dist/descriptors/zip.xml from classloade
  r: ClassRealm[plugin&gt;org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5,
  parent: sun.misc.Launcher$AppClassLoader@33d626a4]
  [ERROR]
  [ERROR] [6] [INFO] File: D:\D\descriptors\zip.xml does not exist.
  [ERROR]
  [ERROR] [7] [INFO] Building URL from location: D:\dist/descriptors/zip.xml
  [ERROR] Error:
  [ERROR] java.net.MalformedURLException: unknown protocol: d
  [ERROR] at java.net.URL.&lt;init&gt;(URL.java:592)
  [ERROR] at java.net.URL.&lt;init&gt;(URL.java:482)
  [ERROR] at java.net.URL.&lt;init&gt;(URL.java:431)
  [ERROR] at org.apache.maven.shared.io.location.URLLocatorStrategy.resolve(URLLoc
  atorStrategy.java:54)
  </code></pre>
  
  <p>....
  and if i delete <code>maven-assembly-plugin</code> from parent <code>pom.xml</code> everything is fine, if i add again, parent task works fine, while child - fails. how to disable descriptor propagation to childs?</p>