M1 Tip #1: Get a plugin's Project object
Let's imagine you wish to get information from an installed plugin. You may think that the following would work:
… but it doesn't! It returns your current Project's object and not the plugin's.
Here's a way to do it (Please send your ideas if you have a better solution):
For example, to retrieve the Clover jar dependency from the Maven Clover plugin you would write:
Update 2005-05-05: Someone posted a good tip in the comments saying that you can also use:
and then
${pom.getPluginContext('<artifactId>')
.getProject()}${context.getMavenSession()
.getPluginProjectFromGoal(
'<goal of plugin to retrieve>')}${context.getMavenSession()
.getPluginProjectFromGoal('clover')
.getDependencyPath('clover:clover')}<maven:get var="cloverPlugin" plugin="maven-clover-plugin" propery="plugin"/>
${cloverPlugin.getDependencyPath(
'clover:clover')}