Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How to configure a local Maven mirror for Specs Runner? Edited

I have a local Maven mirror on my network (as is customary), but when I try to create plans with bamboo-specs (by committing a Java project containing a Java bamboo-specs module), the bamboo-specs-runner or bamboo-specs-generator (not clear which) insists on attempting to download directly from Maven Central.

I am running the specs in a custom container, with my mirror settings saved in /root/.m2/settings.xml. I have also (for good measure) saved the settings on the Bamboo server, in ~/.m2/settings.xml.

Please can you advise the correct way to configure the Maven process which processes specs.

I am using Bamboo 6.5.0. The custom container is based from atlassian/bamboo-specs-runner:6.5.0

3 answers

1 accepted

0 votes
Answer accepted

I did finally get this working by copying our maven settings.xml into /root/.m2/settings.xml (in a custom docker container, based from atlassian/bamboo-spec-runner:6.5.0); copying into

/usr/share/maven/ref/ (as recommended by the maven base image) did not work.

0 votes

Hi @Alan Raison,

insists on attempting to download directly from Maven Central.

Correct, access to the Maven central repository is required (as mentioned in the document), unless you already have those dependencies available in the machine where Bamboo is running. Maven needs to download dependencies that are necessary to execute Specs code from its repo at https://repo.maven.apache.org.

One thing you might be able to do is download those resources somewhere else and move them over to the machine where Bamboo is installed. For example, the user that created the Specs code should already have the necessary dependencies in its local Maven repository (Where is Maven local repository?: The default value is ${user.home}/.m2/repository) – so you could copy that over to the Maven local repository inside the machine where Bamboo is installed – under the user running Bamboo.

Alternatively, you could set up a different repository and/or make use of a mirror. For that reason, please review the following for further information:

* Maven - Settings Reference

* How to Override the Maven Local Repository setting

* Manually Overriding the Built-in Repositories

If you want to use a local repository instead of Maven's central repository to pull dependencies you'll need to add a <repository> tag inside the settings.xml file – you need to place this file inside the .m2 directory for the user running bamboo.

Kind regards,

Rafael

@rsperafico

As I stated in my question, I have configured a Maven mirror in my settings.xml, but bamboo is ignoring this.

Please can you read the question more carefully.

Should the runner be reading it settings from /root/.m2/settings.xml when running specs in a container, or is it running as a different user, or actually on the host machine?

Deleted user Jul 25, 2018

Tried modifying the agent's settings.xml and it didn't work. Apparently, bamboo-specs are executed on Bamboo master (which our team has no access to).

Suggest an answer

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

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

256 views 4 6
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