[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-dev] Finding artifacts for plugin dependencies.
|
IMavenProjectFacade.getMojoExecutions(groupId,artfactId,monitor,goal)
returns list of MojoExecution instances that correspond to specified
plugin groupId, artifactId and goal.
MojoExecution.getMojoDescriptor().getPluginDescriptor().getArtifacts()
returns list of Artifact instances that make plugin runtime classpath,
taking into account pluginManagement, plugin/dependency, etc. Note that
all MojoExecution instances returns by
IMavenProjectFacade.getMojoExecutions will have the same
PluginDescriptor, so only one MojoExecution needs to be analyzed.
Hope this helps
--
Regards,
Igor
On 11-07-13 8:51 PM, Ian Robertson wrote:
I'm writing a ProjectConfigurator (extending
AbstractProjectConfigurator), and one of the things I need to be able to
do is to locate an artifact which is a dependency of a maven plugin. If
request is the ProjectConfigurationRequest parameter passed to
configure, then I can locate the plugin via
request.getMavenProject().getBuildPlugins(), and I can further get
dependencies from the plugin by calling getDependencies on the plugin.
However, what I need is the actual resolved
org.apache.maven.artifact.Artifact. If these were dependencies of the
project, I could call get getArtifacts; what's the solution for plugin
dependencies?
- Ian