timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-24901] Automatic tool installation of maven does not use settings from "Maven Configuration" section #5511

Open timja opened 9 years ago

timja commented 9 years ago

When installing maven with the automatic tool install option (as well as having the actual JDK installed automatically) there is no way to point to a common settings.xml, either through MAVEN_OPTS or through the "Maven Configuration" section in the main setup.

It will create a commandline like:
/var/jenkins_home/tools/hudson.model.JDK/jdk8oracle/bin/java -s /var/jenkins_home/settings.xml -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/boot/plexus-classworlds-2.5.1.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/conf/logging jenkins.maven3.agent.Maven31Main /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven /var/jenkins_home/war/WEB-INF/lib/remoting-2.43.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 48582
Unrecognized option: -s


Originally reported by davidkarlsen2, imported from: Automatic tool installation of maven does not use settings from "Maven Configuration" section
  • status: Open
  • priority: Minor
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 9 years ago

danielbeck:

Could you please explain both ways you tried in details so they can be reproduced? What exactly did you configure in the job, what did you configure in the global configuration?

timja commented 9 years ago

davidkarlsen2:

Wihtout using maven opts, generated cmd line will be:

[traxidx-srv] $ /var/jenkins_home/tools/hudson.model.JDK/jdk8oracle/bin/java -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/boot/plexus-classworlds-2.5.1.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/conf/logging jenkins.maven3.agent.Maven31Main /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven /var/jenkins_home/war/WEB-INF/lib/remoting-2.46.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 45302
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /var/jenkins_home/workspace/traxidx-srv/pom.xml -Dmaven.repo.local=/var/jenkins_home/workspace/traxidx-srv/.repository clean install
[INFO] Scanning for projects...

(See the two attachments for global config of system and project).