You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm new to Bitbucket and Bamboo, and I'm looking for a way to make sure that whenever someone successfully merges from another branch to the master branch, the version listed in the pom.xml is updated. For example:
1.24-SNAPSHOT => 1.25-SNAPSHOT
I'd appreciate any input you might have, and I apologize if this information is vague!
Hi @Samuel VanFossen, welcome to Atlassian Community!
To set the version number as dynamic value, you'll need to declare the equivalent Bamboo variable bamboo.buildNumber during the execution of the Maven script.
For example, you may want your Maven 2 version to be determined by Bamboo. In Maven 2 pom.xml
you may have:
...
<groupId>com.atlassian.boo</groupId>
<artifactId>boo-test</artifactId>
<packaging>jar</packaging>
<version>1.1.${bambooBuildNumber}-SNAPSHOT</version>
...
You can then specify the following in the Goal field of your build plan:
clean package -DbambooBuildNumber=${bamboo.buildNumber}
When the command runs, Bamboo will replace bamboobuildNumber
with the actual number (e.g. 1102), which will be passed to the underlying Maven build to use. The command will then produce a jar that looks like this: boo-test-1.1.1102-SNAPSHOT.jar
.
More information can be found here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.