title: strange error with maven dependency copy
body: <p>I'm trying to setup my maven build to copy all the build artifacts and other generated files to a central directory for distribution.  After reading docs, the assembly plugin and the dependency plugin seem to be the ones to use.  but I cant get them to play well together.</p>
  
  <p>first - If I follow the directions <a href="http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html" rel="nofollow">here</a> and add this to my top level pom:</p>
  
  <pre><code>&lt;plugin&gt;  
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;  
    &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;  
    &lt;executions&gt;  
      &lt;execution&gt;  
        &lt;id&gt;copy-installed&lt;/id&gt;  
        &lt;phase&gt;install&lt;/phase&gt;  
        &lt;goals&gt;  
          &lt;goal&gt;copy&lt;/goal&gt;  
        &lt;/goals&gt;  
        &lt;configuration&gt;  
          &lt;artifactItems&gt;  
            &lt;artifactItem&gt;  
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;  
              &lt;artifactId&gt;${project.artifactId}&lt;/artifactId&gt;  
              &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;type&gt;${project.packaging}&lt;/type&gt;
            &lt;/artifactItem&gt;
          &lt;/artifactItems&gt;
          &lt;outputDirectory&gt;${ReleaseFolder}&lt;/outputDirectory&gt;
        &lt;/configuration&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>all seems fine until I run a clean followed by an install - then maven complains it cant find my top level pom to install.  which seems counter-intuitive... i wont want the "pom" files to be copied, i want the module artifacts.  How do I exclude them?</p>
  
  <p>And related to this - is there a way to add custom types or tags of some kind to projects so i can have the dependancy copy work one way on one type of sub-project and a diferent way on another type?</p>
  
  <p>new to maven -- so please be gentle.</p>
  
  <p><code>edit:</code>
  My project structure looks something like so:</p>
  
  <pre><code>/pom.xml (top level pom)
  Common_data
  ComponentA
  ComponentB
  ComponentC
  ComponentT (depends on A, B and C)
  J2ee_A
      j2ee_A_ear (depends on war)
      j2ee_A_rar
      j2ee_A_war
  
  J2ee_B 
      j2ee_B_ear (depends on war)
      j2ee_B_rar
      j2ee_B_war
      j2ee_B_jar (depends on ComponentB)
  </code></pre>
  
  <p>and then ${ReleaseFolder} points to /Release at the same level as the top level pom.</p>
  
  <p><strong>Follow-up:</strong> So what im hearing is dependency:copy is not the route to go, but using an assembly is.</p>
  
  <p>How do I get an assembly to operate on many different modules and then copy the resulting files to a <strong>single</strong> output directory?</p>
  
  <p>To add to things - there are 2 general types of components, a jar component (makes a single jar file), and a j2ee component which produces, ear, war, jar, rar and config files.</p>
  
  <p>If there was a way to assign my own tags to a project and then run an assembly based on that tag value, I can see that working.  But I havent found anything in the documentation on how to trigger or skip an assembly based on user defined properties in a sub-project.</p>
  
  <p>Ideas anyone?</p>