transitive dependencies left out of dependencySet in some cases in spite of 
transitive filtering
------------------------------------------------------------------------------------------------

                 Key: MASSEMBLY-357
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-357
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-2
            Reporter: John Casey
             Fix For: 2.2


Given the following dependencies in a POM:

{code:xml}
<dependency>
  <groupId>commons-codec</groupId>
  <artifactId>commons-codec</artifactId>
  <version>1.3</version>
</dependency>
<dependency>
  <groupId>commons-httpclient</groupId>
  <artifactId>commons-httpclient</artifactId>
  <version>3.1</version>
</dependency>
{code}

..and the following assembly descriptor snippet:

{code:xml}
    <dependencySet>
      <includes>
        <include>commons-codec*</include>
      </includes>
      <outputDirectory>codec</outputDirectory>
      <unpack>false</unpack>
      <useTransitiveDependencies>true</useTransitiveDependencies>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>commons-httpclient*</include>
      </includes>
      <outputDirectory>httpclient</outputDirectory>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <useTransitiveFiltering>true</useTransitiveFiltering>
      <unpack>false</unpack>
    </dependencySet>
{code}

commons-codec *should* wind up in both the codec and httpclient dirs, but it's 
only in the codec dir. The reason for this is found in the maven-artifact code 
used to resolve dependencies. Since commons-codec is present as a direct 
dependency, it's *removed* from the sub-tree rooted by commons-httpclient, and 
its dependency trail doesn't contain even a whisper of this sub-tree structure. 
Since the transitive inclusions in dependencySets are calculated using artifact 
identifications (dependencyConflictId and id itself), along with the dependency 
trail it contains, the assembly plugin can't see the association between 
commons-httpclient and commons-codec, resulting in incomplete filtering for the 
dependencySet.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to