ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/build.xml
Revision: 1.1
Committed: Mon May 7 16:22:54 2001 UTC (23 years, 1 month ago) by tdb
Content type: text/xml
Branch: MAIN
Log Message:
A start at a build script written in XML for the Ant build tool.
This requires Ant, which can be downloaded from http://jakarta.apache.org/ant.

Note that this has only been tested on Unix, not Windows. It currently just
builds the package, none of the extra facilities such as javadoc are done.

The TODO list looks something like this;

  build/jar util package
  install target
  cvs version build (including cleanup)
  javadoc
  sql table generation
  run target
  distclean target

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     javadoc
10     sql table generation
11     run target
12     distclean target
13     -->
14    
15     <!--
16     =====================================================
17     Initialisation & Configuration
18     =====================================================
19     -->
20    
21     <property name="SOURCEROOT" value="${basedir}"/>
22     <property name="CONFIGFILE" value="build.config"/>
23    
24     <target name="config">
25     <echo message="Reading build configuration"/>
26     <property file="${CONFIGFILE}"/>
27     </target>
28    
29     <!--
30     =====================================================
31     Main targets (shortcuts essentially)
32     =====================================================
33     -->
34    
35     <target name="idl">
36     <antcall target="genidl"/>
37     </target>
38    
39     <target name="build">
40     <antcall target="compile"/>
41     </target>
42    
43     <target name="package">
44     <antcall target="makedist"/>
45     </target>
46    
47     <target name="clean">
48     <antcall target="cleanup"/>
49     </target>
50    
51     <!--
52     =====================================================
53     IDL Generation
54     =====================================================
55     -->
56    
57     <!-- generate java code from idl files -->
58     <target name="genidl" depends="config">
59     <echo message="Generating Java source from IDL"/>
60     <java classname="${IDLPARSER}">
61     <arg line="-d ${IDLDIR} ${IDLFILE}"/>
62     <classpath path="${IDLPARSERJAR}"/>
63     </java>
64     </target>
65    
66     <!--
67     =====================================================
68     Source code compilation (including idl-generated)
69     =====================================================
70     -->
71    
72     <target name="compileidl" depends="genidl">
73     <javac
74     srcdir="${IDLDIR}"
75     destdir="${BUILDDIR}"
76     classpath="${JCCLASSPATH}"
77     includes="uk/**/*.java"
78     debug="${JCDEBUG}"
79     optimize="${JCOPTIM}"
80     deprecation="${JCDEPRE}"
81     />
82     </target>
83    
84     <target name="compile" depends="compileidl">
85     <javac
86     srcdir="${SOURCEROOT}"
87     destdir="${BUILDDIR}"
88     classpath="${JCCLASSPATH}"
89     includes="uk/**/*.java"
90     debug="${JCDEBUG}"
91     optimize="${JCOPTIM}"
92     deprecation="${JCDEPRE}"
93     />
94     </target>
95    
96     <!--
97     =====================================================
98     Package creation
99     =====================================================
100     -->
101    
102     <target name="makejar" depends="compile">
103     <echo file="${BUILDDIR}/MANIFEST_TMP"
104     >Manifest-Version: 1.0
105     Created-By: www.i-scream.org.uk
106     Main-Class: ${MFMAINCLASS}
107     Class-Path: ${MFCLPATH}
108     </echo>
109     <jar
110     jarfile="${BUILDDIR}/${SERVERJAR}"
111     basedir="${BUILDDIR}"
112     includes="uk/**/*.class"
113     manifest="${BUILDDIR}/MANIFEST_TMP"
114     />
115     <delete file="${BUILDDIR}/MANIFEST_TMP"/>
116     </target>
117    
118     <target name="maketardist" depends="makejar">
119     <tar
120     longfile="fail"
121     basedir="${BUILDDIR}"
122     tarfile="${BUILDDIR}/${TARFILE}"
123     includes="${SERVERJAR}, run.sh, lib/**, etc/**, README"
124     />
125     <gzip src="${BUILDDIR}/${TARFILE}" zipfile="${BUILDDIR}/${TARGZFILE}"/>
126     <delete file="${BUILDDIR}/${TARFILE}"/>
127     </target>
128    
129     <target name="makezipdist" depends="makejar">
130     <zip
131     basedir="${BUILDDIR}"
132     zipfile="${BUILDDIR}/${ZIPFILE}"
133     includes="${SERVERJAR}, run.bat, lib/**, etc/**, README"
134     />
135     </target>
136    
137     <target name="makedist" depends="maketardist, makezipdist"/>
138    
139     <!--
140     =====================================================
141     Cleaning
142     =====================================================
143     -->
144    
145     <target name="cleanup" depends="config">
146     <delete dir="${IDLDIR}/${ROOTPKG}"/>
147     <delete dir="${BUILDDIR}/${ROOTPKG}"/>
148     <delete file="${BUILDDIR}/${SERVERJAR}"/>
149     <delete file="${BUILDDIR}/${TARFILE}"/>
150     <delete file="${BUILDDIR}/${TARGZFILE}"/>
151     <delete file="${BUILDDIR}/${ZIPFILE}"/>
152     </target>
153    
154     </project>