You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2017/06/19 01:58:45 UTC
[02/29] ant-ivy git commit: Make xooki2asciidoc work on java8+ based
jvm.
Make xooki2asciidoc work on java8+ based jvm.
Nashorn is not a drop-in replacement JavaScript implementation for Rhino.
see https://bugs.openjdk.java.net/browse/JDK-8025132 for further details
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/b3d2c0cd
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/b3d2c0cd
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/b3d2c0cd
Branch: refs/heads/master
Commit: b3d2c0cd6512a9dc9c6d17e4065cba1521791f4d
Parents: 879ac40
Author: Jean-Louis Boudart <je...@gmail.com>
Authored: Tue Dec 30 17:37:07 2014 +0100
Committer: Jean-Louis Boudart <je...@gmail.com>
Committed: Tue Dec 30 17:37:07 2014 +0100
----------------------------------------------------------------------
doc/xooki2asciidoc/antlib.xml | 7 ++++++-
doc/xooki2asciidoc/xooki2asciidoc.js | 5 +++++
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/b3d2c0cd/doc/xooki2asciidoc/antlib.xml
----------------------------------------------------------------------
diff --git a/doc/xooki2asciidoc/antlib.xml b/doc/xooki2asciidoc/antlib.xml
index 8f4d2e2..68da5f4 100644
--- a/doc/xooki2asciidoc/antlib.xml
+++ b/doc/xooki2asciidoc/antlib.xml
@@ -24,6 +24,11 @@
<attribute name="checkUpToDate"/>
<attribute name="printerFriendly"/>
<![CDATA[
+ try {
+ load("nashorn:mozilla_compat.js");
+ } catch (e) {
+ // ignore the exception - perhaps we are running on Rhino!
+ }
importClass(java.io.File);
var xookidir = attributes.get("xookidir");
@@ -79,4 +84,4 @@
}
]]>
</scriptdef>
-</antlib>
\ No newline at end of file
+</antlib>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/b3d2c0cd/doc/xooki2asciidoc/xooki2asciidoc.js
----------------------------------------------------------------------
diff --git a/doc/xooki2asciidoc/xooki2asciidoc.js b/doc/xooki2asciidoc/xooki2asciidoc.js
index 554924e..8945c64 100644
--- a/doc/xooki2asciidoc/xooki2asciidoc.js
+++ b/doc/xooki2asciidoc/xooki2asciidoc.js
@@ -1427,6 +1427,11 @@ xooki.init = function() {
};
if (batchMode) {
+ try {
+ load("nashorn:mozilla_compat.js");
+ } catch (e) {
+ // ignore the exception - perhaps we are running on Rhino!
+ }
importPackage(java.io);
xooki.io.loadFile = function( url, warnOnError ) {