buildDoc.xml
 1  <?xml version="1.0" encoding="UTF-8"?>
 2  <project name="Platform Doc Isv Build" default="all"  basedir="." >
 3  
 4  	<target name="init">
 5  		<available file="${basedir}/index" property="index.present"/>
 6  	</target>
 7  
 8  	<target name="all" depends="init" unless="index.present">
 9  		<antcall target="convertSchemaToHtml" />
10  		<antcall target="generateJavadoc" />
11  	</target>
12  
13  	<target name="convertSchemaToHtml" if="eclipse.running">
14  		<property name="dest" value="reference/extension-points" />
15  		<pde.convertSchemaToHTML manifest="../org.eclipsetrader.core/plugin.xml" destination="${dest}" />
16  		<pde.convertSchemaToHTML manifest="../org.eclipsetrader.core.charts/plugin.xml" destination="${dest}" />
17  		<pde.convertSchemaToHTML manifest="../org.eclipsetrader.news/plugin.xml" destination="${dest}" />
18  		<pde.convertSchemaToHTML manifest="../org.eclipsetrader.ui/plugin.xml" destination="${dest}" />
19  		<pde.convertSchemaToHTML manifest="../org.eclipsetrader.ui.charts/plugin.xml" destination="${dest}" />
20  		<pde.convertSchemaToHTML manifest="../org.eclipsetrader.ui.charts.indicators/plugin.xml" destination="${dest}" />
21  	</target>
22  
23  	<target name="getJavadocPath">
24  		<available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/>
25  		<available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
26  	</target>
27  
28  	<target name="generateJavadoc" depends="getJavadocPath" if="javadoc">
29  
30  		<property name="optionsFile" value="platformOptions.tmp.txt" />
31  		<copy file="platformOptions.txt" tofile="${optionsFile}" overwrite="true" />
32  		
33  		<condition property="argsListDelimiter" value=":">
34  			<os family="unix" />
35  		</condition>
36  		<condition property="argsListDelimiter" value=";">
37  			<os family="windows" />
38  		</condition>
39  		
40  		<replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />
41  		<replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}" />
42  
43  		<!--scrub isv plugin directories of any preexisting api doc content-->
44  		<delete dir="reference/api"/>
45  		<mkdir dir="reference/api"/>
46  
47  		<exec dir="." executable="${javadoc}" output="doc.bin.log">
48  			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
49  		</exec>
50  		
51  		<!--workaround for bug 101048-->
52  		<replace dir="reference/api" token="=&quot;/../misc/api-usage-rules.html" value="=&quot;./../misc/api-usage-rules.html">
53  			<include name="*htm*" />
54  		</replace>
55  
56  		<delete file="${basedir}/${optionsFile}"/>
57  	</target>
58  </project>