Skip to content

Commit

Permalink
fix build classpath under java7
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesZ-Chen committed Jun 10, 2016
1 parent a771456 commit bc08cf8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ sudo: false

jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
8 changes: 7 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@
# (This is the location where travis script would download and build these dependences)
# You could also configure to your own copy of these dependences
checker-framework=${basedir}/../checker-framework
jsr308-langtools=${basedir}/../jsr308-langtools
jsr308-langtools=${basedir}/../jsr308-langtools
annotation-file-utilities=${basedir}/../annotation-tools/annotation-file-utilities

# for testing java 7
# checker-framework=${basedir}/../../java7-jsr308/checker-framework
# jsr308-langtools=${basedir}/../../java7-jsr308/jsr308-langtools
# annotation-file-utilities=${basedir}/../../java7-jsr308/annotation-tools/annotation-file-utilities
12 changes: 10 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<property name="checker.bin" value="${basedir}/bin"/>
<property name="checker.src" value="${basedir}/src"/>
<property name="build.deps" value="${basedir}/build-deps"/>
<property name="javac.lib" value="${build.deps}/javac.jar"/>
<property name="framework.lib" value="${build.deps}/framework.jar"/>
<!-- <property name="annotation-file-utilities.lib" value="${build.deps}/annotation-file-utilities.jar"/> -->
<!-- if using jdk.astub, un-comment below properties, and re-configure the right place of your jdk.astub-->
<property name="jdk.astub" value="${checker.src}/read/jdk.astub"/>
<property name="jdk.astub.bin.dir" value="${checker.bin}/read"/>
Expand All @@ -28,6 +31,7 @@

<symlink link="${build.deps}/framework.jar" resource="${checker-framework}/framework/dist/framework.jar" overwrite="true"/>
<symlink link="${build.deps}/javac.jar" resource="${jsr308-langtools}/dist/lib/javac.jar" overwrite="true"/>
<!-- <symlink link="${build.deps}/annotation-file-utilities.jar" resource="${annotation-file-utilities}/annotation-file-utilities.jar" overwrite="true"/> -->

<!-- using jdk.astub specific, need to re-configure the right place of yoru jdk.astub.bin.dir-->
<copy file="${jdk.astub}" todir="${jdk.astub.bin.dir}"/>
Expand Down Expand Up @@ -57,6 +61,10 @@
classname="com.sun.tools.javac.Main">
<jvmarg line="-Xbootclasspath/p:${javac.lib}"/>
<arg value="-g"/>
<arg value="-source"/>
<arg value="7"/>
<arg value="-target"/>
<arg value="7"/>
<!-- To not get a warning about bootstrap classpath -->
<arg value="-Xlint:-options"/>
<arg line="-sourcepath ${checker.src}"/>
Expand Down Expand Up @@ -103,7 +111,7 @@
failonerror="true"
classpath="${test.classpath}:${basedir}/bin"
classname="com.sun.tools.javac.Main">
<!-- <jvmarg line="-Xbootclasspath/p:${javac.lib}"/> -->
<jvmarg line="-Xbootclasspath/p:${javac.lib}"/>
<arg value="-g"/>
<!-- Make sure we only have Java 7 source code and generate Java 7 bytecode. -->
<arg value="-source"/>
Expand Down Expand Up @@ -143,7 +151,7 @@
<!--Set JAVAC_JAR so the insert-annotations-to-source can use it-->
<!-- <env key="JAVAC_JAR" value="${javac.lib}"/> -->
<classpath path="${test.classpath}:${tests.build}:${basedir}/bin"/>
<!-- <jvmarg line="-Xbootclasspath/p:${javac.lib}"/> -->
<jvmarg line="-Xbootclasspath/p:${javac.lib}"/>
<jvmarg line="-ea"/>
<!-- <jvmarg line="${debugger.str}"/> -->
<sysproperty key="use.hacks" value="${use.hacks.str}"/>
Expand Down

0 comments on commit bc08cf8

Please sign in to comment.