Configuring Java and Maven in Jenkins
In Jenkins 2, the Global Tool Configuration section has been introduced, which is a good move. All major configurations related to external tools, their locations, and automatic installer tools can be made in this section. Earlier, these configurations were part of Configure System, which used to make that page bit cluttered.
Configuring Java
To configure Java, provide a Name and the JAVA_HOME path, or check Install automatically checkbox:
Configuring Maven
To configure Maven, download the Maven installer from https://maven.apache.org/download.cgi , and extract it to the directory on your Jenkins virtual machine. In the Global Tool Configuration section, provide the Name and MAVEN_HOME path, or check Install automatically checkbox:
That's it! Our major configuration for running a simple build is done. Now, let's go to the home page of the Jenkins dashboard to create and configure a build job.