Re: Transitive dependency omitted if prior dependency resolved first then subsquently omitted

2009-12-22 Thread egroesbeck

Sorry I neglected to include both versions of projectD.  File updated.

http://old.nabble.com/file/p26889403/omitted_dependency_example.zip
omitted_dependency_example.zip 


Anders Hammar wrote:
> 
> I tried your example, but it doesn't work. It's complaining about
> test.projects:projectD:jar:1.0.0-SNAPSHOT missing.
> 
> /Anders
> 
> On Thu, Dec 17, 2009 at 20:23, egroesbeck  wrote:
> 
>>
>> No problem:
>>
>> http://old.nabble.com/file/p26833532/omitted_dependency_example.zip
>> omitted_dependency_example.zip
>>
>>
>>
>> Wayne Fay wrote:
>> >
>> >> eventually omitted.  The fact that I can change the dependency order
>> in
>> >> artifact A and get a different list of resolved artifacts leads me to
>> >> believe this is more likely to be a defect but I wanted to be sure I
>> >
>> > If you can build a (small) sample project that demonstrates the issue
>> > very clearly, then someone can more easily look at it and potentially
>> > resolve it, if it is in fact a bug.
>> >
>> > Wayne
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: users-h...@maven.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Transitive-dependency-omitted-if-prior-dependency-resolved-first-then-subsquently-omitted-tp26818594p26833532.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Transitive-dependency-omitted-if-prior-dependency-resolved-first-then-subsquently-omitted-tp26818594p26889403.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Transitive dependency omitted if prior dependency resolved first then subsquently omitted

2009-12-17 Thread egroesbeck

No problem:

http://old.nabble.com/file/p26833532/omitted_dependency_example.zip
omitted_dependency_example.zip 



Wayne Fay wrote:
> 
>> eventually omitted.  The fact that I can change the dependency order in
>> artifact A and get a different list of resolved artifacts leads me to
>> believe this is more likely to be a defect but I wanted to be sure I
> 
> If you can build a (small) sample project that demonstrates the issue
> very clearly, then someone can more easily look at it and potentially
> resolve it, if it is in fact a bug.
> 
> Wayne
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Transitive-dependency-omitted-if-prior-dependency-resolved-first-then-subsquently-omitted-tp26818594p26833532.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Transitive dependency omitted if prior dependency resolved first then subsquently omitted

2009-12-17 Thread egroesbeck

In the situation I outlined the transitive dependency should truly be
transitive, not direct.  However the transitive dependency is picked up
twice yet omitted because the first artifact where it is detected is
eventually omitted.  The fact that I can change the dependency order in
artifact A and get a different list of resolved artifacts leads me to
believe this is more likely to be a defect but I wanted to be sure I
understood the dependency resolution algorithm correctly first.  

dependency:analyze would flag artifact D as unused.  My understanding is the
the dependency to artifact E via artifact B should bring resolution to
artifact D.


Anders Hammar wrote:
> 
> I don't understand. Are you saying you have a dependency on a transitive
> dependency? That's wrong! You should declare all your dependencies as
> dependencies; you shouldn't rely on transitive dependencies.
> 
> Try
> mvn dependency:analyze
> and fix missing dependencies!
> 
> /Anders
> 
> On Wed, Dec 16, 2009 at 22:14, egroesbeck  wrote:
> 
>>
>> Problem: a transitive dependency is found in a graph multiple times but
>> the
>> first artifact that depends on it is omitted for a higher version which
>> no
>> longer has the transitive dependency.  This causes the final artifact
>> list
>> to no longer include the transitive dependency even it other dependencies
>> depend on it.
>>
>> I've included the graph and results of dependency:tree as reference.
>> Changing the dependency order in project A to depend on E then C resolves
>> the issue as well as managing C to 2.0.0 (the version that eventually is
>> resolved).  However as the graph grows larger this becomes burdensome.  I
>> didn't find this situation described in the dependency mechanism
>> documentation and managing all the dependencies to match the declared
>> versions felt like overkill.  Is this behavior correct?
>>
>> Tested with Maven versions: 2.0.10, 2.2.1, 3.0-alpha-5
>>
>> Dependency graph:
>> A->B->C-1.0.0-SNAPSHOT->D
>> A->C-2.0.0-SNAPSHOT
>> B->E->D
>>
>> Result of dependency:tree -Dverbose:
>> [INFO] test.projects:projectA:jar:2.0.0-SNAPSHOT
>> [INFO] +- test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
>> [INFO] |  +- (test.projects:projectC:jar:1.0.0-SNAPSHOT:compile - omitted
>> for conflict with 2.0.0-SNAPSHOT)
>> [INFO] |  \- test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
>> [INFO] | \- (test.projects:projectD:jar:1.0.0-SNAPSHOT:compile -
>> omitted
>> for duplicate)
>> [INFO] \- test.projects:projectC:jar:2.0.0-SNAPSHOT:compile
>>
>> Result of dependency:tree -Dverbose -X:
>> [INFO] [dependency:tree {execution: default-cli}]
>> [DEBUG] Dependency tree resolution listener events:
>> [DEBUG] testArtifact: artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
>> [DEBUG] includeArtifact:
>> artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
>> [DEBUG] startProcessChildren:
>> artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
>> [DEBUG]   testArtifact:
>> artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   includeArtifact:
>> artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   startProcessChildren:
>> artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] testArtifact:
>> artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] includeArtifact:
>> artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] startProcessChildren:
>> artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   testArtifact:
>> artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   includeArtifact:
>> artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   startProcessChildren:
>> artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   endProcessChildren:
>> artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] endProcessChildren:
>> artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] testArtifact:
>> artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] includeArtifact:
>> artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG] startProcessChildren:
>> artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   testArtifact:
>> artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
>> [DEBUG]   omitForNearer:
>> omitted=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
>> kept=test.proje

