8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
authorjjg
Tue, 15 Jul 2014 18:17:31 -0700
changeset 25606 1272de877614
parent 25605 c2d72342fe19
child 25607 9c077e7613c4
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes Reviewed-by: ksrini
langtools/make/build.xml
--- a/langtools/make/build.xml	Mon Jul 14 17:25:53 2014 -0700
+++ b/langtools/make/build.xml	Tue Jul 15 18:17:31 2014 -0700
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2007, 2014, 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
@@ -457,6 +457,46 @@
         </javac>
     </target>
 
+    <!-- Generate API docs for "important" test classes that are used by
+         multiple tests.
+    -->
+    <target name="test-framework-docs" depends="build-all-classes">
+        <javadoc executable="${target.java.home}/bin/javadoc"
+                destdir="${build.dir}/testframeworkdocs">
+            <!-- disable doclint for now; it might be good to enable -Xdoclint:missing -->
+            <arg value="-Xdoclint:none"/>
+            <!-- source files to be documented -->
+            <sourcefiles>
+                <fileset dir="${test.dir}">
+                    <include name="**/ToolBox.java"/>
+                    <include name="**/*Tester.java"/>
+                    <include name="**/*TestBase.java"/>
+                    <include name="**/*Testing*.java"/>
+                </fileset>
+            </sourcefiles>
+            <!-- source path used for documentation -->
+            <sourcepath>
+                <pathelement path="${test.dir}/lib"/>
+                <pathelement path="${test.dir}/lib/combo"/>
+                <pathelement path="${test.dir}/tools/javac/lib"/>
+                <pathelement path="${test.dir}/tools/javac/classfiles/attributes/LocalVariableTable"/>
+            </sourcepath>
+            <!-- exclude the following "packages" found by <javadoc>
+                on the sourcepath -->
+            <excludepackage name="combo.tools.javac.combo"/>
+            <excludepackage name="tools.javac.combo"/>
+            <!-- library classes used for documentation -->
+            <classpath>
+                <pathelement path="${jtreg.home}/lib/testng.jar"/>
+            </classpath>
+            <!-- platform classes used for documentation -->
+            <bootclasspath>
+                <pathelement path="${build.dir}/classes"/>
+                <pathelement path="${target.java.home}/jre/lib/rt.jar"/>
+            </bootclasspath>
+        </javadoc>
+    </target>
+
     <!--
     **** Debugging/diagnostic targets.
     -->
@@ -761,7 +801,7 @@
         <copy todir=".idea" >
             <fileset dir="make/intellij" includes="**"/>
         </copy>
-        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>               
+        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>
     </target>
 
     <!--