For those that may be trying to work out how excludes works I'm
posting to the list.

There is probably a JIRA issue (I haven't looked) that will address
pattern matching of excludes, there are comments in the code to
indicate that this would be a good feature.

To summarize my problem:
I have a module called <project>-build which creates an assembly of
all the other modules so that this can be given to our test team in
one go.  The problem I am having is that the assembly is not only
copying the *-bin.zip files but also the *.jar files even though the
dependency is only on the zip file.

My pom has this in it:
   <dependencies>
       <dependency>
           <groupId>GROUP</groupId>
           <artifactId>A</artifactId>
           <version>0.0.1-SNAPSHOT</version>
           <classifier>bin</classifier>
           <type>zip</type>
       </dependency>
       <dependency>
           <groupId>GROUP</groupId>
           <artifactId>B</artifactId>
           <version>0.0.1-SNAPSHOT</version>
           <classifier>bin</classifier>
           <type>zip</type>
       </dependency>
       <dependency>
           <groupId>GROUP</groupId>
           <artifactId>C</artifactId>
           <version>0.0.1-SNAPSHOT</version>
           <type>ear</type>
       </dependency>
   </dependencies>

To work around this, I am excluding the jars using the assembly below:

<assembly>
   <id>bin</id>
   <formats>
       <format>dir</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
   <dependencySets>
       <dependencySet>
           <unpack>false</unpack>
       <excludes>
         <!--
         There is little documentation on this format.
         It is of the form of DefaultArtifact.getDependencyConflictId()
         which is <groupId>:<artifactId>:<type>:<classifier>
         or you can use the short form (hard coded into assembly) of
         <groupId>:<artifactId>
         This is a String equality match not a pattern match.
         -->
         <exclude>commons-lang:commons-lang</exclude>
         <exclude>log4j:log4j</exclude>
         <exclude>GROUP:A</exclude>
         <exclude>GROUP:B</exclude>
       </dependencySet>
   </dependencySets>      
</assembly>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to