Release workflow with Maven and Nexus

1. Is there any way to setup Bamboo to make release versions follow the Maven version? Something along the lines of ${maven.version}-b${buildNumber}.

2. The artifacts need to be published to Nexus. Is the expected workflow here that the build plan publishes the artifacts or that a Deployment publishes the artifacts?

3. I haven't found any Nexus related plugins which is strange to me since it's so commonly used. Is the only option for tying promotions in Bamboo to promotions in Nexus with some sort of bash script to call their API?

1 answer

1) Sure, just add a plan variable like maven.version with value 1 and pass it to the maven task.

2) It depends on what you like more. I my opinion use a deployment project.

3) Use maven-release-plugin and SCM Information in your pom of your project. Then you just run mvn release:prepare and release:perform (see http://maven.apache.org/maven-release/maven-release-plugin/)

This is a interesting video from Jonathan Docklovic from Summit last Year about maven and releasing via Bamboo (http://www.youtube.com/watch?v=YIgX67c-2hQ&index=52&list=PLaD4FvsFdarR451b0HQXHinsFQTDY-MSg)

1. The information is already available in the POM, it should pull it from there not force manual entry. Fortunately I found a plugin that extracts that information into a variable. It works on a single branch, I haven't tested multiple simultaneous branches so I'm not sure it will work in practice.

2. Fair enough.

3. Maven doesn't handle promotion at all. So the release plugin doesn't really offer anything. It has to be done with tooling, such as a Nexus staging repository. The problem is I need to tie that to the versions in Bamboo. If I can't then Bamboo is essentially an expensive, less capable Jenkins.

I have some ideas on how I can accomplish that using shell scripts in Bamboo that curl the API in Nexus. The build can deploy to a Nexus staging repository and the deployment "environments" can promote it through while triggering the actual deployment as well. I was really hoping there would be integration in lieu of hacky bash scripting.

Oh well, thank you for your time.

You can use the maven-nexus-plugin and run it in the release-plugin - see http://www.baeldung.com/maven-release-nexus

And then use a Maven2/3 Task to execute it.

The problem is that Bamboo is using a cached repository, so even when using the maven-nexus-plugin, the plugin cannot push the commits with the release tag back to the repository (in my case Bitbucket Server).

he problem is that Bamboo is using a cached repository, so even when using the maven-nexus-plugin, the plugin cannot push the commits with the release tag back to the repository (in my case Bitbucket Server).


Do you mean maven-release-plugin? Could you please provide some logs of your build? We use maven-release-plugin and don't have the problem

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,085 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot