Missed Team ’24? Catch up on announcements here.

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

Can I point OnDemand Bamboo to my Maven repository?

Ryan King
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!
February 13, 2012

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?

Thanks!

3 answers

1 accepted

1 vote
Answer accepted
SimonS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

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:

https://studio.atlassian.com/browse/JST-2305

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.

-Simon

Karsten Silz October 18, 2012

The issue you mentioned (now https://jira.atlassian.com/browse/AOD-2305) 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?

SimonS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2012

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.

Andrew Serff February 13, 2013

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...

3 votes
Andrew Serff February 14, 2013

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.

1 vote
ssetayeshfar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2013

Hello,

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)>]

Options:

...

-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 Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events