-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
98 lines (86 loc) · 3.33 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0"?>
<project name="pollmanager" default="jar" basedir=".">
<property name="version" value="1.5.2"/> <!-- this is now the bundle version -->
<property name="tempdir" value="c:\temp"/>
<property name="sourcedir" value="${basedir}/source"/>
<property name="classesdir" value="${basedir}/classes"/>
<property name="libdir" value="${basedir}/lib"/>
<property name="docdir" value="${basedir}/doc"/>
<property name="docapidir" value="${docdir}/api"/>
<property name="jarfilename" value="pollmgt.jar"/>
<property name="jarfile" value="${tempdir}/${jarfilename}"/>
<property name="jbosshome" value="/jboss-3.0.4_tomcat-4.1.12"/>
<property name="installdir" value="${jbosshome}/server/default/lib"/>
<property name="bundlepath" value="${tempdir}/jpoller${version}.zip"/>
<target name="init">
<tstamp/>
<mkdir dir="${classesdir}"/>
<mkdir dir="${docdir}"/>
<mkdir dir="${docapidir}"/>
<echo message="${docdir}"/>
</target>
<target name="compile" depends="init">
<javac
srcdir="source"
destdir="classes"
debug="on"
source="1.4"
classpath="${libdir}/org.sadun.util.jar;${libdir}/lf.jar;${libdir}/clopt.jar;${libdir}/jmxri.jar;${libdir}/xml-utils.jar"
>
</javac>
</target>
<target name="clean" depends="init">
<delete file="${jarfilename}"/>
<delete>
<fileset dir="${classesdir}" includes="**/*.class"/>
<fileset dir="${docapidir}" includes="**/*.*"/>
</delete>
</target>
<target name="javadoc" depends="init">
<javadoc sourcepath="${sourcedir}"
destdir="${docapidir}"
version="yes"
source="1.4"
author="yes"
windowTitle="Directory Poller v${version} Documentation"
packagenames="org.sadun.util.polling.*"
classpath="${libdir}/org.sadun.util.ja"
>
<link offline="true" href="http://java.sun.com/products/jdk/1.3/docs/api/" packagelistLoc="${tempdir}"/>
<doctitle><![CDATA[<h1>Utility classes</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 1999, 2000 Cristiano Sadun. This software is released under GPL.</i>]]></bottom>
</javadoc>
</target>
<target name="jar" depends="init, compile">
<jar jarfile="${jarfile}"
basedir="${basedir}"
compress="false"
manifest="${sourcedir}/META-INF/MANIFEST.MF"
includes="**/classes/*.class"
>
<fileset dir="${basedir}" includes="lib/*.jar"/>
<fileset dir="${classesdir}" includes="**/*.class"/>
</jar>
<move file="${jarfile}" toDir="${basedir}"/>
</target>
<target name="bundle" depends="jar, javadoc">
<zip destfile="${bundlepath}">
<fileset dir="${basedir}" includes="**/*.java"/>
<fileset dir="${basedir}" includes="**/*.html"/>
<fileset dir="${basedir}" includes="**/*.jpg"/>
<fileset dir="${basedir}" includes="lib/**/*.jar"/>
<fileset dir="${basedir}" includes="${jarfilename}"/>
<fileset dir="${basedir}" includes="build.xml"/>
<fileset dir="${basedir}" includes="testdir/*.txt"/>
</zip>
<echo message="Bundle created in ${bundlepath}"/>
</target>
<target name="install" depends="jar">
<available property="installdirExists" file="${installdir}"/>
<antcall target="failOnMissingInstallDir"/>
<copy file="${basedir}/${jarfilename}" toDir="${installdir}"/>
</target>
<target name="failOnMissingInstallDir" unless="installdirExists">
<fail message="The directory ${installdir} does not exist"/>
</target>
</project>