WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

Commit da73a605 authored by John Zhang's avatar John Zhang
Browse files

[pmd] properly require JDK 7

parent e7e1ee86
......@@ -40,12 +40,17 @@
<!-- set up toolchains.xml for Maven -->
<property name="mvn-toolchains-xml" value="${bm-build-top}/toolchains.xml"/>
<exec executable="${bm-files}/mvn_toolchain_setup.sh">
<arg line="${mvn-toolchains-xml}"/>
<arg value="${mvn-toolchains-xml}"/>
<arg value="${jdk7home}"/>
</exec>
<!-- execute Maven in build directory -->
<exec dir="${bm-build-top}" executable="${mvn-exe}">
<arg line="-B --global-toolchains ${mvn-toolchains-xml} -Dmaven.test.skip=true clean package"/>
<arg value="-B"/>
<arg line="--global-toolchains ${mvn-toolchains-xml}"/>
<arg value="-Dmaven.test.skip=true"/>
<arg line="-pl pmd-core,pmd-apex,pmd-java,pmd-dist"/>
<arg line="clean package"/>
</exec>
<!-- unpacks produced zip file -->
......
......@@ -7,14 +7,23 @@ extract_java_version() {
if [ ! -e $1 ]; then
jver=$(extract_java_version)
if [ $jver -ge 8 ]; then
if [ $jver -eq 8 ]; then
cat > $1 <<- EOM
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.$jver</version>
<version>1.7</version>
</provides>
<configuration>
<jdkHome>$2</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
</provides>
<configuration>
<jdkHome>$JAVA_HOME</jdkHome>
......@@ -23,7 +32,7 @@ if [ ! -e $1 ]; then
</toolchains>
EOM
else
echo "PMD benchmark needs Java >= 1.8!" >> /dev/stderr
echo "Building PMD benchmark needs Java 8!" >> /dev/stderr
exit 1
fi
fi
\ No newline at end of file
......@@ -17,4 +17,5 @@ build.failonerror=true
# building tradebeans & tradesoap requires JDK 7
# (Geronimo deployment requirement)
# building PMD also requires JDK 7
jdk7home=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment