I've noticed Maven Artifact Resolver Ant Tasks resolves artifacts
differently to both pure maven and Maven Ant Tasks.

For example, in one project I'm looking at, both pure maven and Maven Ant
Tasks resolves a jar to be "activation-1.1.1.jar", but Maven Artifact
Resolver Ant Tasks resolves to "activation-1.1.jar". The dependency tree
gives the following:
mvn dependency:tree -Dverbose -Dincludes=javax.activation:activation
Using Maven 2 dependency tree to get verbose output, which may be
inconsistent with actual Maven 3 resolution
 company:core:jar:1.0.0-SNAPSHOT
 \- company:model:jar:1.0.0-SNAPSHOT:compile
    \- com.sun.mail:javax.mail:jar:1.5.6:compile
       \- javax.activation:activation:jar:1.1.1:compile (version managed
from 1.1)

I gather pure maven does the "version managed from 1.1" change that Maven
Artifact Resolver Ant Tasks isn't doing. Is there any way to get the same
behavior? Can you point me to the documentation on this behavior?

The same command above without "verbose":
mvn dependency:tree -Dincludes=javax.activation:activation
company:core:jar:1.0.0-SNAPSHOT
 \- company:model:jar:1.0.0-SNAPSHOT:compile
    \- com.sun.mail:javax.mail:jar:1.5.6:compile
       \- javax.activation:activation:jar:1.1.1:compile

The pure maven command I used to download the JARs is:
mvn -U dependency:copy-dependencies -DoutputDirectory=lib-compile
-DincludeScope=compile

In some cases, the JAR is a minor version out and the project won't compile.

Reply via email to