You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2012/11/02 11:47:13 UTC

[jira] (MASSEMBLY-357) transitive dependencies erroneously excluded from dependencySet in some cases

     [ https://jira.codehaus.org/browse/MASSEMBLY-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MASSEMBLY-357:
--------------------------------------

    Component/s: dependencySet
    
> transitive dependencies erroneously excluded from dependencySet in some cases
> -----------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-357
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-357
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>          Components: dependencySet
>    Affects Versions: 2.2-beta-2
>            Reporter: John Casey
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira