-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Hudson 1.393, Maven 2.2.1
I want to specify a certain repositoryLocation for a Hudson slave node.
I've defined a Node Property MAVEN_OPTS=-Dmaven.repo.local=/srv2/hudson/m2-repo
I've attached a tiny example pom that simply prints the MAVEN_OPTS.
I first run this project as a normal Maven 2/3 project. Instead of installing to the custom repo defined in MAVEN_OPTS, artifacts are installed to the default /srv/hudson/.m2/repository:
[INFO] Executing tasks
main: [echo] Ant says hello! [echo] MAVEN_OPTS are -Dmaven.repo.local=/srv2/hudson/m2-repo [INFO] Executed tasks [INFO] [install:install {execution: default-install}] [INFO] Installing /srv2/hudson/workspace/foo-core/pom.xml to /srv/hudson/.m2/repository/com/tfnico/examples/foo-core/1.0-SNAPSHOT/foo-core-1.0-SNAPSHOT.pom
So, the MAVEN_OPTS variable is in there, but Maven does not use it.
However, running a freestyle project, calling mvn clean install outputs this:
main: [echo] Ant says hello! [echo] MAVEN_OPTS are -Dmaven.repo.local=/srv2/hudson/m2-repo [INFO] Executed tasks [INFO] [install:install {execution: default-install}] [INFO] Installing /srv2/hudson/workspace/flexo-foo/pom.xml to /srv2/hudson/m2-repo/com/tfnico/examples/foo-core/1.0-SNAPSHOT/foo-core-1.0-SNAPSHOT.pom
The MAVEN_OPTS are here correctly used, and the custom repo is used.
In the Maven2/3 job, configuring MAVEN_OPTS works as expected, so I assume this is specific for node properties. A bit like it was in #
JENKINS-4030- so obviously this has worked in the past.