On Friday 23 March 2007 12:28, Carlos Sanchez wrote:
> there's no order guaranteed afaik, the returned object is a Set
>
> I think in 2.0.5 there was an attempt to make it follow the pom order
> http://jira.codehaus.org/browse/MNG-1412
>
> getArtifacts returns all dependencies (including transitive)
> Set<Artifact> i'm gonna add some javadocs

Umm...  that's not complely true.  :-)

Based on experience with Remote Resources, getArtifacts(...) returns the 
set of dependencies (including transitive) that were last resolved.    
Thus, the set thus then depends one either:

1) What you have set for your mojo's @requiresDependencyResolution tag. 
If you have it set to "runtime", it will be the runtime stuff.

2) If you don't have a @requiresDependencyResolution tag, it will depend 
on where in the lifecycle your plugin runs and what plugins were called 
before it.   For example, if your plugin runs in the validate phase, the 
set is most likely going to be "null".    If you run after compile, 
you'll get the compile stuff, if you run after test, you'll get the test 
stuff.  


Dan


> On 3/23/07, Alin Dreghiciu <[EMAIL PROTECTED]> wrote:
> > Hi guys,
> >
> > Can someone enlight me and tell what will the method getArtifacts
> > from MavenProject return? What Artifacts?
> >
> > Alin Dreghiciu

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

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

Reply via email to