Hello,
I'm trying to create a plugin that can either run in process or run in
a separate process. To run in a separate process I need to examine
the plugins dependencies and resolve them in case they have been
overridden in the pom. For instance, I want to be able to do
<plugin>
<groupId>com.3levers.maven.plugins</groupId>
<artifactId>my-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<background>false</background>
</configuration>
</plugin>
Which has a dependency on dependency.groupId:artifactId:1.1
I'd like to allow users to define their own version of the dependency such as
<plugin>
<groupId>com.3levers.maven.plugins</groupId>
<artifactId>my-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<background>false</background>
</configuration>
<dependencies>
<dependency>
<groupId>dependency.groupId</groupId>
<artifactId>artifactId</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</plugin>
To do that, I need to somehow be able to find the overridden
dependencies version. I'll now the groupId and artifactId ahead of
time and be able to hardcode them in the plugin. I just haven't been
able to figure out how to get that version, of even better the
artifact itself, and all of it's dependencies so I can build the
classpath for the forked process.
I've tried using the MavenProject.getPluginArtifacts() but that only
gives me the plugin artifacts and I can't get the plugins dependencies
from that. Is there any way I can do this or do I have to settle with
the plugin dependency version not being overrideable?
Thanks,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]