blob: 674b45e1d948079b9c2c0b347458d5947c683e7f [file] [log] [blame]
lmandelfe13d292005-07-11 19:53:21 +00001<?xml version="1.0" encoding="UTF-8"?>
2
david_williamsa56a4fd2007-06-30 04:09:00 +00003<project
david_williams1ef64562007-12-12 06:54:07 +00004 name="javadoc"
david_williamsa56a4fd2007-06-30 04:09:00 +00005 default="main"
6 basedir=".">
lmandelfe13d292005-07-11 19:53:21 +00007
david_williams1ef64562007-12-12 06:54:07 +00008 <!-- = = = standard properties pattern = = = -->
9 <!--
10 First get environment variables
11 Note to be cross-platform, "environment variables" are only appropriate for
12 some variables, e.g. ones we set, since properties are case sensitive, even if
13 the environment variables on your operating system are not, e.g. it will
14 be ${env.Path} not ${env.PATH} on Windows -->
15 <property environment="env" />
lmandelfe13d292005-07-11 19:53:21 +000016
david_williams1ef64562007-12-12 06:54:07 +000017 <!--
18 Let users override standard properties, if desired.
19 If this directory/files does not exist, then it will be ignored,
20 and defaults used.
21 -->
david_williams513cfdd2007-12-09 04:34:24 +000022 <property
david_williams1ef64562007-12-12 06:54:07 +000023 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
24
25
26
david_williamsa56a4fd2007-06-30 04:09:00 +000027 <property file="javadoc.properties" />
28 <property
29 name="outputDir"
30 value="${basedir}" />
lmandelfe13d292005-07-11 19:53:21 +000031
david_williamsa56a4fd2007-06-30 04:09:00 +000032 <target
33 name="main"
34 depends="prephtml, javadoc, packagetoc"
35 description="Builds Plugin Javadoc" />
lmandelfe13d292005-07-11 19:53:21 +000036
david_williamsa56a4fd2007-06-30 04:09:00 +000037 <target
38 name="prephtml"
39 description="Transforms XML to HTML.">
40 <xslt
41 style="javadoc.xsl"
42 destdir=".."
43 basedir=".."
44 includes="**/overview.xml,**/package.xml"
45 excludes="**/build/*,**/@dot/**,**/bin**" />
46 </target>
lmandelfe13d292005-07-11 19:53:21 +000047
david_williams1ef64562007-12-12 06:54:07 +000048 <target
49 name="javadoc"
david_williamsdab82c82007-12-12 09:29:45 +000050 depends="getSkipJavaDocParam"
david_williams1ef64562007-12-12 06:54:07 +000051 unless="doskipJavaDoc">
david_williams0dd79b12008-02-11 04:35:04 +000052 <echo message="classpath: ${J2SE-1.5}" />
david_williams1ef64562007-12-12 06:54:07 +000053 <echo message="buildDirectory: ${buildDirectory}" />
54
david_williamsa56a4fd2007-06-30 04:09:00 +000055
56 <mkdir dir="${outputDir}/reference/api/overview" />
57
58 <copy
59 todir="${outputDir}/reference/api/overview"
60 flatten="true">
61 <fileset dir="${basedir}/api-overview/overview/" />
62 <fileset
63 dir="${basedir}/.."
64 includes="*/javadoc-images/*.jpg" />
65 </copy>
66 <javadoc
david_williamsa56a4fd2007-06-30 04:09:00 +000067 access="public"
68 author="false"
69 destdir="${outputDir}/reference/api"
70 doctitle="${api.title}"
71 nodeprecated="false"
72 nodeprecatedlist="false"
73 noindex="false"
74 nonavbar="false"
75 notree="false"
david_williams8c18e0e2007-07-01 07:15:47 +000076 Encoding="ISO-8859-1"
david_williamsa56a4fd2007-06-30 04:09:00 +000077 overview="${basedir}/api-overview/overview.html"
78 packagenames="${api.packages}"
79 sourcepath="${plugin.sourcefolders}"
80 splitindex="true"
81 use="true"
82 version="true"
83 breakiterator="yes"
84 verbose="false"
85 failonerror="false">
david_williamsa56a4fd2007-06-30 04:09:00 +000086 <classpath>
david_williams0dd79b12008-02-11 04:35:04 +000087 <pathelement path="${J2SE-1.5}" />
david_williamsa56a4fd2007-06-30 04:09:00 +000088 <fileset dir="${buildDirectory}/../eclipse/plugins">
89 <include name="**/*.jar" />
90 </fileset>
91 <dirset dir="${buildDirectory}">
92 <include name="**/@dot/**/*.class" />
93 </dirset>
94 <dirset dir="${buildDirectory}">
95 <include name="**/bin/**/*" />
96 </dirset>
97 </classpath>
98
99 </javadoc>
100 </target>
david_williams940d2772007-07-01 06:33:40 +0000101
david_williamsa56a4fd2007-06-30 04:09:00 +0000102 <target name="packagetoc">
103 <loadfile
104 failonerror="false"
105 property="wtp.packages"
106 srcFile="${outputDir}/reference/api/package-list">
107 <filterchain>
108 <filterreader
109 classname="org.apache.tools.ant.filters.PrefixLines">
110 <param
111 name="prefix"
112 value="&lt;/package&gt;&lt;package&gt;" />
113 </filterreader>
114 <striplinebreaks />
115 </filterchain>
116 </loadfile>
117
118 <!-- Create packages.xml file -->
119 <echo file="packages.xml">
120 &lt;packages&gt;&lt;package&gt;${wtp.packages}&lt;/package&gt;&lt;/packages&gt;
121 </echo>
122
123 <xslt
124 basedir="${basedir}"
125 in="packages.xml"
126 out="javadoctoc.xml"
127 style="javadocToc.xsl">
128 <outputproperty
129 name="method"
130 value="xml" />
131 <outputproperty
132 name="indent"
133 value="yes" />
134 </xslt>
135 </target>
david_williams1ef64562007-12-12 06:54:07 +0000136 <target
david_williams1ef64562007-12-12 06:54:07 +0000137 name="getSkipJavaDocParam"
138 if="skipJavaDoc">
139 <echo message="skipJavaDoc: ${skipJavaDoc}" />
140 <condition property="doskipJavaDoc">
141 <equals
142 arg1="${skipJavaDoc}"
143 arg2="true"
144 trim="true"
145 casesensitive="false" />
146 </condition>
147 </target>
lmandelfe13d292005-07-11 19:53:21 +0000148</project>