blob: c17882d8b87f351b2b9472f78f580a83eb1d5582 [file] [log] [blame]
lmandel3a4ece92005-07-11 20:05:31 +00001<?xml version="1.0" encoding="UTF-8"?>
2
david_williams940d2772007-07-01 06:33:40 +00003<project
david_williams1ef64562007-12-12 06:54:07 +00004 name="javadoc"
david_williams940d2772007-07-01 06:33:40 +00005 default="main"
6 basedir=".">
lmandel3a4ece92005-07-11 20:05:31 +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" />
david_williams513cfdd2007-12-09 04:34:24 +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
david_williams513cfdd2007-12-09 04:34:24 +000025
lmandel3a4ece92005-07-11 20:05:31 +000026
david_williams940d2772007-07-01 06:33:40 +000027 <property file="javadoc.properties" />
28 <property
29 name="outputDir"
30 value="${basedir}" />
lmandel3a4ece92005-07-11 20:05:31 +000031
david_williams940d2772007-07-01 06:33:40 +000032 <target
33 name="main"
34 depends="prephtml, javadoc, packagetoc"
35 description="Builds Plugin Javadoc" />
36
37 <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>
lmandel3a4ece92005-07-11 20:05:31 +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_williams20852f32007-12-10 18:47:22 +000052 <echo message="classpath: ${env.J2SE-1.5}" />
david_williams940d2772007-07-01 06:33:40 +000053 <echo message="buildDirectory: ${buildDirectory}" />
david_williams1ef64562007-12-12 06:54:07 +000054
lmandel3a4ece92005-07-11 20:05:31 +000055
david_williams940d2772007-07-01 06:33:40 +000056 <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_williams940d2772007-07-01 06:33:40 +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_williams940d2772007-07-01 06:33:40 +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_williams940d2772007-07-01 06:33:40 +000086 <classpath>
david_williams20852f32007-12-10 18:47:22 +000087 <pathelement path="${env.J2SE-1.5}" />
david_williams940d2772007-07-01 06:33:40 +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>
101
102 <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_williamsdab82c82007-12-12 09:29:45 +0000136
david_williams1ef64562007-12-12 06:54:07 +0000137 <target
138 name="getSkipJavaDocParam"
139 if="skipJavaDoc">
140 <echo message="skipJavaDoc: ${skipJavaDoc}" />
141 <condition property="doskipJavaDoc">
142 <equals
143 arg1="${skipJavaDoc}"
144 arg2="true"
145 trim="true"
146 casesensitive="false" />
147 </condition>
148 </target>
lmandel3a4ece92005-07-11 20:05:31 +0000149</project>