ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/build.xml
Revision: 1.3
Committed: Sun Aug 1 10:39:59 2004 UTC (20 years, 3 months ago) by tdb
Content type: text/xml
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Log Message:
Catch a lot of old URL's and update them. Also remove a couple of old files
that aren't used.

File Contents

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