192 classpath="${dist.jar}${path.separator}${javac.classpath}"
193 debug="${javac.debug}"
194 encoding="${javac.encoding}"
195 includeantruntime="false">
196 </javac>
197 <jar jarfile="${fxshell.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
198 <fileset dir="${fxshell.classes.dir}"/>
199 <manifest>
200 <attribute name="Archiver-Version" value="n/a"/>
201 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
202 <attribute name="Built-By" value="n/a"/>
203 <attribute name="Created-By" value="Ant jar task"/>
204 <section name="jdk/nashorn/">
205 <attribute name="Implementation-Title" value="Oracle Nashorn FXShell"/>
206 <attribute name="Implementation-Version" value="${nashorn.version}"/>
207 </section>
208 </manifest>
209 </jar>
210 </target>
211
212 <target name="javadoc" depends="jar">
213 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
214 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
215 additionalparam="-quiet" failonerror="true">
216 <classpath>
217 <pathelement location="${build.classes.dir}"/>
218 </classpath>
219 <fileset dir="${src.dir}" includes="**/*.java"/>
220 <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
221 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
222 <!-- The following tags are used only in ASM sources - just ignore these -->
223 <tag name="label" description="label tag in ASM sources" enabled="false"/>
224 <tag name="linked" description="linked tag in ASM sources" enabled="false"/>
225 <tag name="associates" description="associates tag in ASM sources" enabled="false"/>
226 </javadoc>
227 </target>
228
229 <!-- generate javadoc only for nashorn extension api classes -->
230 <target name="javadocapi" depends="jar">
231 <javadoc destdir="${dist.javadoc.dir}" use="yes" extdirs="${nashorn.ext.path}"
232 windowtitle="${nashorn.product.name}" additionalparam="-quiet" failonerror="true">
233 <classpath>
234 <pathelement location="${build.classes.dir}"/>
235 </classpath>
236 <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
237 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
238 </javadoc>
239 </target>
240
241
242 <!-- generate shell.html for shell tool documentation -->
243 <target name="shelldoc" depends="jar">
244 <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
245 <jvmarg line="${ext.class.path}"/>
246 <arg value="-scripting"/>
247 <arg value="docs/genshelldoc.js"/>
248 </java>
249 </target>
250
251 <!-- generate all docs -->
252 <target name="docs" depends="javadoc, shelldoc"/>
253
254 <!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
255 <target name="dist" depends="jar">
256 <zip destfile="${build.zip}" basedir=".."
257 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
258 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
259 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
260 </target>
261
443 <testng outputdir="${build.test.results.dir}/${testResultsSubDir}" classfilesetref="test.classes"
444 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
445 <jvmarg line="${ext.class.path}"/>
446 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
447 <jvmarg line="${debug.test.jvmargs}"/>
448 <propertyset>
449 <propertyref prefix="nashorn."/>
450 </propertyset>
451 <propertyset>
452 <propertyref prefix="test-sys-prop."/>
453 <mapper from="test-sys-prop.*" to="*" type="glob"/>
454 </propertyset>
455 <sysproperty key="optimistic.override" value="${optimistic}"/>
456 <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
457 <classpath>
458 <pathelement path="${run.test.classpath}"/>
459 </classpath>
460 </testng>
461 </target>
462
463 <target name="test" depends="get-testng, javadoc, test-pessimistic, test-optimistic"/>
464
465 <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
466 <echo message="Running test suite in OPTIMISTIC mode..."/>
467 <antcall target="-test-nosecurity" inheritRefs="true">
468 <param name="optimistic" value="true"/>
469 <param name="testResultsSubDir" value="optimistic"/>
470 </antcall>
471 <antcall target="-test-security" inheritRefs="true">
472 <param name="optimistic" value="true"/>
473 <param name="testResultsSubDir" value="optimistic"/>
474 </antcall>
475 </target>
476
477 <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
478 <echo message="Running test suite in PESSIMISTIC mode..."/>
479 <antcall target="-test-nosecurity" inheritRefs="true">
480 <param name="optimistic" value="false"/>
481 <param name="testResultsSubDir" value="pessimistic"/>
482 </antcall>
483 <antcall target="-test-security" inheritRefs="true">
|
192 classpath="${dist.jar}${path.separator}${javac.classpath}"
193 debug="${javac.debug}"
194 encoding="${javac.encoding}"
195 includeantruntime="false">
196 </javac>
197 <jar jarfile="${fxshell.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
198 <fileset dir="${fxshell.classes.dir}"/>
199 <manifest>
200 <attribute name="Archiver-Version" value="n/a"/>
201 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
202 <attribute name="Built-By" value="n/a"/>
203 <attribute name="Created-By" value="Ant jar task"/>
204 <section name="jdk/nashorn/">
205 <attribute name="Implementation-Title" value="Oracle Nashorn FXShell"/>
206 <attribute name="Implementation-Version" value="${nashorn.version}"/>
207 </section>
208 </manifest>
209 </jar>
210 </target>
211
212 <!-- generate javadoc for all Nashorn and ASM classes -->
213 <target name="javadoc" depends="jar">
214 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
215 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
216 additionalparam="-quiet" failonerror="true" useexternalfile="true">
217 <classpath>
218 <pathelement location="${build.classes.dir}"/>
219 </classpath>
220 <fileset dir="${src.dir}" includes="**/*.java"/>
221 <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
222 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
223 <!-- The following tags are used only in ASM sources - just ignore these -->
224 <tag name="label" description="label tag in ASM sources" enabled="false"/>
225 <tag name="linked" description="linked tag in ASM sources" enabled="false"/>
226 <tag name="associates" description="associates tag in ASM sources" enabled="false"/>
227 </javadoc>
228 </target>
229
230 <!-- generate javadoc for Nashorn classes -->
231 <target name="javadocnh" depends="jar">
232 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
233 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
234 additionalparam="-quiet" failonerror="true" useexternalfile="true">
235 <classpath>
236 <pathelement location="${build.classes.dir}"/>
237 </classpath>
238 <fileset dir="${src.dir}" includes="**/*.java"/>
239 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
240 </javadoc>
241 </target>
242
243 <!-- generate javadoc only for nashorn extension api classes -->
244 <target name="javadocapi" depends="jar">
245 <javadoc destdir="${dist.javadoc.dir}" use="yes" extdirs="${nashorn.ext.path}"
246 windowtitle="${nashorn.product.name}" additionalparam="-quiet" failonerror="true" useexternalfile="true">
247 <classpath>
248 <pathelement location="${build.classes.dir}"/>
249 </classpath>
250 <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
251 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
252 </javadoc>
253 </target>
254
255 <!-- generate shell.html for shell tool documentation -->
256 <target name="shelldoc" depends="jar">
257 <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
258 <jvmarg line="${ext.class.path}"/>
259 <arg value="-scripting"/>
260 <arg value="docs/genshelldoc.js"/>
261 </java>
262 </target>
263
264 <!-- generate all docs -->
265 <target name="docs" depends="javadoc, shelldoc"/>
266
267 <!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
268 <target name="dist" depends="jar">
269 <zip destfile="${build.zip}" basedir=".."
270 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
271 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
272 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
273 </target>
274
456 <testng outputdir="${build.test.results.dir}/${testResultsSubDir}" classfilesetref="test.classes"
457 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
458 <jvmarg line="${ext.class.path}"/>
459 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
460 <jvmarg line="${debug.test.jvmargs}"/>
461 <propertyset>
462 <propertyref prefix="nashorn."/>
463 </propertyset>
464 <propertyset>
465 <propertyref prefix="test-sys-prop."/>
466 <mapper from="test-sys-prop.*" to="*" type="glob"/>
467 </propertyset>
468 <sysproperty key="optimistic.override" value="${optimistic}"/>
469 <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
470 <classpath>
471 <pathelement path="${run.test.classpath}"/>
472 </classpath>
473 </testng>
474 </target>
475
476 <target name="test" depends="get-testng, javadocnh, test-pessimistic, test-optimistic"/>
477
478 <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
479 <echo message="Running test suite in OPTIMISTIC mode..."/>
480 <antcall target="-test-nosecurity" inheritRefs="true">
481 <param name="optimistic" value="true"/>
482 <param name="testResultsSubDir" value="optimistic"/>
483 </antcall>
484 <antcall target="-test-security" inheritRefs="true">
485 <param name="optimistic" value="true"/>
486 <param name="testResultsSubDir" value="optimistic"/>
487 </antcall>
488 </target>
489
490 <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
491 <echo message="Running test suite in PESSIMISTIC mode..."/>
492 <antcall target="-test-nosecurity" inheritRefs="true">
493 <param name="optimistic" value="false"/>
494 <param name="testResultsSubDir" value="pessimistic"/>
495 </antcall>
496 <antcall target="-test-security" inheritRefs="true">
|