+1 On Wed, Aug 12, 2009 at 4:43 PM, Benjamin Bentmann<benjamin.bentm...@udo.edu> wrote: > Hi, > > for Maven 3.x, I would like to discuss the introduction of a new mojo > annotation > > �...@requiresdependencycollection <required-scope> > > As the name probably suggests, the intended effect is to resemble an > invocation of the artifact collector, i.e. calculate the dependency tree > but don't try to resolve the artifact files. > > Some use cases that motivate this are outlined in [0] or [1]. The aim is to > better support those plugins that want to analyze the dependency tree, e.g. > version checking, but usually run in very early build phases where attempts > to resolve the artifact files would either deliver stale data from the repos > or simply fail. > > In more detail, I envision the following behavior of the core. For any > combination of @requiresDependencyCollection and > @requiresDependencyResolution that we encounter within a mojo or project, > invoke the artifact collector, using the union of the scopes requested by > the two annos as the filter. The resulting artifact set will be stored in > MavenProject.getArtifacts(). The subset of these artifacts whose scope > matches @requiresDependencyResolution will be passed to the artifact > resolver to grab the file. > > The MavenProject.get*ClasspathElements() methods would exclude/skip all > project artifacts without a file. This is meant to match current behavior > where a mojo without @requiresDependencyResolution can call > get*ClasspathElements() and simply will get an empty/incomplete result. > > WDYT? > > > Benjamin > > > [0] http://markmail.org/message/hqumgsdbntbcogh5 > [1] http://jira.codehaus.org/browse/MRELEASE-388 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org