Karl Heinz Marbaise-3 wrote
>>I thought I could just enter it once as a plugin dependency in
>> the user project pom - assuming it would be the only one.
>
> You can give this via the plugin configuration and which means your
> plugin must resolve it's dependencies and make a required download for
> it...which can be easily done by using a maven-artifact-transfer[3].
>
> [3]:
> https://maven.apache.org/shared/maven-artifact-transfer/install-project.html
I wasn't able to get the maven-artifact-transfer to function in my mojo. I
resorted to Aether's RepositorySystem.resolveArtifact() method.
Karl Heinz Marbaise-3 wrote
>>>> Presumably I call something like
>>>> project.getPlugin(key).getDependencies()?
>>>>
>>>> If the 'key' required for project.getPlugin(key) is of the form
>>>> myGroup:myPlugin:version e.g. com.megacorp:thing-plugin:1.0.2
>>>>
>>>> can I get my mojo's own key programmatically in the mojo to avoid
>>>> hard-coding it?
This is the last issue I'm facing (famous last words.....)
I currently hard-code my plugin's key so I can obtain it while the mojo is
in action:
Plugin plugin = project.getPlugin("com.megacorp.stuff:my-plugin");
plugin.getDependencies()......
but I'd like to avoid that in case my successor decides to rename it or
something similar.
How can I the key programmatically, by reaching deep into the mojo?
Regards
Adam
--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]