maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laird Nelson <>
Subject Armed with a collection of Artifacts, what is the Maven Way™ to resolve them?
Date Sun, 05 Jan 2014 23:56:32 GMT
Hello; suppose I have a Collection<Artifact> in my left hand, all elements
of which are not resolved.

(As it happens, I got these indirectly from a DependencyGraphBuilder

What is the Maven Way™ to resolve these Artifacts?

I know that these Artifacts are unresolved, because each of them returns
false from its isResolved() method.

I need to resolve them so that when I call someArtifact.getFile() it will
return me a non-null File object that actually exists.  At the moment, each
Artifact returns null from this method.

>From this documentation link: I found a
project called maven-artifact-resolver.  Great, I thought; this must be how
the innards of Maven do it.

However, that project appears to either be deprecated or incomplete or
orphaned or not used or something; it is at version 1.0 and has no
Javadocs:  All of
its Maven-related dependencies are at 2.1.0, which I've learned through
painful experience means "not the version that does dependency resolution
in the right way but the old Maven 2.x non-Aether way".  So I am led to
conclude that this project is deprecated and to the extent that it is used
anywhere it is old and busted, to quote Will Smith.

(It is true that I am using this from a plugin, and I could of course mark
the plugin as requiring dependency resolution in a particuclar scope..  But
I am now just curious, and want to know what abstraction layer, if any, I'm
missing in Maven that hides the Aether-related details in a similar way as
DependencyGraphBuilder does (from maven-dependency-tree).  I have to assume
there is one, but I haven't been able to find it.)



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message