Transitive dependency omitted if prior dependency resolved first then subsquently omitted

2009-12-16 Thread egroesbeck

Problem: a transitive dependency is found in a graph multiple times but the
first artifact that depends on it is omitted for a higher version which no
longer has the transitive dependency.  This causes the final artifact list
to no longer include the transitive dependency even it other dependencies
depend on it.

I've included the graph and results of dependency:tree as reference. 
Changing the dependency order in project A to depend on E then C resolves
the issue as well as managing C to 2.0.0 (the version that eventually is
resolved).  However as the graph grows larger this becomes burdensome.  I
didn't find this situation described in the dependency mechanism
documentation and managing all the dependencies to match the declared
versions felt like overkill.  Is this behavior correct?

Tested with Maven versions: 2.0.10, 2.2.1, 3.0-alpha-5

Dependency graph:
A->B->C-1.0.0-SNAPSHOT->D
A->C-2.0.0-SNAPSHOT
B->E->D

Result of dependency:tree -Dverbose:
[INFO] test.projects:projectA:jar:2.0.0-SNAPSHOT
[INFO] +- test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
[INFO] |  +- (test.projects:projectC:jar:1.0.0-SNAPSHOT:compile - omitted
for conflict with 2.0.0-SNAPSHOT)
[INFO] |  \- test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
[INFO] | \- (test.projects:projectD:jar:1.0.0-SNAPSHOT:compile - omitted
for duplicate)
[INFO] \- test.projects:projectC:jar:2.0.0-SNAPSHOT:compile

Result of dependency:tree -Dverbose -X:
[INFO] [dependency:tree {execution: default-cli}]
[DEBUG] Dependency tree resolution listener events:
[DEBUG] testArtifact: artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
[DEBUG] includeArtifact: artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
[DEBUG] startProcessChildren:
artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
[DEBUG]   testArtifact:
artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   includeArtifact:
artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   startProcessChildren:
artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
[DEBUG] testArtifact:
artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
[DEBUG] includeArtifact:
artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
[DEBUG] startProcessChildren:
artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   testArtifact:
artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   includeArtifact:
artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   startProcessChildren:
artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   endProcessChildren:
artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
[DEBUG] endProcessChildren:
artifact=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
[DEBUG] testArtifact:
artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
[DEBUG] includeArtifact:
artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
[DEBUG] startProcessChildren:
artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   testArtifact:
artifact=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   omitForNearer:
omitted=test.projects:projectD:jar:1.0.0-SNAPSHOT:compile
kept=test.projects:projectD:jar:1
.0.0-SNAPSHOT:compile
[DEBUG] endProcessChildren:
artifact=test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   endProcessChildren:
artifact=test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
[DEBUG]   testArtifact:
artifact=test.projects:projectC:jar:2.0.0-SNAPSHOT:compile
[DEBUG]   omitForNearer:
omitted=test.projects:projectC:jar:1.0.0-SNAPSHOT:compile
kept=test.projects:projectC:jar:2.0.0
-SNAPSHOT:compile
[DEBUG]   includeArtifact:
artifact=test.projects:projectC:jar:2.0.0-SNAPSHOT:compile
[DEBUG]   startProcessChildren:
artifact=test.projects:projectC:jar:2.0.0-SNAPSHOT:compile
[DEBUG]   endProcessChildren:
artifact=test.projects:projectC:jar:2.0.0-SNAPSHOT:compile
[DEBUG] endProcessChildren:
artifact=test.projects:projectA:jar:2.0.0-SNAPSHOT
[INFO] test.projects:projectA:jar:2.0.0-SNAPSHOT
[INFO] +- test.projects:projectB:jar:1.0.0-SNAPSHOT:compile
[INFO] |  +- (test.projects:projectC:jar:1.0.0-SNAPSHOT:compile - omitted
for conflict with 2.0.0-SNAPSHOT)
[INFO] |  \- test.projects:projectE:jar:1.0.0-SNAPSHOT:compile
[INFO] | \- (test.projects:projectD:jar:1.0.0-SNAPSHOT:compile - omitted
for duplicate)
[INFO] \- test.projects:projectC:jar:2.0.0-SNAPSHOT:compile
-- 
View this message in context: 
http://old.nabble.com/Transitive-dependency-omitted-if-prior-dependency-resolved-first-then-subsquently-omitted-tp26818594p26818594.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org