As this should always match the plugin version, you can do something like this:
Jenkins.getUpdateCenter().getPlugin("p4").getWrapper().getVersion()
...just out of my head - please check concrete method names...
Domi
On 04.08.2014, at 14:52, pallen <[email protected]> wrote:
> In my POM I specify the plugin's version, e.g.
>
> <artifactId>p4</artifactId>
> <version>1.0.9</version>
> <packaging>hpi</packaging>
>
> I would like to access the String "1.0.9" in my code; something like this:
>
> this.getClass().getPackage().getImplementationVersion();
>
> I have tried adding the "maven-jar-plugin" as per
> http://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code,
> but no luck. Is this a result of the HPI packaging?
>
> Kind regards,
>
> Paul
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.