You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2021/05/31 17:38:29 UTC
[tapestry-5] branch master updated: TAP5-2676: avoid adding
tools.jar dependency with Java 9+
This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/master by this push:
new adad6bb TAP5-2676: avoid adding tools.jar dependency with Java 9+
adad6bb is described below
commit adad6bb965f77b08d2d633285326987b0f87c443
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Mon May 31 14:38:20 2021 -0300
TAP5-2676: avoid adding tools.jar dependency with Java 9+
---
tapestry-javadoc/build.gradle | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tapestry-javadoc/build.gradle b/tapestry-javadoc/build.gradle
index 412bf8e..c2b7241 100644
--- a/tapestry-javadoc/build.gradle
+++ b/tapestry-javadoc/build.gradle
@@ -3,14 +3,22 @@ description = "JavaDoc Plugin for Tapestry that generates component reference do
dependencies {
compile project(':tapestry-core')
compile "commons-lang:commons-lang:2.6"
- compile files(getTools())
+
+ if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
+ compile files(getTools())
+ }
}
/** Returns the tools.jar/classes.jar of the Java runtime. */
File getTools() {
- def jreRelpath = isMacOSX_1_6() ? "../classes/classes.jar" : "../lib/tools.jar"
- def jdkRelpath = isMacOSX_1_6() ? "classes/classes.jar" : "lib/tools.jar"
+
+ def dir = isMacOSX_1_6() ? "classes" : "lib"
+
+ def jar = isMacOSX_1_6() ? "classes" : "tools.jar"
+
+ def jreRelpath = "../${dir}/${jar}"
+ def jdkRelpath = "$dir/${jar}"
def javaHome = System.properties['java.home']
@@ -21,4 +29,4 @@ boolean isMacOSX_1_6() {
System.properties['os.name'].toLowerCase().contains('mac os') &&
System.properties['java.version'].startsWith("1.6.")
}
-
+
\ No newline at end of file