001 <project name="Standard Operations"
002 default="standard.noop"
003 basedir=".">
004
005 <description>
006 Standard Operations
007 </description>
008
009 <!-- Noop =================================================================-->
010
011 <target name="standard.noop"
012 description="Do nothing">
013 </target>
014
015 <!-- Visualise ============================================================-->
016
017 <target name="standard.viz"
018 description="Create flow of build file">
019 <taskdef name="vizant" classname="net.sourceforge.vizant.Vizant"/>
020 <vizant antfile="${ant}/build.xml" outfile="${doc}/build.dot"/>
021 <exec executable="dot">
022 <arg line="-Tpng ${doc}/build.dot -o ${doc}/build.png"/>
023 </exec>
024 </target>
025
026 <!-- FindBugs =============================================================-->
027
028 <target name="standard.findbugs"
029 description="Find Potential Bugs">
030 <pathconvert targetos="unix" property="classpath.run" refid="classpath.run"/>
031 <exec executable="${FindBugs.exe}">
032 <arg value="-textui"/>
033 <arg value="-low"/>
034 <arg value="-auxclasspath"/>
035 <arg value="${classpath.run}"/>
036 <arg value="${lib}/${name}.jar"/>
037 </exec>
038 </target>
039
040 <target name="standard.findbugs.jar"
041 description="Find Potential Bugs (in non-default jar)">
042 <pathconvert targetos="unix" property="classpath.run" refid="classpath.run"/>
043 <exec executable="${FindBugs.exe}">
044 <arg value="-textui"/>
045 <arg value="-low"/>
046 <arg value="-auxclasspath"/>
047 <arg value="${classpath.run}"/>
048 <arg value="${lib}/${name}${jar.name}.jar"/>
049 </exec>
050 </target>
051
052 <!-- UmlGraph =============================================================-->
053
054 <target name="standard.uml"
055 description="Create UML Graph">
056 <pathconvert targetos="unix" property="classpath.run" refid="classpath.run"/>
057 <apply executable="javadoc" dest="${build}" parallel="false">
058 <arg value="-classpath"/>
059 <arg value="${classpath.run}"/>
060 <arg value="-source"/>
061 <arg value="1.5"/>
062 <arg value="-docletpath"/>
063 <arg value="${UmlGraph.core}"/>
064 <arg line="-doclet UmlGraph"/>
065 <arg value="-all"/>
066 <arg value="-output"/>
067 <targetfile/>
068 <srcfile/>
069 <fileset dir="${src}"/>
070 <mapper type="glob" from="*.java" to="*.dot"/>
071 </apply>
072 <apply executable="dot" dest="${build}" parallel="false">
073 <arg value="-Tgif"/>
074 <arg value="-o"/>
075 <targetfile/>
076 <srcfile/>
077 <fileset dir="${build}"/>
078 <mapper type="glob" from="*.dot" to="*.gif"/>
079 </apply>
080 <copy todir="${doc}/UML" flatten="true">
081 <fileset dir="${build}" includes="**/*.gif"/>
082 <fileset dir="${build}" includes="**/*.ps"/>
083 </copy>
084 <echo file="${doc}/UML/imagedir.sh" append="false">
085 #/bin/sh
086 cd ${doc}/UML
087 rm -f index.html
088 echo "<ul>" >> index.html
089 for I in `ls *.gif`; do
090 N=`basename $I .gif`
091 echo $N
092 echo "<li><A HREF=$I>$N</A></li>" >> index.html
093 done
094 echo "</ul>" >> index.html
095 </echo>
096 <chmod dir="${doc}/UML" perm="a+rx" includes="imagedir.sh"/>
097 <exec executable="${doc}/UML/imagedir.sh"/>
098 </target>
099
100 <!-- AspectJ ==============================================================-->
101
102 <target name="standard.aspectj"
103 description="Compile using AspectJ">
104 <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"/>
105 <iajc srcdir="${src}"
106 destDir="${build}">
107 <classpath>
108 <pathelement location="${AspectJ.rt}"/>
109 </classpath>
110 </iajc>
111 </target>
112
113 <!-- Info =================================================================-->
114
115 <target name="standard.info"
116 description="Create Info class">
117 <mkdir dir="${place}"/>
118 <echo file="${place}/Info.java" append="false">
119 package ${package};
120
121 /** <code>Info</code> class.
122 * Created by Ant. */
123 public class Info {
124
125 /** Get builder version.
126 * @return The version and build time of the package. */
127 final static String version() {
128 return _version + " [" + _build + "]";
129 }
130
131 private static final String _version = "${version}";
132
133 private static final String _build = "${TSTAMP}";
134
135 }
136 </echo>
137 </target>
138
139 <!-- Init =================================================================-->
140
141 <target name="standard.init">
142 <mkdir dir="${build}"/>
143 <mkdir dir="${lib}"/>
144 <mkdir dir="${run}"/>
145 <mkdir dir="${doc}/JavaDoc"/>
146 <mkdir dir="${doc}/Src"/>
147 <mkdir dir="${doc}/Together"/>
148 <mkdir dir="${bin}"/>
149 <mkdir dir="${etc}"/>
150 <mkdir dir="${misc}"/>
151 <mkdir dir="${tog}"/>
152 <mkdir dir="${jude}"/>
153 </target>
154
155 <!-- Post =================================================================-->
156
157 <target name="standard.post"
158 description="Put on WWW"
159 if="local">
160 <property name="www" value="/home/hrivnac/WWW/Activities/Packages"/>
161 <copy todir="${www}">
162 <fileset dir="${top}">
163 <include name="${name}-dist.tar.gz"/>
164 </fileset>
165 </copy>
166 <copy todir="${www}/${name}">
167 <fileset dir="${top}/doc">
168 <include name="**/*"/>
169 </fileset>
170 </copy>
171 <delete file="${top}/${name}-dist.tar.gz">
172 </delete>
173 </target>
174
175 <!-- Compile ==============================================================-->
176
177 <target name="standard.compile"
178 description="Compile sources">
179 <antcall target="standard.compile.${java.version}"
180 inheritAll="yes"
181 inheritRefs="yes"/>
182 </target>
183
184 <target name="standard.compile.1.5.0-beta"
185 description="Compile 1.5 sources using 1.5 SDK">
186 <javac destdir="${build}"
187 debug="yes"
188 optimize="yes"
189 source="1.5">
190 <compilerarg value="-Xlint:unchecked"/>
191 <!--compilerarg value="-Xlint:deprecation"/-->
192 <src path="${src}"/>
193 <src path="${build}"/>
194 <classpath>
195 <path refid="classpath.build"/>
196 </classpath>
197 </javac>
198 </target>
199
200 <target name="standard.compile.1.5.0-beta2"
201 description="Compile 1.5 sources using 1.5 SDK">
202 <javac destdir="${build}"
203 debug="yes"
204 optimize="yes"
205 source="1.5">
206 <compilerarg value="-Xlint:unchecked"/>
207 <!--compilerarg value="-Xlint:deprecation"/-->
208 <src path="${src}"/>
209 <src path="${build}"/>
210 <classpath>
211 <path refid="classpath.build"/>
212 </classpath>
213 </javac>
214 </target>
215
216 <target name="standard.compile.1.5.0-rc"
217 description="Compile 1.5 sources using 1.5 SDK">
218 <javac destdir="${build}"
219 debug="yes"
220 optimize="yes"
221 source="1.5">
222 <compilerarg value="-Xlint:unchecked"/>
223 <!--compilerarg value="-Xlint:deprecation"/-->
224 <src path="${src}"/>
225 <src path="${build}"/>
226 <classpath>
227 <path refid="classpath.build"/>
228 </classpath>
229 </javac>
230 </target>
231
232 <target name="standard.compile.1.5.0"
233 description="Compile 1.5 sources using 1.5 SDK">
234 <javac destdir="${build}"
235 debug="yes"
236 optimize="yes"
237 source="1.5">
238 <compilerarg value="-Xlint:unchecked"/>
239 <!--compilerarg value="-Xlint:deprecation"/-->
240 <src path="${src}"/>
241 <src path="${build}"/>
242 <classpath>
243 <path refid="classpath.build"/>
244 </classpath>
245 </javac>
246 </target>
247
248 <target name="standard.compile.1.5.0_01"
249 description="Compile 1.5 sources using 1.5 SDK">
250 <javac destdir="${build}"
251 debug="yes"
252 optimize="yes"
253 source="1.5">
254 <compilerarg value="-Xlint:unchecked"/>
255 <!--compilerarg value="-Xlint:deprecation"/-->
256 <src path="${src}"/>
257 <src path="${build}"/>
258 <classpath>
259 <path refid="classpath.build"/>
260 </classpath>
261 </javac>
262 </target>
263
264 <target name="standard.compile.1.5.0_02"
265 description="Compile 1.5 sources using 1.5 SDK">
266 <javac destdir="${build}"
267 debug="yes"
268 optimize="yes"
269 source="1.5">
270 <compilerarg value="-Xlint:unchecked"/>
271 <!--compilerarg value="-Xlint:deprecation"/-->
272 <src path="${src}"/>
273 <src path="${build}"/>
274 <classpath>
275 <path refid="classpath.build"/>
276 </classpath>
277 </javac>
278 </target>
279
280 <target name="standard.compile.1.4.2"
281 description="Compile 1.5 sources using 1.4 SDK">
282 <copy todir="${lib}" flatten="true" failonerror="no" file="${Generics.gjc-rt}"/>
283 <copy todir="${lib}" flatten="true" failonerror="no" file="${Generics.collect}"/>
284 <javac destdir="${build}"
285 fork="yes"
286 debug="yes"
287 optimize="yes"
288 source="1.5"
289 target="jsr14"
290 bootclasspath="${lib}/gjc-rt.jar:${lib}/collect.jar:${java.home}/lib/rt.jar">
291 <compilerarg line="-J-Xbootclasspath/p:${lib}/gjc-rt.jar"/>
292 <src path="${src}"/>
293 <src path="${build}"/>
294 <classpath>
295 <path refid="classpath.build"/>
296 </classpath>
297 </javac>
298 </target>
299
300 <!-- JAR ==================================================================-->
301
302 <target name="standard.jar"
303 description="Create JAR">
304 <jar jarfile="${lib}/${name}${jar.name}.jar" index="yes">
305 <fileset dir="${build}" includes="${scope}**/*.class"/>
306 <fileset dir="${src}" includes="${scope}**/*.jdo"/>
307 <fileset dir="${src}" includes="${scope}**/images/*.gif"/>
308 <fileset dir="${src}" includes="log4j.properties"/>
309 <manifest>
310 <attribute name="Created-By" value="${user.name}"/>
311 <attribute name="AppName" value="${name}${jar.name}"/>
312 <attribute name="AppVersion" value="${version} ${TSTAMP}"/>
313 <attribute name="Main-Class" value="${main}"/>
314 </manifest>
315 </jar>
316 </target>
317
318 <target name="standard.mjar"
319 description="Create Manifest JAR">
320 <path id="libs">
321 <fileset dir="${lib}">
322 <include name="*.jar"/>
323 <exclude name="*.exe.jar"/>
324 </fileset>
325 </path>
326 <pathconvert targetos="unix" pathsep=" " property="libs" refid="libs">
327 <map from="${lib}/" to=""/>
328 </pathconvert>
329 <jar jarfile="${lib}/${name}${jar.name}.exe.jar">
330 <manifest>
331 <attribute name="Created-By" value="${user.name}"/>
332 <attribute name="AppName" value="${name}${jar.name}"/>
333 <attribute name="AppVersion" value="${version} ${TSTAMP}"/>
334 <attribute name="Class-Path" value="${libs}"/>
335 <attribute name="Main-Class" value="${main}"/>
336 </manifest>
337 </jar>
338 </target>
339
340 <!-- Distribution =========================================================-->
341
342 <target name="standard.dist"
343 description="Create complete distribution">
344 <tar tarfile="${top}/${name}-dist.tar.gz"
345 longfile="gnu"
346 compression="gzip">
347 <tarfileset dir="${bin}" prefix="${name}/bin" mode="555">
348 <include name="**"/>
349 </tarfileset>
350 <tarfileset dir="${doc}" prefix="${name}/doc">
351 <include name="**"/>
352 </tarfileset>
353 <tarfileset dir="${lib}" prefix="${name}/lib">
354 <include name="**"/>
355 </tarfileset>
356 <tarfileset dir="${etc}" prefix="${name}/etc">
357 <include name="**"/>
358 </tarfileset>
359 <tarfileset dir="${misc}" prefix="${name}/misc">
360 <include name="**"/>
361 </tarfileset>
362 <tarfileset dir="${src}" prefix="${name}/src">
363 <include name="**"/>
364 </tarfileset>
365 <tarfileset dir="${build}" prefix="${name}/build">
366 <include name="**/*.java"/>
367 <include name="**/*.properties"/>
368 <include name="**/*.ser"/>
369 </tarfileset>
370 <tarfileset dir="${config.db}" prefix="${name}/ant">
371 <include name="standard.*"/>
372 <include name="config-dist.properties"/>
373 </tarfileset>
374 <tarfileset dir="${ant}" prefix="${name}/ant">
375 <include name="**"/>
376 <exclude name="config-local.properties"/>
377 </tarfileset>
378 <tarfileset dir="${tog}" prefix="${name}/tog">
379 <include name="**"/>
380 </tarfileset>
381 <tarfileset dir="${jude}" prefix="${name}/jude">
382 <include name="**"/>
383 </tarfileset>
384 </tar>
385 </target>
386
387 <!-- Clean ================================================================-->
388
389 <target name="standard.clean"
390 description="Perform standard cleaning">
391 <delete dir="${build}"/>
392 <delete dir="${run}"/>
393 <delete dir="${bin}"/>
394 <delete dir="${etc}"/>
395 <delete dir="${misc}"/>
396 <delete>
397 <fileset dir="${top}" includes="*.tar.*"/>
398 </delete>
399 <delete includeEmptyDirs="true">
400 <fileset dir="${lib}" includes="*"/>
401 </delete>
402 <delete includeEmptyDirs="true">
403 <fileset dir="${doc}" excludes="Together/**/*,**/CVS,Gallery/**/*,*.txt,*.gif"/>
404 </delete>
405 </target>
406
407 <!-- J2H ==================================================================-->
408
409 <target name="standard.j2h"
410 description="Construct source documentation"
411 if="local">
412 <taskdef name="java2html" classname="com.java2html.Java2HTMLTask"/>
413 <java2html title="${name}"
414 simple="no"
415 tabsize="4"
416 marginsize="2"
417 header="true"
418 footer="true"
419 destination="${doc}/Src">
420 <fileset dir="${src}" includes="**/*.java"/>
421 <fileset dir="${build}" includes="**/*.java"/>
422 <javadoc localRef="/opt/jdk-doc/api" httpRef="http://java.sun.com/j2se/1.5.0/docs/api"/>
423 </java2html>
424 </target>
425
426 <!--=======================================================================-->
427
428 </project>
Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
This page was automatically generated by the
LXR engine.
|
|