Tristan JC Rouse wrote:

1) The DefaultArtifactResolver class's resolve(Artifact, List,
ArtifactRepository) method takes an ArtifactRepository parameter which
specifies the local repository. I can't figure out where to find this

Have a glance at the sections "For accessing artifacts and repositories"
and "Creating and resolving an artifact" of [0].

Apart from this, existing plugins can also provide inspirations. For instance, the Maven Dependency Plugin has some bits to deal with artifact resolution.

2) Actually due to the lack of information in the javadoc I'm really just
guessing that the ArtifactResolver's resolve method will, in fact, download
the specified Artifact to the local repository and update the value returned
by the Artifact.getFile() method. I could be off base here.

Yeah, the javadoc is admittedly thin but as this is all open source, you can always check the sources to see what actually goes on. Of course, single-stepping through Maven code with the debugger can also be a good way to get a rough understanding.


Benjamin


[0] http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to