Fri, 19 Apr 2013 17:22:36 +0200
8010495: Update JAXP NetBeans project - add support for generating javadoc
Summary: Make it possible to use NetBeans to edit the jaxp sources and to generate a preview of the associated javadoc.
Reviewed-by: joehw, alanb
build.xml | file | annotate | diff | comparison | revisions | |
nbproject/project.xml | file | annotate | diff | comparison | revisions |
1.1 --- a/build.xml Wed Apr 17 15:23:19 2013 +0200 1.2 +++ b/build.xml Fri Apr 19 17:22:36 2013 +0200 1.3 @@ -176,4 +176,42 @@ 1.4 <echo message="+---------------------------------------+"/> 1.5 </target> 1.6 1.7 + <target name="javadoc" depends="init" description="Build basic Javadoc for public packages."> 1.8 + <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project --> 1.9 + <!-- Note: even with this default value, includes/excludes 1.10 + from share.src.dir get javadoc'd; see packageset below --> 1.11 + <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project --> 1.12 + <property name="javadoc.dir" value="${build.dir}/docs/api"/> 1.13 + <property name="includes" value="**"/> 1.14 + <javadoc destdir="${javadoc.dir}" source="1.5" 1.15 + windowtitle="UNOFFICIAL" failonerror="true" use="true" 1.16 + author="false" version="false" 1.17 + packagenames="${javadoc.packagenames}"> 1.18 + <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header> 1.19 + <arg line="${javadoc.options}"/> 1.20 + <bootclasspath> 1.21 + <path location="${java.home}/lib/rt.jar"/> 1.22 + <path location="${build.classes.dir}"/> 1.23 + </bootclasspath> 1.24 + <sourcepath> 1.25 + <pathelement location="${jaxp.src.dir}"/> 1.26 + </sourcepath> 1.27 + <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> --> 1.28 + <!-- means that {@link some.package} will not work, which is no good. --> 1.29 + <!-- (It correctly skips excluded single classes, but not if packageset is also included, --> 1.30 + <!-- which also causes duplicates in the class index for included files.) --> 1.31 + <packageset dir="${jaxp.src.dir}" includes="${includes}" excludes="${excludes}"> 1.32 + <or> 1.33 + <filename name="javax/"/> 1.34 + <filename name="org/w3c/"/> 1.35 + <filename name="org/xml/sax/"/> 1.36 + </or> 1.37 + </packageset> 1.38 + </javadoc> 1.39 + </target> 1.40 + <target name="javadoc-nb" depends="javadoc" if="netbeans.home"> 1.41 + <property name="javadoc.dir=" value="${build.dir}/docs/api"/> 1.42 + <nbbrowse file="${javadoc.dir}/index.html"/> 1.43 + </target> 1.44 + 1.45 </project>
2.1 --- a/nbproject/project.xml Wed Apr 17 15:23:19 2013 +0200 2.2 +++ b/nbproject/project.xml Fri Apr 19 17:22:36 2013 +0200 2.3 @@ -15,6 +15,12 @@ 2.4 <location>.</location> 2.5 <encoding>UTF-8</encoding> 2.6 </source-folder> 2.7 + <source-folder> 2.8 + <label>src</label> 2.9 + <type>java</type> 2.10 + <location>src</location> 2.11 + <encoding>UTF-8</encoding> 2.12 + </source-folder> 2.13 </folders> 2.14 <ide-actions> 2.15 <action name="build"> 2.16 @@ -27,9 +33,16 @@ 2.17 <target>clean</target> 2.18 <target>build</target> 2.19 </action> 2.20 + <action name="javadoc"> 2.21 + <target>javadoc-nb</target> 2.22 + </action> 2.23 </ide-actions> 2.24 <view> 2.25 <items> 2.26 + <source-folder style="packages"> 2.27 + <label>src</label> 2.28 + <location>src</location> 2.29 + </source-folder> 2.30 <source-file> 2.31 <location>build.xml</location> 2.32 </source-file> 2.33 @@ -38,11 +51,16 @@ 2.34 <ide-action name="build"/> 2.35 <ide-action name="rebuild"/> 2.36 <ide-action name="clean"/> 2.37 + <ide-action name="javadoc"/> 2.38 </context-menu> 2.39 </view> 2.40 <subprojects/> 2.41 </general-data> 2.42 - <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1"/> 2.43 + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1"> 2.44 + <compilation-unit> 2.45 + <package-root>src</package-root> 2.46 + </compilation-unit> 2.47 + </java-data> 2.48 <preferences xmlns="http://www.netbeans.org/ns/auxiliary-configuration-preferences/1"> 2.49 <module name="org-netbeans-modules-editor-indent"/> 2.50 </preferences>