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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Remove -SNAPSHOT from project version in pom before deploying to maven repository.

Hi Team,

I have a pom with the following data.

<groupId>com.company</groupId>
<artifactId>test</artifactId>
<version>1.0.0-SNAPSHOT</version>

In the Bamboo build step, before the package, I want to forcefully remove  the  "-SNAPSHOT " from the version.

Can you suggest a solution?

Thanks.

1 answer

Hello @Ambili Venugopalan ,

If you have Maven installed on the agent (which I assume given a pom file), and you know the version you would like to set you can easily do so using the following command (for example using a shell task):

mvn versions:set -DnewVersion=1.0.0

Alternatively, you should be able to drop the -SNAPSHOT suffix using the following command, given you have at least version 2.1 of the Version Maven Plugin (see: https://www.mojohaus.org/versions-maven-plugin/set-mojo.html#removeSnapshot)

mvn versions:set -DremoveSnapshot

If you do not have Maven on the agent or you do not have version +2.1 and do not know the version in advance (e.g. it is set by the developers), you will need to extract the version part first and then update the file. In that case you might be interested in a plugin we have been working on: https://marketplace.atlassian.com/apps/1223553/metadata-maniac-for-bamboo.

Hope this helps.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

450 views 5 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you