blob: 1ddff471d8a1a28fee41f4b7dc3a88984c04ad38 [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"
50 depends="getcommandandargs, getSkipJavaDocParam"
51 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_williams1ef64562007-12-12 06:54:07 +0000136 <target
137 name="getcommandandargs"
138 depends="assignEnv">
139 <!-- three options, in order
140 1. passed into us as an ant parameter already
141 1. set in environment (assume for now if one is set in env., they both are)
142 3. we'll come up with reasonable default
143 -->
144 <!-- if not otherwise set above (in assignEnv), or passed in, assign some reasonable default, especially
145 to work on production build machine -->
146 <property
147 name="JAVADOC_COMMAND"
148 value="${env.JAVA_5_HOME}/bin/javadoc" />
149 <property
150 name="JAVADOC_ARGS"
151 value="-J-Xms256m -J-Xmx1024m" />
david_williams20852f32007-12-10 18:47:22 +0000152
david_williams1ef64562007-12-12 06:54:07 +0000153 </target>
154
155 <target
156 name="assignEnv"
157 if="env.JAVADOC_COMMAND">
158 <property
159 name="JAVADOC_COMMAND"
160 value="$(env.JAVADOC_COMMAND}" />
161 <property
162 name="JAVADOC_ARGS"
163 value="$(env.JAVADOC_ARGS}" />
164 </target>
165 <target
166 name="getSkipJavaDocParam"
167 if="skipJavaDoc">
168 <echo message="skipJavaDoc: ${skipJavaDoc}" />
169 <condition property="doskipJavaDoc">
170 <equals
171 arg1="${skipJavaDoc}"
172 arg2="true"
173 trim="true"
174 casesensitive="false" />
175 </condition>
176 </target>
lmandel3a4ece92005-07-11 20:05:31 +0000177</project>