The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the JIRA version from a Java API call from a plugin?

Chris Latimer
December 9, 2013

Inside my plugin I'd like to check the JIRA version to verify the installed version of the plugin is compatible with the version of JIRA it's running on. Could anyone help me figure out how to do this?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

3 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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 Champions.
December 9, 2013

Try com.atlassian.jira.util.BuildUtils.getVersion().

You will need the jira-core depedency.

Chris Latimer
December 9, 2013

Thanks, that one was deprecated but the API doc led me to BuildUtilsInfo which appears to have replaced that class. Exactly what I needed, thank you!!

Tam Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 10, 2016

@Chris Latimer's comment should be the correct answer, you can also get the JIRA version numbers (major, minor, maintenance) as follows:

BuildUtilsInfo buildUtilsInfo = new BuildUtilsInfoImpl();
int[] versionNumbers = buildUtilsInfo.getVersionNumbers();
TAGS
AUG Leaders

Atlassian Community Events