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 to get the build number into a jar?

Peter Laman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 17, 2022

I'm new to Bamboo and I'm asked to make sure the build number is displayed in the about dialog of a web application. The server is .java and I want the build number to be present in a resource file in the generated fat jar.

How can I do this (or is there a better practice)?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 17, 2022

Hello @Peter Laman

In your build, use the environment variable bamboo.buildNumber or (bamboo_buildNumber if running from a Shell script).

More information:

Eduardo Alvarenga
Atlassian Support APAC

TAGS
AUG Leaders

Atlassian Community Events