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
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
* 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.