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

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events