mardi 10 novembre 2015

Set java custom location in Jenkins

I run my tests in Jenkins on the server using Maven project.

The default path to java on the server is /usr/lib/jvm/java-openjdk/bin/java

Instead, I would like to use java 1.8 in my tests and it is located in:

/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java

How can I set this in jenkins properties or in a POM file so maven will use java 1.8 instead of default one?

I tried to set a String property JAVA_HOME or to set the path to jdk 8 in MAVEN_OPTS but it still uses default java.

Aucun commentaire:

Enregistrer un commentaire