Use bootclasspath when building for java7
Note: this is only works correctly, if the property java7.home is set Fixes #842
This commit is contained in:
@ -26,7 +26,7 @@ VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --
|
|||||||
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
|
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
|
# 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
|
if travis_isPullRequest; then
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<config.basedir>${basedir}/../pmd-core</config.basedir>
|
<config.basedir>${basedir}/../pmd-core</config.basedir>
|
||||||
<java.version>8</java.version>
|
<java.version>8</java.version>
|
||||||
|
<java.home>${env.JAVA_HOME}</java.home>
|
||||||
<apex.jorje.version>2017-11-17</apex.jorje.version>
|
<apex.jorje.version>2017-11-17</apex.jorje.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<config.basedir>${basedir}/../pmd-core</config.basedir>
|
<config.basedir>${basedir}/../pmd-core</config.basedir>
|
||||||
|
|
||||||
<java.version>8</java.version>
|
<java.version>8</java.version>
|
||||||
|
<java.home>${env.JAVA_HOME}</java.home>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<config.basedir>${basedir}/../pmd-core</config.basedir>
|
<config.basedir>${basedir}/../pmd-core</config.basedir>
|
||||||
<java.version>8</java.version>
|
<java.version>8</java.version>
|
||||||
|
<java.home>${env.JAVA_HOME}</java.home>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
19
pom.xml
19
pom.xml
@ -255,11 +255,13 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
|
|||||||
</issueManagement>
|
</issueManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<java.version>7</java.version>
|
||||||
|
<java.home>${env.JAVA_HOME}</java.home>
|
||||||
|
|
||||||
<javacc.version>5.0</javacc.version>
|
<javacc.version>5.0</javacc.version>
|
||||||
<surefire.version>2.20.1</surefire.version>
|
<surefire.version>2.20.1</surefire.version>
|
||||||
<checkstyle.version>2.17</checkstyle.version>
|
<checkstyle.version>2.17</checkstyle.version>
|
||||||
<pmd.plugin.version>3.8</pmd.plugin.version>
|
<pmd.plugin.version>3.8</pmd.plugin.version>
|
||||||
<java.version>7</java.version>
|
|
||||||
<ant.version>1.10.1</ant.version>
|
<ant.version>1.10.1</ant.version>
|
||||||
<javadoc.plugin.version>3.0.0-M1</javadoc.plugin.version>
|
<javadoc.plugin.version>3.0.0-M1</javadoc.plugin.version>
|
||||||
<antlr.version>4.7</antlr.version>
|
<antlr.version>4.7</antlr.version>
|
||||||
@ -341,6 +343,9 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
|
|||||||
<configuration>
|
<configuration>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
|
<compilerArguments>
|
||||||
|
<bootclasspath>${java.home}/jre/lib/rt.jar</bootclasspath>
|
||||||
|
</compilerArguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -924,6 +929,18 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
|
|||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>jdk7-settings</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>java7.home</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<java.home>${java7.home}</java.home>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>jdk8-modules</id>
|
<id>jdk8-modules</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
Reference in New Issue
Block a user