How to store the environment variables and paths to the third-party tools needed to run
your Jenkins pipeline (JDK/OpenJDK, Maven).
Procedure
- Navigate to Manage Jenkins > Configure System.
-
In the Global properties > Environment variables area, add the environment variables corresponding to the
following tools:
- Java or OpenJDK
- Maven: name the variable MAVEN_HOME, this name will be used in the pipeline script
- M2 Maven repository: name the variable M2_HOME,
this name will be used in the pipeline
scriptTip: This variable value corresponds to the <studio_path>/configuration/.m2/repository folder.
- Click Save to take the changes into account.
-
In the Global Tool Configuration > Maven area, add the M3 Maven tool:
- Click Add Maven.
- Name the tool M3, this name will be used in the pipeline script.
- Enter the path to your Maven installation directory in the MAVEN_HOME field.
- Click Save to take the changes into account.