maybe MavenMetadataSource.retrieveAvailableVersions() or
ArtifactCollector.collect can help you

On 1/3/07, Matthew Beermann <[EMAIL PROTECTED]> wrote:
So, I'm writing a mojo where (for various strange reasons) I need to construct 
and resolve Artifacts manually, during mojo execution. My first attempt at the 
code looked something like:

Artifact a = artifactFactory.createDependencyArtifact(...);
artifactResolver.resolve(a, ...);

This works beautifully, so long as you supply the ArtifactFactory with a 
/definite/ version number. If you attempt to use a version range or a keyword 
like RELEASE, LATEST, etc, everything blows up. From reading through the source 
code, the resolve() method is expecting the artifact to already have a definite 
version number. (There's a shortcut optimization to look directly inside the 
local repository before triggering a download.)

So my question is, what am I doing wrong here? How do I trigger Maven's code 
for locating the most appropriate version given a range/keyword/etc? Is there a 
helper or utility class for all of this somewhere?

--Matthew Beermann

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to