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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,729
Community Members
 
Community Events
184
Community Groups

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.

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

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 27, 2018 • edited

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events