diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2016-06-19 12:45:37 +0200 |
---|---|---|
committer | Saša Živkov <sasa.zivkov@sap.com> | 2016-06-21 10:55:52 +0200 |
commit | 93486301b3101f2fd403991ad3cd487903f62a70 (patch) | |
tree | 9c01705c7185e28c55fc5b8663300e5b24394103 /pom.xml | |
parent | 0900dc08f59de482b38862094936e80fca39df2a (diff) | |
download | jgit-93486301b3101f2fd403991ad3cd487903f62a70.tar.gz jgit-93486301b3101f2fd403991ad3cd487903f62a70.zip |
Allow using JDK 7 bootclasspath when compiling JGit using Java 8
When compiling jgit using Java 8 set system property JDK_HOME to
JAVA_HOME path of JDK7 installation to compile against JDK 7 class
libraries. Otherwise jgit may hit runtime exceptions when running on
Java 7 (e.g. return type of ConcurrentHashMap.keySet() in JDK 8 class
library doesn't exist in JDK 7).
Example:
$ mvn clean install -DJDK_HOME=/.../jdk1.7.0_80.jdk/Contents/Home
Bug: 496262
Change-Id: Ib6abe5e544e0492e08b342e1a34b182caf25f94f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -188,9 +188,10 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format> <bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest> + <!-- set JDK_HOME to JAVA_HOME path of JDK7 installation in order to compile against JDK 7 class library --> + <JDK_HOME>${JAVA_HOME}</JDK_HOME> <jgit-last-release-version>4.2.0.201601211800-r</jgit-last-release-version> <jsch-version>0.1.53</jsch-version> @@ -264,6 +265,9 @@ <encoding>UTF-8</encoding> <source>1.7</source> <target>1.7</target> + <compilerArguments> + <bootclasspath>${JDK_HOME}${file.separator}jre${file.separator}lib${file.separator}rt.jar${path.separator}${JDK_HOME}${file.separator}jre${file.separator}lib${file.separator}jsse.jar${path.separator}${JDK_HOME}${file.separator}jre${file.separator}lib${file.separator}jce.jar</bootclasspath> + </compilerArguments> </configuration> </plugin> |