Maven 2 & 3

[regression] Excluding relocated transitive dependencies does not work

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 2.1.0-M1
  • Fix Version/s: 2.0.10, 2.1.0
  • Component/s: Dependencies
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    4

Description

I'm trying to exclude transitive dependencies of a dependency. This works fine with 2.0.9, however it does not work with 2.1.0-M1.

Run mvn dependency:tree on the attached pom.xml with 2.0.9 and note how there is no javax.activation in the tree. Re-run with 2.1.0-M1 and note how javax.activation shows up in the dependencies tree.

Activity

Hide
luke w patterson added a comment -

With the pom.xml from attachment 1, I captured some info that might be useful for anyone debugging this.

See MNG-3769-debugging-info.zip

step 0:

created empty local repo directory /2.0.9-repo
created empty local repo directory /2.1.0-M1-repo

step 1: using maven 2.0.9 pointing to /2.0.9-repo, ran org.apache.maven.plugins:maven-dependency-plugin:2.0:tree, goal completed
console capture is in step1-2.0.9-tree.txt
content listing of /2.0.9-repo is in step1-2.0.9-repo-contents.txt

step 2: using maven 2.1.0-M1 pointing to /2.1.0-M1-repo, ran org.apache.maven.plugins:maven-dependency-plugin:2.0:tree, goal completed
console capture is in step2-2.1.0-M1-tree.txt
content listing of /2.1.0-M1-repo is in step2-2.1.0-M1-repo-contents.txt

step 3: using maven 2.1.0-M1 pointing to /2.0.9-repo, ran org.apache.maven.plugins:maven-dependency-plugin:2.0:tree, goal failed
console capture is in step3-2.1.0-M1-tree.txt
content listing of /2.0.9-repo is in step3-2.0.9-repo-contents.txt

Show
luke w patterson added a comment - With the pom.xml from attachment 1, I captured some info that might be useful for anyone debugging this. See MNG-3769-debugging-info.zip step 0: created empty local repo directory /2.0.9-repo created empty local repo directory /2.1.0-M1-repo step 1: using maven 2.0.9 pointing to /2.0.9-repo, ran org.apache.maven.plugins:maven-dependency-plugin:2.0:tree, goal completed console capture is in step1-2.0.9-tree.txt content listing of /2.0.9-repo is in step1-2.0.9-repo-contents.txt step 2: using maven 2.1.0-M1 pointing to /2.1.0-M1-repo, ran org.apache.maven.plugins:maven-dependency-plugin:2.0:tree, goal completed console capture is in step2-2.1.0-M1-tree.txt content listing of /2.1.0-M1-repo is in step2-2.1.0-M1-repo-contents.txt step 3: using maven 2.1.0-M1 pointing to /2.0.9-repo, ran org.apache.maven.plugins:maven-dependency-plugin:2.0:tree, goal failed console capture is in step3-2.1.0-M1-tree.txt content listing of /2.0.9-repo is in step3-2.0.9-repo-contents.txt
Hide
luke w patterson added a comment -

Oops, last attachment didn't have debugging turned on during dependency:tree. This attachment does.

Show
luke w patterson added a comment - Oops, last attachment didn't have debugging turned on during dependency:tree. This attachment does.
Hide
Brett Porter added a comment -

this may be due to http://jira.codehaus.org/browse/MNG-3380

It occurs because of the relocation. saaj-api actually depends on activation:activation which will properly be excluded.

Show
Brett Porter added a comment - this may be due to http://jira.codehaus.org/browse/MNG-3380 It occurs because of the relocation. saaj-api actually depends on activation:activation which will properly be excluded.
Hide
Brett Porter added a comment -

added integration test to the suite for verification

Show
Brett Porter added a comment - added integration test to the suite for verification
Hide
Brett Porter added a comment -

confirmed that reverting MNG-3380 fixes this (r675087, r675353). Will continue investigation later.

Show
Brett Porter added a comment - confirmed that reverting MNG-3380 fixes this (r675087, r675353). Will continue investigation later.
Hide
Benjamin Bentmann added a comment -

There is apparently some non-determinism in this resolution game. First, the IT added by Brett fails for me even with Maven 2.0.9. Second, I never observe javax.activation for the POM attached by Dirk with any combination of Maven 2.0.9/2.1.0-M1 and Java 1.4/1.6. See my attached logs.

Show
Benjamin Bentmann added a comment - There is apparently some non-determinism in this resolution game. First, the IT added by Brett fails for me even with Maven 2.0.9. Second, I never observe javax.activation for the POM attached by Dirk with any combination of Maven 2.0.9/2.1.0-M1 and Java 1.4/1.6. See my attached logs.
Hide
Benjamin Bentmann added a comment -

OK, I have traced down my inability to reproduce the reported issue to inconsistent POMs in my local repo. It appears the two Maven versions have different preferences with regard to the remote repo being consulted:
a) central: http://repo1.maven.org/maven2/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.pom
b) java.net: http://download.java.net/maven/1/javax.xml.soap/poms/saaj-api-1.3.pom
Note the different dependency sections in these POMs. It requires the POM from central to reproduce the issue.

Show
Benjamin Bentmann added a comment - OK, I have traced down my inability to reproduce the reported issue to inconsistent POMs in my local repo. It appears the two Maven versions have different preferences with regard to the remote repo being consulted: a) central: http://repo1.maven.org/maven2/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.pom b) java.net: http://download.java.net/maven/1/javax.xml.soap/poms/saaj-api-1.3.pom Note the different dependency sections in these POMs. It requires the POM from central to reproduce the issue.
Hide
John Casey added a comment -

fixed in r736543. I'm merging into 2.1.x branch now. Not sure whether this still applies in 3.0.x, though.

Jason, can you comment?

Show
John Casey added a comment - fixed in r736543. I'm merging into 2.1.x branch now. Not sure whether this still applies in 3.0.x, though. Jason, can you comment?

People

Vote (5)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: