Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Simple Question: How to get the plugin version in java?

Arthur
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2013

Hi guys,

I simply want to read out my plugin version, defined in pom.xml, in a java class.

I currently have a blackout... can someone help me?

thanks

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Arthur
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2013

Thanks Alex Perez. The correct line is:

ComponentAccessor.getPluginAccessor().getPlugin("plugin-key").getPluginInformation().getVersion();

0 votes
Alex Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2013

ComponentAccessor.getPluginAccessor.getPlugin("plugin-key") ...getVersion?

plugin-key is supposed to be taken from atlassian-plugin.xml

Ethan Wortzman October 7, 2018

how do I acceess `plugin-key` from java code? Is there a simple programmatic way to access the values in `atlassian-plugin.xml`?

TAGS
AUG Leaders

Atlassian Community Events