ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/build.xml
Revision: 1.5
Committed: Fri May 18 01:01:11 2001 UTC (23 years, 7 months ago) by tdb
Content type: text/xml
Branch: MAIN
Changes since 1.4: +60 -45 lines
Log Message:
Util package generation completed.
Also added usage target as default.

File Contents

# Content
1 <!-- build file for server -->
2 <project name="iscream-server" default="usage">
3
4 <!--
5 TODO:
6 install target
7 cvs version build (including cleanup)
8 sql table generation -- to be removed
9 -->
10
11 <!--
12 =====================================================
13 Initialisation & Configuration
14 =====================================================
15 -->
16
17 <property name="SOURCEROOT" value="${basedir}"/>
18 <property name="CONFIGFILE" value="build.config"/>
19
20 <target name="config">
21 <echo message="Reading build configuration"/>
22 <property file="${CONFIGFILE}"/>
23 </target>
24
25 <!--
26 =====================================================
27 Usage
28 =====================================================
29 -->
30
31 <target name="usage">
32 <echo>
33
34 These are the targets supported by this ANT build script:
35
36 fetch - fetch all the JAR library files
37 idl - generate java source from IDL
38 build - compile all source code
39 package - generate JAR package and distributions
40 packageutil - generate UTIL JAR package
41 javadoc - generate javadoc API
42 clean - clean all generated files
43 distclean - remove 'fetched' libraries + clean
44 run - run the server
45 </echo>
46 </target>
47
48 <target name="help">
49 <antcall target="usage"/>
50 </target>
51
52 <!--
53 =====================================================
54 Fetch required libraries (not in dependency tree)
55 =====================================================
56 -->
57
58 <!-- this uses static names, which is messy -->
59 <!-- fullcleanup target has same problem -->
60 <target name="fetch" depends="config">
61 <get
62 src="${LIBURL}/crimson.jar"
63 dest="${LIBDIR}/crimson.jar"
64 verbose="true" usetimestamp="true"
65 />
66 <get
67 src="${LIBURL}/idl.jar"
68 dest="${LIBDIR}/idl.jar"
69 verbose="true" usetimestamp="true"
70 />
71 <get
72 src="${LIBURL}/jacorb.jar"
73 dest="${LIBDIR}/jacorb.jar"
74 verbose="true" usetimestamp="true"
75 />
76 <get
77 src="${LIBURL}/jaxp.jar"
78 dest="${LIBDIR}/jaxp.jar"
79 verbose="true" usetimestamp="true"
80 />
81 <get
82 src="${LIBURL}/mm.mysql-2.0.4-bin.jar"
83 dest="${LIBDIR}/mm.mysql-2.0.4-bin.jar"
84 verbose="true" usetimestamp="true"
85 />
86 <!-- also get jacorb.properties? -->
87 </target>
88
89 <!--
90 =====================================================
91 IDL Generation
92 =====================================================
93 -->
94
95 <!-- generate java code from idl files -->
96 <target name="idl" depends="config">
97 <echo message="Generating Java source from IDL"/>
98 <java classname="${IDLPARSER}">
99 <arg line="-d ${IDLDIR} ${IDLFILE}"/>
100 <classpath path="${IDLPARSERJAR}"/>
101 </java>
102 </target>
103
104 <!--
105 =====================================================
106 Source code compilation (including idl-generated)
107 =====================================================
108 -->
109
110 <target name="buildidl" depends="idl">
111 <javac
112 srcdir="${IDLDIR}"
113 destdir="${BUILDDIR}"
114 classpath="${JCCLASSPATH}"
115 includes="uk/**/*.java"
116 debug="${JCDEBUG}"
117 optimize="${JCOPTIM}"
118 deprecation="${JCDEPRE}"
119 />
120 </target>
121
122 <target name="build" depends="buildidl">
123 <javac
124 srcdir="${SOURCEROOT}"
125 destdir="${BUILDDIR}"
126 classpath="${JCCLASSPATH}"
127 includes="uk/**/*.java"
128 debug="${JCDEBUG}"
129 optimize="${JCOPTIM}"
130 deprecation="${JCDEPRE}"
131 />
132 </target>
133
134 <!--
135 =====================================================
136 Package creation
137 =====================================================
138 -->
139
140 <target name="makejar" depends="build">
141 <echo file="${BUILDDIR}/MANIFEST_TMP"
142 >Manifest-Version: 1.0
143 Created-By: www.i-scream.org.uk
144 Main-Class: ${MFMAINCLASS}
145 Class-Path: ${MFCLPATH}
146 </echo>
147 <jar
148 jarfile="${BUILDDIR}/${SERVERJAR}"
149 basedir="${BUILDDIR}"
150 includes="uk/**/*.class"
151 manifest="${BUILDDIR}/MANIFEST_TMP"
152 />
153 <delete file="${BUILDDIR}/MANIFEST_TMP"/>
154 </target>
155
156 <target name="maketardist" depends="makejar">
157 <tar
158 longfile="fail"
159 basedir="${BUILDDIR}"
160 tarfile="${BUILDDIR}/${TARFILE}"
161 includes="${SERVERJAR}, run.sh, lib/**, etc/**, README"
162 />
163 <gzip src="${BUILDDIR}/${TARFILE}" zipfile="${BUILDDIR}/${TARGZFILE}"/>
164 <delete file="${BUILDDIR}/${TARFILE}"/>
165 </target>
166
167 <target name="makezipdist" depends="makejar">
168 <zip
169 basedir="${BUILDDIR}"
170 zipfile="${BUILDDIR}/${ZIPFILE}"
171 includes="${SERVERJAR}, run.bat, lib/**, etc/**, README"
172 />
173 </target>
174
175 <target name="package" depends="maketardist, makezipdist"/>
176
177 <!--
178 =====================================================
179 Cleaning
180 =====================================================
181 -->
182
183 <target name="clean" depends="config">
184 <delete dir="${IDLDIR}/${ROOTPKG}"/>
185 <delete dir="${BUILDDIR}/${ROOTPKG}"/>
186 <delete file="${BUILDDIR}/${SERVERJAR}"/>
187 <delete file="${BUILDDIR}/${UTILJAR}"/>
188 <delete file="${BUILDDIR}/${TARFILE}"/>
189 <delete file="${BUILDDIR}/${TARGZFILE}"/>
190 <delete file="${BUILDDIR}/${ZIPFILE}"/>
191 <delete dir="${JDOCDIR}"/>
192 </target>
193
194 <target name="distclean" depends="clean">
195 <!-- this is messy, we should only delete specific jars -->
196 <delete>
197 <fileset dir="${LIBDIR}" includes="*.jar"/>
198 </delete>
199 </target>
200
201 <!--
202 =====================================================
203 Running
204 =====================================================
205 -->
206
207 <!-- is this really the best way to do this? no... -->
208 <target name="run" depends="config">
209 <java classname="${MFMAINCLASS}" dir="${BUILDDIR}" fork="yes">
210 <arg line="-f ${RUNFILTERNAME}"/>
211 <classpath path="${BUILDDIR}/${SERVERJAR}"/>
212 </java>
213 </target>
214
215 <!--
216 =====================================================
217 Javadoc
218 =====================================================
219 -->
220
221 <target name="javadoc" depends="config, idl">
222 <mkdir dir="${JDOCDIR}"/>
223 <!-- link in here requires a live net link! -->
224 <javadoc
225 packagenames="${JDOCPKGS}"
226 destdir="${JDOCDIR}"
227 classpath="${JCCLASSPATH}"
228 author="true"
229 version="true"
230 private="true"
231 use="true"
232 windowtitle="${JDOCTITLE}"
233 header="${JDOCHEADER}"
234 bottom="${JDOCBOTTOM}"
235 link="${JDOCJAPI}"
236 >
237 <!-- need to do idl generated source too -->
238 <sourcepath>
239 <pathelement path="${SOURCEROOT}"/>
240 <pathelement path="${IDLDIR}"/>
241 </sourcepath>
242 </javadoc>
243 </target>
244
245 <!--
246 =====================================================
247 Util Package
248 =====================================================
249 -->
250
251 <!-- MUST clean here to ensure util package is tidy -->
252 <target name="buildutil" depends="config, clean">
253 <javac
254 srcdir="${SOURCEROOT}"
255 destdir="${BUILDDIR}"
256 classpath="${JCCLASSPATH}"
257 includes="${UTILSRC}"
258 debug="${JCDEBUG}"
259 optimize="${JCOPTIM}"
260 deprecation="${JCDEPRE}"
261 />
262 </target>
263
264 <target name="packageutil" depends="buildutil">
265 <jar
266 jarfile="${BUILDDIR}/${UTILJAR}"
267 basedir="${BUILDDIR}"
268 includes="uk/**/*.class"
269 />
270 </target>
271
272 </project>