If you get the project inside your plugin you can ask it for the the
plugin map, the key inside the map is groupid:artifactid.
Thus:
/** @parameter default-value="${project}" */
private org.apache.maven.project.MavenProject mavenProject;
mavenProject.getPluginArtifactMap().get("com.example:example-plugin").getVersion();
Hth,
Nick Stolwijk
~Java Developer~
IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl
2009/11/18 Gajo Csaba <[email protected]>:
> Hello,
>
> I'm writing a plugin which is generating certain files, and I would like to
> add something like a "Generated by xxx version 1.2.3" string to each file it
> generates. The problem is, how can the plugin know its own version (without
> hardcoding it)?
>
> Regards, Csaba
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]