| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright (c) 2005, 2015 IBM Corporation and others. |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| |
| Contributors: |
| IBM Corporation - initial API and implementation |
| --> |
| |
| <project name="PDE Doc ISV Build" default="all" basedir="." > |
| |
| <property file="${basedir.properties}"/> |
| |
| <target name="init"> |
| <property environment="env" /> |
| <echo message="env.JAVA_DOC_PROXIES: ${env.JAVA_DOC_PROXIES}" /> |
| <available file="${basedir}/index" property="index.present"/> |
| </target> |
| |
| <target name="all" depends="init" unless="index.present"> |
| <antcall target="convertSchemaToHtml" /> |
| <antcall target="generateJavadoc" /> |
| <antcall target="build.index" /> |
| <!--antcall target="createDocZip" /--> |
| </target> |
| |
| <target name="build.index" description="Builds search index for the plug-in: org.eclipse.pde.doc.user." if="eclipse.running"> |
| <help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}"/> |
| </target> |
| |
| <target name="convertSchemaToHtml" if="eclipse.running"> |
| <property name="dest" value="reference/extension-points" /> |
| <record name="${basedir}/target/pdeconvert.txt" action="start"/> |
| |
| <property name="pdeSearchPath" value="${eclipse.pde.build},${eclipse.pde.ui.ui},${eclipse.pde.ui.apitools}" /> |
| <property name="jdtSearchPath" value="${eclipse.jdt.core},${eclipse.jdt.debug},${eclipse.jdt.ui}" /> |
| <property name="platformSearchPath" value="${eclipse.platform.ant},${eclipse.platform.debug},${eclipse.platform.platform},${eclipse.platform.resources.bundles},${eclipse.platform.runtime.bundles},${eclipse.platform.swt.bundles},${eclipse.platform.team.bundles},${eclipse.platform.text},${eclipse.platform.ua},${eclipse.platform.ui.bundles}" /> |
| <property name="runtimeSearchPath" value="${rt.equinox.bundles.bundles},${rt.equinox.framework.bundles},${rt.equinox.p2.bundles}" /> |
| <property name="searchPaths" value="${pdeSearchPath},${jdtSearchPath},${platformSearchPath},${runtimeSearchPath}" /> |
| |
| <pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.ui.trace/plugin.xml" destination="${dest}" additionalsearchpaths="${searchPaths}" /> |
| <pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.pde.core/plugin.xml" destination="${dest}" additionalsearchpaths="${searchPaths}" /> |
| <pde.convertSchemaToHTML manifest="${eclipse.pde.build}/org.eclipse.pde.build/plugin.xml" destination="${dest}" additionalsearchpaths="${searchPaths}" /> |
| <pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.pde.ui/plugin.xml" destination="${dest}" additionalsearchpaths="${searchPaths}" /> |
| <pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.pde.launching/plugin.xml" destination="${dest}" additionalsearchpaths="${searchPaths}" /> |
| |
| <record name="${basedir}/target/pdeconvert.txt" action="stop"/> |
| </target> |
| |
| <target name="getJavadocPath" depends="getEclipseJavadocPath" unless="javadocExecutable"> |
| <!-- WARNING: Ant bug: The <available> task overrides an already set property! https://bugs.eclipse.org/431236#c12 --> |
| <available file="${java.home}/../bin/javadoc.exe" property="javadocExecutable" value="${java.home}/../bin/javadoc.exe"/> |
| <available file="${java.home}/../bin/javadoc" property="javadocExecutable" value="${java.home}/../bin/javadoc" /> |
| |
| <available file="${java.home}/bin/javadoc.exe" property="javadocExecutable" value="${java.home}/bin/javadoc.exe"/> |
| <available file="${java.home}/bin/javadoc" property="javadocExecutable" value="${java.home}/bin/javadoc" /> |
| </target> |
| |
| <target name="getEclipseJavadocPath" unless="javadocExecutable"> |
| <!-- Use custom javadoc executable if ${eclipse.javadoc} is set --> |
| <condition property="javadocExecutable" value="${eclipse.javadoc}"> |
| <and> |
| <isset property="eclipse.javadoc"/> |
| <available file="${eclipse.javadoc}" /> |
| </and> |
| </condition> |
| </target> |
| |
| <target name="generateJavadoc" depends="getJavadocPath" if="javadocExecutable"> |
| <!-- replace "\n;" with platform-dependent list entry delimiter --> |
| <property name="optionsFile" value="target/pdeOptions.tmp.txt" /> |
| <copy file="pdeOptions.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="target/pdeOptions.replace.txt" /> |
| <echo file="${basedir}/${replaceFile}">${fileList}

${dirList}

</echo> |
| |
| <echo>org.eclipse.pde.doc.user/buildDoc.xml - generateJavadoc: |
| Using javadocExecutable: ${javadocExecutable}</echo> |
| <!-- |
| <echo>${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"/> |
| |
| <!-- if not pass in from environment, set this value to empty --> |
| <property name="env.JAVA_DOC_PROXIES" value=""/> |
| |
| <exec dir="." executable="${javadocExecutable}" output="target/doc.bin.log" timeout="600000"> |
| <arg line="@${basedir}/${optionsFile} -J-Xmx1000M ${env.JAVA_DOC_PROXIES}" /> |
| </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> |
| |
| <target name="buildJdtDoc" unless="jdt.index.present"> |
| <ant antfile="buildDoc.xml" dir="../org.eclipse.jdt.doc.isv" /> |
| </target> |
| |
| <target name="createDocZip"> |
| <zip zipfile="${basedir}/doc.zip" |
| basedir="${basedir}" |
| includes="schema.css, book.css, notices.html, about.html, concepts/**, guide/**, tips/**, reference/**, tasks/**, whatsNew/**, images/**" |
| /> |
| </target> |
| |
| </project> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |