Determine java7 home with jdk_switcher

This commit is contained in:
Andreas Dangel
2018-01-13 11:23:26 +01:00
parent 4f62e84392
commit ff9a951c9e

View File

@ -25,8 +25,11 @@ function push_docs() {
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}" echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
# determine java 7 path
JAVA7_HOME=$(jdk_switcher home openjdk7)
# TODO : Once we release PMD 6.0.0 and have a compatible PMD plugin, enable PMD once again # TODO : Once we release PMD 6.0.0 and have a compatible PMD plugin, enable PMD once again
MVN_BUILD_FLAGS="-B -V -Djava7.home=/usr/lib/jvm/java-7-openjdk -Dpmd.skip=true" MVN_BUILD_FLAGS="-B -V -Djava7.home=${JAVA7_HOME} -Dpmd.skip=true"
if travis_isPullRequest; then if travis_isPullRequest; then