Reputation: 1103
Is there a way to configure Jenkins to use specific Maven installation per job?
e.g.
Job A - Maven 3.3.3
Job B - Maven 3.3.9
Upvotes: 4
Views: 2346
Reputation: 1621
For newer Jenkins versions, management of Maven installations is placed here:
Manage Jenkins → Global Tool Configuration → section Maven.
Per job configuration: "Maven Version" dropdown placed in "Build" section.
Upvotes: 1
Reputation: 790
Jenkins allows you to select which Maven installation to use per job. You can setup multiple installations of Maven, multiple settings configurations of Maven to be exact, through Manage Jenkins → Configure System.
Then to configure per job, in Jenkins, select your specific build job and choose Configure. From there, assuming it is a Maven project build, you should have option(s) under the Build section (might have to hit the Advanced button) where you can select the Maven settings for your installation you want.
khmarbaise's comment is very valid, though. Unless you have a very specific reason to downgrade Maven for a given job, your build shouldn't be too reliant on what minor versions of the build tool to use.
Upvotes: 3