8187773: nashorn ant javadoc, nashornapi, dynalinkapi, run, debug, octane, sunspider targets fail
Reviewed-by: hannesw
This commit is contained in:
parent
1e6e9203c4
commit
a8ce9febcd
@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate HTML documentation for shell tool. Re-run this tool to regenerate
|
|
||||||
* html doc when you change options.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* jjs -scripting genshelldoc.js > shell.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
var Options = Packages.jdk.nashorn.internal.runtime.options.Options;
|
|
||||||
var title = "Nashorn command line shell tool";
|
|
||||||
|
|
||||||
print(<<PREFIX
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>
|
|
||||||
${title}
|
|
||||||
</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Usage</h1>
|
|
||||||
<p>
|
|
||||||
<code>
|
|
||||||
<b>jjs <options> <script-files> [ -- <script-arguments> ]</b>
|
|
||||||
</code>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h1>${title} options</h1>
|
|
||||||
|
|
||||||
<table border="0">
|
|
||||||
<tr>
|
|
||||||
<th>name</th>
|
|
||||||
<th>type</th>
|
|
||||||
<th>default</th>
|
|
||||||
<th>description</th>
|
|
||||||
</tr>
|
|
||||||
PREFIX);
|
|
||||||
|
|
||||||
for each (opt in Options.validOptions) {
|
|
||||||
|
|
||||||
var isTimezone = (opt.type == "timezone");
|
|
||||||
var defValue = opt.defaultValue;
|
|
||||||
if (defValue == null) {
|
|
||||||
defValue = "<none>";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isTimezone) {
|
|
||||||
// don't output current user's timezone
|
|
||||||
defValue = "<default-timezone>"
|
|
||||||
}
|
|
||||||
|
|
||||||
print(<<ROW
|
|
||||||
<tr>
|
|
||||||
<td><b>${opt.name} ${opt.shortName == null? "" : opt.shortName}</b></td>
|
|
||||||
<td>${opt.type}</td>
|
|
||||||
<td>${defValue}</td>
|
|
||||||
<td>${opt.description}</td>
|
|
||||||
</tr>
|
|
||||||
ROW);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
print(<<SUFFIX
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
SUFFIX);
|
|
@ -271,17 +271,16 @@
|
|||||||
<target name="javadoc" depends="jar">
|
<target name="javadoc" depends="jar">
|
||||||
<javadoc destdir="${dist.javadoc.dir}" use="yes"
|
<javadoc destdir="${dist.javadoc.dir}" use="yes"
|
||||||
windowtitle="${nashorn.product.name} ${nashorn.version}"
|
windowtitle="${nashorn.product.name} ${nashorn.version}"
|
||||||
additionalparam="-quiet" failonerror="true" useexternalfile="true">
|
additionalparam="-quiet" failonerror="true" useexternalfile="true">
|
||||||
|
<arg value="--patch-module"/>
|
||||||
|
<arg value="jdk.scripting.nashorn=${basedir}/${nashorn.module.src.dir}"/>
|
||||||
|
<arg value="--patch-module"/>
|
||||||
|
<arg value="jdk.dynalink=${basedir}/${dynalink.module.src.dir}"/>
|
||||||
<arg value="--module-source-path"/>
|
<arg value="--module-source-path"/>
|
||||||
<arg value="${nashorn.module.src.dir}"/>
|
<arg value="."/>
|
||||||
<arg value="--module-source-path"/>
|
|
||||||
<arg value="${dynalink.module.src.dir}"/>
|
|
||||||
<arg value="${javadoc.option}"/>
|
<arg value="${javadoc.option}"/>
|
||||||
<classpath>
|
|
||||||
<pathelement location="${build.classes.dir}"/>
|
|
||||||
</classpath>
|
|
||||||
<fileset dir="${dynalink.module.src.dir}" includes="**/*.java"/>
|
|
||||||
<fileset dir="${nashorn.module.src.dir}" includes="**/*.java"/>
|
<fileset dir="${nashorn.module.src.dir}" includes="**/*.java"/>
|
||||||
|
<fileset dir="${dynalink.module.src.dir}" includes="**/*.java"/>
|
||||||
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
|
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
|
||||||
</javadoc>
|
</javadoc>
|
||||||
</target>
|
</target>
|
||||||
@ -290,14 +289,15 @@
|
|||||||
<target name="nashornapi" depends="jar">
|
<target name="nashornapi" depends="jar">
|
||||||
<mkdir dir="${dist.nashornapi.javadoc.dir}"/>
|
<mkdir dir="${dist.nashornapi.javadoc.dir}"/>
|
||||||
<javadoc destdir="${dist.nashornapi.javadoc.dir}" use="yes"
|
<javadoc destdir="${dist.nashornapi.javadoc.dir}" use="yes"
|
||||||
extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
|
windowtitle="${nashorn.product.name} ${nashorn.version}"
|
||||||
additionalparam="-quiet" failonerror="true" useexternalfile="true">
|
additionalparam="-quiet" failonerror="true" useexternalfile="true">
|
||||||
|
<arg value="--patch-module"/>
|
||||||
|
<arg value="jdk.scripting.nashorn=${basedir}/${nashorn.module.src.dir}"/>
|
||||||
|
<arg value="--patch-module"/>
|
||||||
|
<arg value="jdk.dynalink=${basedir}/${dynalink.module.src.dir}"/>
|
||||||
<arg value="--module-source-path"/>
|
<arg value="--module-source-path"/>
|
||||||
<arg value="${nashorn.module.src.dir}"/>
|
<arg value="."/>
|
||||||
<arg value="${javadoc.option}"/>
|
<arg value="${javadoc.option}"/>
|
||||||
<classpath>
|
|
||||||
<pathelement location="${build.classes.dir}"/>
|
|
||||||
</classpath>
|
|
||||||
<fileset dir="${nashorn.module.src.dir}" includes="jdk/nashorn/api/**/*.java"/>
|
<fileset dir="${nashorn.module.src.dir}" includes="jdk/nashorn/api/**/*.java"/>
|
||||||
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
|
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
|
||||||
</javadoc>
|
</javadoc>
|
||||||
@ -309,30 +309,22 @@
|
|||||||
<javadoc destdir="${dist.dynalinkapi.javadoc.dir}" use="yes"
|
<javadoc destdir="${dist.dynalinkapi.javadoc.dir}" use="yes"
|
||||||
windowtitle="Dynalink"
|
windowtitle="Dynalink"
|
||||||
additionalparam="-quiet" failonerror="true" useexternalfile="true">
|
additionalparam="-quiet" failonerror="true" useexternalfile="true">
|
||||||
|
<arg value="--patch-module"/>
|
||||||
|
<arg value="jdk.scripting.nashorn=${basedir}/${nashorn.module.src.dir}"/>
|
||||||
|
<arg value="--patch-module"/>
|
||||||
|
<arg value="jdk.dynalink=${basedir}/${dynalink.module.src.dir}"/>
|
||||||
<arg value="--module-source-path"/>
|
<arg value="--module-source-path"/>
|
||||||
<arg value="${dynalink.module.src.dir}"/>
|
<arg value="."/>
|
||||||
<arg value="${javadoc.option}"/>
|
<arg value="${javadoc.option}"/>
|
||||||
<classpath>
|
<fileset dir="${dynalink.module.src.dir}" includes="**/*.java"/>
|
||||||
<pathelement location="${build.classes.dir}"/>
|
|
||||||
</classpath>
|
|
||||||
<fileset dir="${dynalink.module.src.dir}" includes="**/*.java" excludes="jdk/dynalink/internal/*.java"/>
|
|
||||||
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
|
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
|
||||||
</javadoc>
|
</javadoc>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="javadocapi" depends="nashornapi, dynalinkapi"/>
|
<target name="javadocapi" depends="nashornapi, dynalinkapi"/>
|
||||||
|
|
||||||
<!-- generate shell.html for shell tool documentation -->
|
|
||||||
<target name="shelldoc" depends="jar">
|
|
||||||
<java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
|
|
||||||
<jvmarg line="${nashorn.override.option}"/>
|
|
||||||
<arg value="-scripting"/>
|
|
||||||
<arg value="docs/genshelldoc.js"/>
|
|
||||||
</java>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- generate all docs -->
|
<!-- generate all docs -->
|
||||||
<target name="docs" depends="javadoc, shelldoc"/>
|
<target name="docs" depends="javadoc"/>
|
||||||
|
|
||||||
<!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
|
<!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
|
||||||
<target name="dist" depends="jar">
|
<target name="dist" depends="jar">
|
||||||
@ -614,7 +606,7 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" {
|
|||||||
</testng>
|
</testng>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test" depends="prepare, test-pessimistic, test-optimistic"/>
|
<target name="test" depends="prepare, javadoc, test-pessimistic, test-optimistic"/>
|
||||||
|
|
||||||
<target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
|
<target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
|
||||||
<echo message="Running test suite in OPTIMISTIC mode..."/>
|
<echo message="Running test suite in OPTIMISTIC mode..."/>
|
||||||
@ -752,7 +744,7 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" {
|
|||||||
|
|
||||||
<target name="run" depends="jar"
|
<target name="run" depends="jar"
|
||||||
description="Run the shell with a sample script">
|
description="Run the shell with a sample script">
|
||||||
<java classname="${nashorn.shell.tool}" fork="true" dir="samples">
|
<java classname="${nashorn.shell.tool}" fork="true" dir="${basedir}/src/sample/nashorn">
|
||||||
<jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
|
<jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
|
||||||
<arg value="-dump-on-error"/>
|
<arg value="-dump-on-error"/>
|
||||||
<arg value="test.js"/>
|
<arg value="test.js"/>
|
||||||
@ -761,7 +753,7 @@ grant codeBase "file:/${basedir}/${test.script.dir}/basic/JDK-8158467.js" {
|
|||||||
|
|
||||||
<target name="debug" depends="jar"
|
<target name="debug" depends="jar"
|
||||||
description="Debug the shell with a sample script">
|
description="Debug the shell with a sample script">
|
||||||
<java classname="${nashorn.shell.tool}" fork="true" dir="samples">
|
<java classname="${nashorn.shell.tool}" fork="true" dir="${basedir}/src/sample/nashorn">
|
||||||
<jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
|
<jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
|
||||||
<arg value="--print-code"/>
|
<arg value="--print-code"/>
|
||||||
<arg value="--verify-code"/>
|
<arg value="--verify-code"/>
|
||||||
|
@ -60,7 +60,7 @@ nashorn.override.option=\
|
|||||||
--patch-module jdk.dynalink=${build.classes.dir}/jdk.dynalink
|
--patch-module jdk.dynalink=${build.classes.dir}/jdk.dynalink
|
||||||
|
|
||||||
# project directory of <nashorn> ant task
|
# project directory of <nashorn> ant task
|
||||||
nashorntask.dir=buildtools/nashorntask
|
nashorntask.dir=${nashorn.make.dir}/buildtools/nashorntask
|
||||||
|
|
||||||
# nashorn Shell tool
|
# nashorn Shell tool
|
||||||
nashorn.shell.tool=jdk.nashorn.tools.Shell
|
nashorn.shell.tool=jdk.nashorn.tools.Shell
|
||||||
|
Loading…
Reference in New Issue
Block a user