ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/build.xml
Revision: 1.3
Committed: Mon May 14 02:47:00 2001 UTC (23 years ago) by tdb
Content type: text/xml
Branch: MAIN
Changes since 1.2: +5 -5 lines
Log Message:
Upon reflection, the URL should at least be stored in the config ;)

File Contents

# Content
1 <!-- build file for server -->
2 <project name="iscream-server" default="package">
3
4 <!--
5 TODO:
6 build/jar util package
7 install target
8 cvs version build (including cleanup)
9 javadoc
10 sql table generation
11 -->
12
13 <!--
14 =====================================================
15 Initialisation & Configuration
16 =====================================================
17 -->
18
19 <property name="SOURCEROOT" value="${basedir}"/>
20 <property name="CONFIGFILE" value="build.config"/>
21
22 <target name="config">
23 <echo message="Reading build configuration"/>
24 <property file="${CONFIGFILE}"/>
25 </target>
26
27 <!--
28 =====================================================
29 Main targets (shortcuts essentially)
30 =====================================================
31 -->
32
33 <target name="fetch">
34 <antcall target="getlibs"/>
35 </target>
36
37 <target name="idl">
38 <antcall target="genidl"/>
39 </target>
40
41 <target name="build">
42 <antcall target="compile"/>
43 </target>
44
45 <target name="package">
46 <antcall target="makedist"/>
47 </target>
48
49 <target name="run">
50 <antcall target="runserver"/>
51 </target>
52
53 <target name="clean">
54 <antcall target="cleanup"/>
55 </target>
56
57 <target name="distclean">
58 <antcall target="fullcleanup"/>
59 </target>
60
61 <!--
62 =====================================================
63 Fetch required libraries (not in dependency tree)
64 =====================================================
65 -->
66
67 <!-- this uses static names, which is messy -->
68 <!-- fullcleanup target has same problem -->
69 <target name="getlibs" depends="config">
70 <get
71 src="${LIBURL}/crimson.jar"
72 dest="${LIBDIR}/crimson.jar"
73 verbose="true" usetimestamp="true"
74 />
75 <get
76 src="${LIBURL}/idl.jar"
77 dest="${LIBDIR}/idl.jar"
78 verbose="true" usetimestamp="true"
79 />
80 <get
81 src="${LIBURL}/jacorb.jar"
82 dest="${LIBDIR}/jacorb.jar"
83 verbose="true" usetimestamp="true"
84 />
85 <get
86 src="${LIBURL}/jaxp.jar"
87 dest="${LIBDIR}/jaxp.jar"
88 verbose="true" usetimestamp="true"
89 />
90 <get
91 src="${LIBURL}/mm.mysql-2.0.4-bin.jar"
92 dest="${LIBDIR}/mm.mysql-2.0.4-bin.jar"
93 verbose="true" usetimestamp="true"
94 />
95 <!-- also get jacorb.properties? -->
96 </target>
97
98 <!--
99 =====================================================
100 IDL Generation
101 =====================================================
102 -->
103
104 <!-- generate java code from idl files -->
105 <target name="genidl" depends="config">
106 <echo message="Generating Java source from IDL"/>
107 <java classname="${IDLPARSER}">
108 <arg line="-d ${IDLDIR} ${IDLFILE}"/>
109 <classpath path="${IDLPARSERJAR}"/>
110 </java>
111 </target>
112
113 <!--
114 =====================================================
115 Source code compilation (including idl-generated)
116 =====================================================
117 -->
118
119 <target name="compileidl" depends="genidl">
120 <javac
121 srcdir="${IDLDIR}"
122 destdir="${BUILDDIR}"
123 classpath="${JCCLASSPATH}"
124 includes="uk/**/*.java"
125 debug="${JCDEBUG}"
126 optimize="${JCOPTIM}"
127 deprecation="${JCDEPRE}"
128 />
129 </target>
130
131 <target name="compile" depends="compileidl">
132 <javac
133 srcdir="${SOURCEROOT}"
134 destdir="${BUILDDIR}"
135 classpath="${JCCLASSPATH}"
136 includes="uk/**/*.java"
137 debug="${JCDEBUG}"
138 optimize="${JCOPTIM}"
139 deprecation="${JCDEPRE}"
140 />
141 </target>
142
143 <!--
144 =====================================================
145 Package creation
146 =====================================================
147 -->
148
149 <target name="makejar" depends="compile">
150 <echo file="${BUILDDIR}/MANIFEST_TMP"
151 >Manifest-Version: 1.0
152 Created-By: www.i-scream.org.uk
153 Main-Class: ${MFMAINCLASS}
154 Class-Path: ${MFCLPATH}
155 </echo>
156 <jar
157 jarfile="${BUILDDIR}/${SERVERJAR}"
158 basedir="${BUILDDIR}"
159 includes="uk/**/*.class"
160 manifest="${BUILDDIR}/MANIFEST_TMP"
161 />
162 <delete file="${BUILDDIR}/MANIFEST_TMP"/>
163 </target>
164
165 <target name="maketardist" depends="makejar">
166 <tar
167 longfile="fail"
168 basedir="${BUILDDIR}"
169 tarfile="${BUILDDIR}/${TARFILE}"
170 includes="${SERVERJAR}, run.sh, lib/**, etc/**, README"
171 />
172 <gzip src="${BUILDDIR}/${TARFILE}" zipfile="${BUILDDIR}/${TARGZFILE}"/>
173 <delete file="${BUILDDIR}/${TARFILE}"/>
174 </target>
175
176 <target name="makezipdist" depends="makejar">
177 <zip
178 basedir="${BUILDDIR}"
179 zipfile="${BUILDDIR}/${ZIPFILE}"
180 includes="${SERVERJAR}, run.bat, lib/**, etc/**, README"
181 />
182 </target>
183
184 <target name="makedist" depends="maketardist, makezipdist"/>
185
186 <!--
187 =====================================================
188 Cleaning
189 =====================================================
190 -->
191
192 <target name="cleanup" depends="config">
193 <delete dir="${IDLDIR}/${ROOTPKG}"/>
194 <delete dir="${BUILDDIR}/${ROOTPKG}"/>
195 <delete file="${BUILDDIR}/${SERVERJAR}"/>
196 <delete file="${BUILDDIR}/${TARFILE}"/>
197 <delete file="${BUILDDIR}/${TARGZFILE}"/>
198 <delete file="${BUILDDIR}/${ZIPFILE}"/>
199 </target>
200
201 <target name="fullcleanup" depends="cleanup">
202 <!-- this is messy, we should only delete specific jars -->
203 <delete>
204 <fileset dir="${LIBDIR}" includes="*.jar"/>
205 </delete>
206 </target>
207
208 <!--
209 =====================================================
210 Running (not in dependency tree)
211 =====================================================
212 -->
213
214 <!-- is this really the best way to do this? -->
215 <target name="runserver" depends="config">
216 <java classname="${MFMAINCLASS}" dir="${BUILDDIR}" fork="yes">
217 <arg line="-f ${RUNFILTERNAME}"/>
218 <classpath path="${BUILDDIR}/${SERVERJAR}"/>
219 </java>
220 </target>
221
222 </project>