480
|
1 <?xml version="1.0" encoding="UTF-8"?>
|
|
2 <project basedir="." default="build" name="digilib-servlet">
|
|
3 <property environment="env"/>
|
|
4 <property name="debuglevel" value="source,lines,vars"/>
|
|
5 <property name="target" value="1.4"/>
|
|
6 <property name="source" value="1.4"/>
|
|
7 <path id="digilib.classpath">
|
|
8 <pathelement location="bin"/>
|
|
9 <fileset dir="lib">
|
|
10 <include name="**/*.jar"/>
|
|
11 </fileset>
|
|
12 </path>
|
|
13
|
|
14 <target name="init">
|
516
|
15 <tstamp/>
|
480
|
16 <mkdir dir="bin"/>
|
|
17 <mkdir dir="dist"/>
|
|
18 <available file="servlet/src" property="has.servlet.src"/>
|
|
19 <available file="client/digitallibrary" property="has.webapp.src"/>
|
|
20 </target>
|
|
21
|
|
22 <target name="clean">
|
|
23 <delete dir="bin"/>
|
|
24 </target>
|
|
25
|
|
26 <target name="cleanall" depends="clean">
|
|
27 <delete dir="client"/>
|
|
28 <delete dir="servlet"/>
|
|
29 </target>
|
|
30
|
|
31 <target name="build" depends="pkg-servlet,move-servlet"/>
|
|
32
|
|
33 <target name="dist" depends="build,copy-lib,pkg-webapp"/>
|
|
34
|
|
35 <target name="dist-nolib" depends="build,pkg-webapp"/>
|
|
36
|
|
37 <target depends="init,get-src" name="build-servlet">
|
|
38 <echo message="${ant.project.name}: ${ant.file}"/>
|
|
39 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
|
|
40 <src path="servlet/src"/>
|
|
41 <classpath refid="digilib.classpath"/>
|
|
42 </javac>
|
|
43 <!-- Create the time stamp -->
|
|
44 <tstamp/>
|
|
45 </target>
|
|
46
|
|
47 <target name="pkg-servlet" depends="build-servlet">
|
|
48 <!-- Put everything in ${build} into the jar file -->
|
|
49 <jar destfile="dist/DigilibServlet-${DSTAMP}.jar" basedir="bin" index="yes"/>
|
|
50 </target>
|
|
51
|
|
52 <target name="move-servlet" depends="pkg-servlet,get-webapp">
|
|
53 <!-- put the new jar file in the webapp -->
|
|
54 <copy file="dist/DigilibServlet-${DSTAMP}.jar"
|
|
55 tofile="client/digitallibrary/WEB-INF/lib/DigilibServlet.jar"/>
|
|
56 </target>
|
|
57
|
|
58 <target name="copy-lib">
|
|
59 <!-- copy all files in lib in the webapp -->
|
|
60 <copy todir="client/digitallibrary/WEB-INF/lib" includeemptydirs="false">
|
|
61 <fileset dir="lib"/>
|
|
62 </copy>
|
|
63 </target>
|
|
64
|
|
65 <target name="pkg-webapp" depends="get-webapp">
|
|
66 <zip destfile="dist/digilib-${DSTAMP}.zip" basedir="client" />
|
|
67 </target>
|
|
68
|
|
69 <target name="get-all" depends="get-src,get-webapp"/>
|
|
70
|
516
|
71 <target name="get-src" depends="init" unless="has.servlet.src"
|
480
|
72 description="download fresh set of sources from CVS">
|
|
73 <cvs cvsRoot=":pserver:anonymous@cvs.digilib.berlios.de:/cvsroot/digilib"
|
|
74 package="servlet/src" compression="true"/>
|
|
75 </target>
|
|
76
|
516
|
77 <target name="get-webapp" depends="init" unless="has.webapp.src"
|
480
|
78 description="download fresh webapp directory from CVS">
|
|
79 <cvs cvsRoot=":pserver:anonymous@cvs.digilib.berlios.de:/cvsroot/digilib"
|
|
80 package="client/digitallibrary" compression="true"/>
|
|
81 </target>
|
|
82
|
|
83 <!-- CVS update should not be needed, checkout is preferrable -->
|
516
|
84 <target name="update" depends="init,update-src,update-webapp"/>
|
480
|
85
|
|
86 <target name="update-src" description="update sources from CVS" >
|
|
87 <cvs dest="servlet/src" command="update" compression="true"/>
|
|
88 </target>
|
|
89
|
|
90 <target name="update-webapp" description="update webapp from CVS" >
|
|
91 <cvs dest="client/digitallibrary" command="update" compression="true"/>
|
|
92 </target>
|
|
93 </project>
|