1
votes

Trying to override Jenkins master maven configuration on on-demand Jenkins slave created using ec2 plugin. As We are using different maven versions of Maven, So I need to override the global configuration with Slave node configuration.

Maven configuration on master:

enter image description here

Requirement: I need to set Maven home to /opt/apache-maven-3.2.5 on Slave.

Tool was already installed as it was just an AWS AMI. When ever I run the job it's checking Maven in /home/csbuild/build/apache-maven-3.0.5, But I want to use Maven in /opt/apache-maven-3.2.5. How can I update the MAVEN_HOME in the job?

Job configuration: job configuration

Jenskins version:1.656

1
You can add another maven installation with the Add button in your first screenshot. Once its done, select it with the first combobox of your second screenshot. - Dalc

1 Answers

1
votes

In your first image it's the Maven's configuration in your slave and not in the master

the best practice is to make the same Maven version in the slave

to trying, for example in the node configuration you can make /opt/apache-maven-3.2.5 in place of /home/csbuild/build/apache-maven-3.0.5 the job will execute maven from /opt/apache-maven-3.2.5