I've just updated Jenkins to 2.x and am having problems configuring some jobs.
1. I created a Global Maven settings.xml file with the
Config File Management Plugin
2. Within that file I added: <localRepository>/srv/maven/.m2/repository</localRepository> , since I want the repository to be on that location
3. Created a new Maven Project. Tried to make the Job see that file by:
3.1 Build Environment - Provide Configuration file -Choose my file, variable MY_SETTINGS OR
3.2 Add pre-build step - provide configuration files
AND: then adding -s $MY_SETTINGS to either goals and options or MAVEN_OPTS
However, none of these seems to work. The job seems to try to use the default maven repository location (/usr/share(tomcat7/.m2) - which I have no idea how to re-define:
provisioning config files...
copy managed file [MYFILE settings] to file:/srv/webapps/jenkins/jobs/testJob/workspace@tmp/config3408982272576109420tmp
provisioning config files...
copy managed file [MYFILE settings] to file:/srv/webapps/jenkins/jobs/testJob/workspace@tmp/config2203063037747373567tmp
Parsing POMs
using global settings config with name MYFILE settings
Replacing all maven server entries not found in credentials list is true
Deleting 1 temporary files
ERROR: Failed to create /usr/share/tomcat7/.m2
Finished: FAILURE
Do you know what could be missing, or how to fix this?
Cheers,
Miguel