Can I point OnDemand Bamboo to my Maven repository?

We are evaluating Bamboo as part of our OnDemand trial and are running up against an issue wth Bamboo.

I have imported one of our existing projects into SVN, and have created a build plan to build the project using Maven 2.2.x.

However, the build is failing because Maven cannot find a number of dependencies that reside in our own Maven repository. Normally, I would just point the settings.xml file to our repo, but cannot figure out a way to do this with OnDemand Bamboo and its Elastic instances.

Is this even possible?


3 answers

1 accepted

Hey kyanring,

This isn't possible by default with Bamboo OnDemand's custom images. We do plan on making this available in the future though - please see this feature request:

This may be possible with a custom-defined elastic image that you point Bamboo to, but we wouldn't be able to support it if you ran into problems.


The issue you mentioned (now is about offering a Maven repository as part of the OnDemand suite. That's definitely nice, but an intermediate step would be to point a Bamboo plan to our own Maven repository instead. Is that planned?

It isn't planned for the immediate future... if we're going to implement it it would probably look like the feature request I linked earlier. Sorry, it's too far out to really know :(

Keep a watch and comment on that feature request though. The more votes and comments we get on it the more likely it will be planned for a future release.

There is really no way to set up the maven settings.xml for Bamboo OnDemand? This makes Bamboo useless to me. If I can't get dependancies from our own maven repo, then I can't build my products. Additionally, I can't just put then info in our pom, because there are credentials to log into our maven repo that are better suited to live in the settings.xml. Also, I agree the referenced JIRA issue doesn't solve this issue at all. Even if you make a hosted maven repo available in OnDemand, you still have to be able to tell bamboo to configure maven to use it...

So after I posted my comment, I discovered that you can create a custom elastic image. Basic steps:

  • Start the base Bamboo elastic image form the Bamboo admin
  • Log into it. You have to get the private key used by bamboo in your bamboo config. After you start it, go to your bamboo admin, Instances, click on the instance and there will be a SSH access section. The key is linked there, click it and download it. You can get the ssh connect command from your EC2 console.
  • Edit /opt/maven-3.0/conf/settings.xml and add your repositories and what ever else you need to (credentials, etc).
  • Now log into your EC2 console and right click on the image and select "Create Image (EBS AMI)"
    • I just named mine and didn't change anything else
    • Once that is done, note the AMI ID of the image you just created
  • Go back to the bamboo admin, Go to image configurations and add a new one with your AMI.
  • I also had to disable all other instances because it wouldn't automatically start my instance configuration.
  • Then go start it!

That was basically all I had to do and now when I build my maven projects, they get their dependancies from our own nexus repository.


The other solution to this is using maven command line options. In your maven task add preferred option to the Goals field, then Maven on the next run should pick the options from the configuration file and use proper repositories. Note that you don't need to put absolute path there, path relative to the build directory should be enough.

$mvn --help

usage: mvn [options][<goal(s)>][<phase(s)>]



-gs,--global-settingsAlternate path for the global settings file


-s,--settingsAlternate path for the user settings file

Hope this helps!

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,067 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