depending on another maven plugin is a bad plan.  Due to issues with how
Maven 2 loads plugins, the first version of a plugin loaded in a
multi-module build is the only version that is loaded.

Maven 3 will fix this somewhat, but in essence your build will be completely
unpredictable if you try to depend on another plugin.

IIRC getting the resolved dependencies is actually quite easy from within
maven (just annotate the mojo with @requiresDependencyResolution scope where
scope is the scope you require and then I think annotate a field with
@parameter expression="${project.artifacts}" or something similar... you're
making your life more complex by trying to depend on a separate plugin

-Stephen

On 22 February 2010 21:59, Kai Hackemesser <[email protected]>wrote:

> Hi, James,
>
> that tip is almost good! But this one executes the mojo, and I want to have
> the mojo object accessible, as I want to access a field. In more details, I
> want to call the getResults() method on ResolveDependenciesMojo to get hold
> of the dependencies.
> The actual scenario: I want to build a classpath string containing some
> dependencies of the plugin and the dependencies of the current project. Or
> I
> need a list of resolved jar files for the same set of dependencies.
>
> Cheers,
> Kai
>
> 2010/2/22 James William Dumay <[email protected]>
>
> > Hey Kai,
> > You might want to checkout the Mojo Executor project :)
> >
> > http://code.google.com/p/mojo-executor/
> >
> > James
> >
> >
> > Kai Hackemesser wrote:
> >
> >> Hi,
> >>
> >> I would like to execute another Mojo (the ResolveDependenciesMojo) from
> >> inside my own Mojo. I wasn't yet successful in adding it with the
> >> @component
> >> annotation. What is a proper way to do that?
> >>
> >> Cheers,
> >> Kai
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>

Reply via email to