diff --git a/.travis/build-deploy.sh b/.travis/build-deploy.sh
index b555215991..d5a67c3739 100755
--- a/.travis/build-deploy.sh
+++ b/.travis/build-deploy.sh
@@ -26,7 +26,7 @@ VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
# TODO : Once we release PMD 6.0.0 and have a compatible PMD plugin, enable PMD once again
-MVN_BUILD_FLAGS="-B -V -Dpmd.skip=true"
+MVN_BUILD_FLAGS="-B -V -Djava7.home=/usr/lib/jvm/java-7-oracle -Dpmd.skip=true"
if travis_isPullRequest; then
diff --git a/pmd-apex-jorje/pom.xml b/pmd-apex-jorje/pom.xml
index 5e5d82a424..8296aa2584 100644
--- a/pmd-apex-jorje/pom.xml
+++ b/pmd-apex-jorje/pom.xml
@@ -14,6 +14,7 @@
${basedir}/../pmd-core
8
+ ${env.JAVA_HOME}
2017-11-17
diff --git a/pmd-apex/pom.xml b/pmd-apex/pom.xml
index f7e9792fb3..f17d6b0b01 100644
--- a/pmd-apex/pom.xml
+++ b/pmd-apex/pom.xml
@@ -12,7 +12,9 @@
${basedir}/../pmd-core
+
8
+ ${env.JAVA_HOME}
diff --git a/pmd-java8/pom.xml b/pmd-java8/pom.xml
index f56e9c31bc..1ea24f5b86 100644
--- a/pmd-java8/pom.xml
+++ b/pmd-java8/pom.xml
@@ -13,6 +13,7 @@
${basedir}/../pmd-core
8
+ ${env.JAVA_HOME}
diff --git a/pom.xml b/pom.xml
index d38e09c496..77b59d440b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -255,11 +255,13 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
+ 7
+ ${env.JAVA_HOME}
+
5.0
2.20.1
2.17
3.8
- 7
1.10.1
3.0.0-M1
4.7
@@ -341,6 +343,9 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
${java.version}
+
+ ${java.home}/jre/lib/rt.jar
+
@@ -924,6 +929,18 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
+
+ jdk7-settings
+
+
+ java7.home
+
+
+
+ ${java7.home}
+
+
+
jdk8-modules