jeudi 12 novembre 2015

Custom JAVA location for selenium

I launch selenium tests in Jenkins using a maven-structure project. The default java location is /usr/lib/jvm/java-openjdk/bin/java But I need to run tests with the java from a different location: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64 So I set it in Jenkins node configuration in "Inject environment variable":

Properties Content - JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64

http://ift.tt/1HCNRKn and I don't set any additional java home settings in pom file. But when I run tests (mvn clean test) I get the following output:

Java version: 1.8.0_51, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.6.amzn1.x86_64/jre Default locale: en_GB, platform encoding: UTF-8 OS name: "linux", version: "3.10.35-43.137.amzn1.x86_64", arch: "amd64", family: "unix"

And then:

[selenium] $ /usr/lib/jvm/java-openjdk/bin/java -Xmx1024m -XX:MaxPermSize=786M -Dgwt.compiler.localWorkers=1

http://ift.tt/1MpFy16 So it always starts from /usr/lib/jvm/java-openjdk/bin/java whatever I set. (In MAVEN_OPTS there are only -Xmx1024m -XX:MaxPermSize=786M options set)

How can I make it use custom java 8 location?

Aucun commentaire:

Enregistrer un commentaire