ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/build.xml
Revision: 1.4
Committed: Fri May 18 00:40:34 2001 UTC (23 years ago) by tdb
Content type: text/xml
Branch: MAIN
Changes since 1.3: +37 -2 lines
Log Message:
Javadoc generation completed. Very nicely done too, another "nice" ant feature!

File Contents

# User Rev Content
1 tdb 1.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     sql table generation
10 tdb 1.4 drop shortcut targets
11 tdb 1.1 -->
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 tdb 1.2 <target name="fetch">
34     <antcall target="getlibs"/>
35     </target>
36    
37 tdb 1.1 <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 tdb 1.2 <target name="run">
50     <antcall target="runserver"/>
51     </target>
52    
53 tdb 1.1 <target name="clean">
54     <antcall target="cleanup"/>
55     </target>
56    
57 tdb 1.2 <target name="distclean">
58     <antcall target="fullcleanup"/>
59     </target>
60    
61 tdb 1.4 <target name="javadoc">
62     <antcall target="javadocapi"/>
63     </target>
64    
65 tdb 1.2 <!--
66     =====================================================
67     Fetch required libraries (not in dependency tree)
68     =====================================================
69     -->
70    
71     <!-- this uses static names, which is messy -->
72     <!-- fullcleanup target has same problem -->
73     <target name="getlibs" depends="config">
74     <get
75 tdb 1.3 src="${LIBURL}/crimson.jar"
76 tdb 1.2 dest="${LIBDIR}/crimson.jar"
77     verbose="true" usetimestamp="true"
78     />
79     <get
80 tdb 1.3 src="${LIBURL}/idl.jar"
81 tdb 1.2 dest="${LIBDIR}/idl.jar"
82     verbose="true" usetimestamp="true"
83     />
84     <get
85 tdb 1.3 src="${LIBURL}/jacorb.jar"
86 tdb 1.2 dest="${LIBDIR}/jacorb.jar"
87     verbose="true" usetimestamp="true"
88     />
89     <get
90 tdb 1.3 src="${LIBURL}/jaxp.jar"
91 tdb 1.2 dest="${LIBDIR}/jaxp.jar"
92     verbose="true" usetimestamp="true"
93     />
94     <get
95 tdb 1.3 src="${LIBURL}/mm.mysql-2.0.4-bin.jar"
96 tdb 1.2 dest="${LIBDIR}/mm.mysql-2.0.4-bin.jar"
97     verbose="true" usetimestamp="true"
98     />
99     <!-- also get jacorb.properties? -->
100     </target>
101    
102 tdb 1.1 <!--
103     =====================================================
104     IDL Generation
105     =====================================================
106     -->
107    
108     <!-- generate java code from idl files -->
109     <target name="genidl" depends="config">
110     <echo message="Generating Java source from IDL"/>
111     <java classname="${IDLPARSER}">
112     <arg line="-d ${IDLDIR} ${IDLFILE}"/>
113     <classpath path="${IDLPARSERJAR}"/>
114     </java>
115     </target>
116    
117     <!--
118     =====================================================
119     Source code compilation (including idl-generated)
120     =====================================================
121     -->
122    
123     <target name="compileidl" depends="genidl">
124     <javac
125     srcdir="${IDLDIR}"
126     destdir="${BUILDDIR}"
127     classpath="${JCCLASSPATH}"
128     includes="uk/**/*.java"
129     debug="${JCDEBUG}"
130     optimize="${JCOPTIM}"
131     deprecation="${JCDEPRE}"
132     />
133     </target>
134    
135     <target name="compile" depends="compileidl">
136     <javac
137     srcdir="${SOURCEROOT}"
138     destdir="${BUILDDIR}"
139     classpath="${JCCLASSPATH}"
140     includes="uk/**/*.java"
141     debug="${JCDEBUG}"
142     optimize="${JCOPTIM}"
143     deprecation="${JCDEPRE}"
144     />
145     </target>
146    
147     <!--
148     =====================================================
149     Package creation
150     =====================================================
151     -->
152    
153     <target name="makejar" depends="compile">
154     <echo file="${BUILDDIR}/MANIFEST_TMP"
155     >Manifest-Version: 1.0
156     Created-By: www.i-scream.org.uk
157     Main-Class: ${MFMAINCLASS}
158     Class-Path: ${MFCLPATH}
159     </echo>
160     <jar
161     jarfile="${BUILDDIR}/${SERVERJAR}"
162     basedir="${BUILDDIR}"
163     includes="uk/**/*.class"
164     manifest="${BUILDDIR}/MANIFEST_TMP"
165     />
166     <delete file="${BUILDDIR}/MANIFEST_TMP"/>
167     </target>
168    
169     <target name="maketardist" depends="makejar">
170     <tar
171     longfile="fail"
172     basedir="${BUILDDIR}"
173     tarfile="${BUILDDIR}/${TARFILE}"
174     includes="${SERVERJAR}, run.sh, lib/**, etc/**, README"
175     />
176     <gzip src="${BUILDDIR}/${TARFILE}" zipfile="${BUILDDIR}/${TARGZFILE}"/>
177     <delete file="${BUILDDIR}/${TARFILE}"/>
178     </target>
179    
180     <target name="makezipdist" depends="makejar">
181     <zip
182     basedir="${BUILDDIR}"
183     zipfile="${BUILDDIR}/${ZIPFILE}"
184     includes="${SERVERJAR}, run.bat, lib/**, etc/**, README"
185     />
186     </target>
187    
188     <target name="makedist" depends="maketardist, makezipdist"/>
189    
190     <!--
191     =====================================================
192     Cleaning
193     =====================================================
194     -->
195    
196     <target name="cleanup" depends="config">
197     <delete dir="${IDLDIR}/${ROOTPKG}"/>
198     <delete dir="${BUILDDIR}/${ROOTPKG}"/>
199     <delete file="${BUILDDIR}/${SERVERJAR}"/>
200     <delete file="${BUILDDIR}/${TARFILE}"/>
201     <delete file="${BUILDDIR}/${TARGZFILE}"/>
202     <delete file="${BUILDDIR}/${ZIPFILE}"/>
203 tdb 1.4 <delete dir="${JDOCDIR}"/>
204 tdb 1.2 </target>
205    
206     <target name="fullcleanup" depends="cleanup">
207     <!-- this is messy, we should only delete specific jars -->
208     <delete>
209     <fileset dir="${LIBDIR}" includes="*.jar"/>
210     </delete>
211     </target>
212    
213     <!--
214     =====================================================
215     Running (not in dependency tree)
216     =====================================================
217     -->
218    
219 tdb 1.4 <!-- is this really the best way to do this? no... -->
220 tdb 1.2 <target name="runserver" depends="config">
221     <java classname="${MFMAINCLASS}" dir="${BUILDDIR}" fork="yes">
222     <arg line="-f ${RUNFILTERNAME}"/>
223     <classpath path="${BUILDDIR}/${SERVERJAR}"/>
224     </java>
225 tdb 1.4 </target>
226    
227     <!--
228     =====================================================
229     Javadoc (not in dependency tree)
230     =====================================================
231     -->
232    
233     <target name="javadocapi" depends="config, genidl">
234     <mkdir dir="${JDOCDIR}"/>
235     <!-- link in here requires a live net link! -->
236     <javadoc
237     packagenames="${JDOCPKGS}"
238     destdir="${JDOCDIR}"
239     classpath="${JCCLASSPATH}"
240     author="true"
241     version="true"
242     private="true"
243     use="true"
244     windowtitle="${JDOCTITLE}"
245     header="${JDOCHEADER}"
246     bottom="${JDOCBOTTOM}"
247     link="${JDOCJAPI}"
248     >
249     <!-- need to do idl generated source too -->
250     <sourcepath>
251     <pathelement path="${SOURCEROOT}"/>
252     <pathelement path="${IDLDIR}"/>
253     </sourcepath>
254     </javadoc>
255 tdb 1.1 </target>
256    
257     </project>