You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Eyroulet (JIRA)" <ji...@codehaus.org> on 2010/09/21 12:36:32 UTC

[jira] Created: (MASSEMBLY-504) Transitive dependencies of a dependency added by a profile aren't taken into account

Transitive dependencies of a dependency added by a profile aren't taken into account
------------------------------------------------------------------------------------

                 Key: MASSEMBLY-504
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-504
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-5
            Reporter: Guillaume Eyroulet
         Attachments: maven-assembly-example.zip

In a reactor, there are 4 modules A, B, C and D.
 * A and B depends on C
 * D depends 
 ** on B
 ** on A due to a profile.

When making an assembly from D
 * including A 
 * excluding B
 * using transitive dependencies

{noformat}
  <formats>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>  
  <dependencySets>
    <dependencySet>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <useTransitiveFiltering>true</useTransitiveFiltering>
      <includes>
        <include>example:a</include>
      </includes>
      <excludes>
      	<exclude>example:b</exclude>
      </excludes>
    </dependencySet>
  </dependencySets>
</assembly>
{noformat}

C isn't in the result directory.

Remark: C is in the result directory if D depends on A normally.

-- 
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

        

[jira] (MASSEMBLY-504) Transitive dependencies missing when two deps rely on them, but one of the deps is excluded

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MASSEMBLY-504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MASSEMBLY-504:
--------------------------------------

    Component/s: dependencySet
    
> Transitive dependencies missing when two deps rely on them, but one of the deps is excluded
> -------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-504
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-504
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>          Components: dependencySet
>    Affects Versions: 2.2-beta-5
>            Reporter: Guillaume Eyroulet
>         Attachments: maven-assembly-example.zip
>
>
> *NOTE:* This will only happen in very specific cases! See comments and linked issue.
> In a reactor, there are 4 modules A, B, C and D.
>  * A and B depends on C
>  * D depends 
>  ** on B
>  ** on A due to a profile.
> When making an assembly from D
>  * including A 
>  * excluding B
>  * using transitive dependencies
> {noformat}
>   <formats>
>     <format>dir</format>
>   </formats>
>   <includeBaseDirectory>false</includeBaseDirectory>  
>   <dependencySets>
>     <dependencySet>
>       <useTransitiveDependencies>true</useTransitiveDependencies>
>       <useTransitiveFiltering>true</useTransitiveFiltering>
>       <includes>
>         <include>example:a</include>
>       </includes>
>       <excludes>
>       	<exclude>example:b</exclude>
>       </excludes>
>     </dependencySet>
>   </dependencySets>
> </assembly>
> {noformat}
> C isn't in the result directory.
> Remark: C is in the result directory if D depends on A normally.

--
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

        

[jira] Commented: (MASSEMBLY-504) Transitive dependencies of a dependency added by a profile aren't taken into account

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MASSEMBLY-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236082#action_236082 ] 

John Casey commented on MASSEMBLY-504:
--------------------------------------

The problem is that the excluded dependency - example:b - is included in the dependency trail of example:c, NOT example:a. This means that when you exclude example:b and useTransitiveFiltering, example:c is excluded.

It's a weakness of Maven's artifact-resolution design that the dependency trail is only a List, not a graph. If it were a graph, it might be possible to see that BOTH example:a and example:b are in the "dependency trail" for example:c.

Until this is fixed, it would mean reinventing artifact resolution solely for the assembly plugin to fix this issue.

> Transitive dependencies of a dependency added by a profile aren't taken into account
> ------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-504
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-504
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>            Reporter: Guillaume Eyroulet
>         Attachments: maven-assembly-example.zip
>
>
> In a reactor, there are 4 modules A, B, C and D.
>  * A and B depends on C
>  * D depends 
>  ** on B
>  ** on A due to a profile.
> When making an assembly from D
>  * including A 
>  * excluding B
>  * using transitive dependencies
> {noformat}
>   <formats>
>     <format>dir</format>
>   </formats>
>   <includeBaseDirectory>false</includeBaseDirectory>  
>   <dependencySets>
>     <dependencySet>
>       <useTransitiveDependencies>true</useTransitiveDependencies>
>       <useTransitiveFiltering>true</useTransitiveFiltering>
>       <includes>
>         <include>example:a</include>
>       </includes>
>       <excludes>
>       	<exclude>example:b</exclude>
>       </excludes>
>     </dependencySet>
>   </dependencySets>
> </assembly>
> {noformat}
> C isn't in the result directory.
> Remark: C is in the result directory if D depends on A normally.

-- 
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

        

[jira] Updated: (MASSEMBLY-504) Transitive dependencies missing when two deps rely on them, but one of the deps is excluded

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MASSEMBLY-504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MASSEMBLY-504:
---------------------------------

    Description: 
*NOTE:* This will only happen in very specific cases! See comments and linked issue.

In a reactor, there are 4 modules A, B, C and D.
 * A and B depends on C
 * D depends 
 ** on B
 ** on A due to a profile.

When making an assembly from D
 * including A 
 * excluding B
 * using transitive dependencies

{noformat}
  <formats>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>  
  <dependencySets>
    <dependencySet>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <useTransitiveFiltering>true</useTransitiveFiltering>
      <includes>
        <include>example:a</include>
      </includes>
      <excludes>
      	<exclude>example:b</exclude>
      </excludes>
    </dependencySet>
  </dependencySets>
</assembly>
{noformat}

C isn't in the result directory.

Remark: C is in the result directory if D depends on A normally.

  was:
In a reactor, there are 4 modules A, B, C and D.
 * A and B depends on C
 * D depends 
 ** on B
 ** on A due to a profile.

When making an assembly from D
 * including A 
 * excluding B
 * using transitive dependencies

{noformat}
  <formats>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>  
  <dependencySets>
    <dependencySet>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <useTransitiveFiltering>true</useTransitiveFiltering>
      <includes>
        <include>example:a</include>
      </includes>
      <excludes>
      	<exclude>example:b</exclude>
      </excludes>
    </dependencySet>
  </dependencySets>
</assembly>
{noformat}

C isn't in the result directory.

Remark: C is in the result directory if D depends on A normally.

        Summary: Transitive dependencies missing when two deps rely on them, but one of the deps is excluded  (was: Transitive dependencies of a dependency added by a profile aren't taken into account)

> Transitive dependencies missing when two deps rely on them, but one of the deps is excluded
> -------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-504
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-504
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>            Reporter: Guillaume Eyroulet
>         Attachments: maven-assembly-example.zip
>
>
> *NOTE:* This will only happen in very specific cases! See comments and linked issue.
> In a reactor, there are 4 modules A, B, C and D.
>  * A and B depends on C
>  * D depends 
>  ** on B
>  ** on A due to a profile.
> When making an assembly from D
>  * including A 
>  * excluding B
>  * using transitive dependencies
> {noformat}
>   <formats>
>     <format>dir</format>
>   </formats>
>   <includeBaseDirectory>false</includeBaseDirectory>  
>   <dependencySets>
>     <dependencySet>
>       <useTransitiveDependencies>true</useTransitiveDependencies>
>       <useTransitiveFiltering>true</useTransitiveFiltering>
>       <includes>
>         <include>example:a</include>
>       </includes>
>       <excludes>
>       	<exclude>example:b</exclude>
>       </excludes>
>     </dependencySet>
>   </dependencySets>
> </assembly>
> {noformat}
> C isn't in the result directory.
> Remark: C is in the result directory if D depends on A normally.

-- 
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