| <?xml version="1.0" encoding="UTF-8"?> |
| <project name="PTP ISV Doc Build" default="all" basedir="."> |
| |
| <property file="${basedir}/buildDoc.properties"/> |
| |
| <target name="all"> |
| <antcall target="convertSchemaToHtml" /> |
| <antcall target="generateJavadoc" /> |
| </target> |
| |
| <target name="convertSchemaToHtml" if="eclipse.running"> |
| <property name="dest" value="reference/extension-points" /> |
| <pde.convertSchemaToHTML manifest="../../debug/org.eclipse.ptp.debug.core/plugin.xml" destination="${dest}" /> |
| <pde.convertSchemaToHTML manifest="../../debug/org.eclipse.ptp.debug.sdm.core/plugin.xml" destination="${dest}" /> |
| <pde.convertSchemaToHTML manifest="../../debug/org.eclipse.ptp.debug.ui/plugin.xml" destination="${dest}" /> |
| <pde.convertSchemaToHTML manifest="../../rdt/org.eclipse.ptp.rdt.sync.core/plugin.xml" destination="${dest}" /> |
| <pde.convertSchemaToHTML manifest="../../rdt/org.eclipse.ptp.rdt.sync.ui/plugin.xml" destination="${dest}" /> |
| </target> |
| |
| <target name="getJavadocPath"> |
| <available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/> |
| <available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" /> |
| </target> |
| |
| <target name="generateJavadoc" depends="getJavadocPath"> |
| <!-- replace "\n;" with platform-dependent list entry delimiter --> |
| <property name="optionsFile" value="options.tmp.txt" /> |
| <copy file="options.txt" tofile="${optionsFile}" overwrite="true"> |
| <filterchain> |
| <expandproperties/> |
| </filterchain> |
| </copy> |
| |
| <condition property="argsListDelimiter" value=":"> |
| <os family="unix" /> |
| </condition> |
| <condition property="argsListDelimiter" value=";"> |
| <os family="windows" /> |
| </condition> |
| |
| <replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" /> |
| <replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}" /> |
| |
| <!-- expand _* to actual version --> |
| <!-- prepare ${replaceFile} with all files and folders from workspace --> |
| <fileset dir="${basedir}/${dependency.dir}" id="fileSet"> |
| <include name="*"/> |
| </fileset> |
| <dirset dir="${basedir}/${dependency.dir}" id="dirSet"> |
| <include name="*"/> |
| </dirset> |
| <pathconvert property="fileList" refid="fileSet" dirsep="/" pathsep="
"/> |
| <pathconvert property="dirList" refid="dirSet" dirsep="/" pathsep="
"/> |
| <property name="replaceFile" value="options.replace.txt" /> |
| <echo file="${basedir}/${replaceFile}">${fileList}

${dirList}

</echo> |
| |
| <echo>org.eclipse.ptp.doc.isv/buildDoc.xml - generateJavadoc: |
| ${basedir}/${replaceFile} before _* expansion:</echo> |
| <concat><filelist files="${basedir}/${replaceFile}"></filelist></concat> |
| |
| <!-- strip away leading path --> |
| <replaceregexp file="${basedir}/${replaceFile}" flags="g" match="(?m)^.*/([^/]*)$$" replace="\1" /> |
| <!-- remove lines without version pattern "[_-]\d+\.\d+\.\d+"; version pattern is a workaround for bug 402392 --> |
| <replaceregexp file="${basedir}/${replaceFile}" flags="g" match="(?m)^(.*[-_]\d+\.\d+\.\d+.*)|(.*)$$" replace="\1" /> |
| <!-- create "<aa>_*[.jar]=<aa><version>[.jar]" property for lines with a version --> |
| <replaceregexp file="${basedir}/${replaceFile}" flags="g" match="(?m)^(.*)[-_]\d+\.\d+\.\d+.*?(.jar)?$$" replace="\1_*\2=\0" /> |
| |
| <echo>${basedir}/${replaceFile} after _* expansion:</echo> |
| <concat><filelist files="${basedir}/${replaceFile}"></filelist></concat> |
| |
| <!-- workaround for bug 402392, which can make the ${replaceFile} end up empty: --> |
| <echo file="${basedir}/${replaceFile}" append="true">dummyForBug402392=dummyForBug402392
</echo> |
| |
| <replace file="${basedir}/${optionsFile}" replacefilterfile="${basedir}/${replaceFile}"/> |
| |
| <echo>${basedir}/${optionsFile} after _* expansion:</echo> |
| <concat><filelist files="${basedir}/${optionsFile}"></filelist></concat> |
| |
| <!--scrub isv plugin directories of any preexisting api doc content--> |
| <delete dir="reference/api"/> |
| <mkdir dir="reference/api"/> |
| |
| <exec dir="." executable="${javadoc}" output="doc.bin.log"> |
| <arg line="@${basedir}/${optionsFile} -J-Xmx1000M" /> |
| </exec> |
| |
| <!--workaround for bug 409511, bug 101048--> |
| <replace dir="reference/api" token="='/../misc/api-usage-rules.html" value="='./../misc/api-usage-rules.html"> |
| <include name="*.htm*" /> |
| </replace> |
| |
| </target> |
| </project> |
| |
| |
| |