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

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 Leaders.
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();

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events