-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
75 lines (66 loc) · 2.51 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0"?>
<project name="PhotoCat" default="war" basedir=".">
<property file="${basedir}/build.properties" />
<!-- Build the cataloger project code -->
<target name="build" description="Build the project">
<mkdir dir="${build.dir}" />
<mkdir dir="${class.dir}" />
<mkdir dir="${class.dir}"/>
<javac srcdir="${src.dir}" destdir="${class.dir}" debug="on" debuglevel="lines,source">
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="war" depends="build" description="--> WAR the web application">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/${target}"/>
<mkdir dir="${dist.dir}/${target}/temp"/>
<mkdir dir="${dist.dir}/${target}/temp/WEB-INF/lib" />
<copy todir="${dist.dir}/${target}/temp">
<fileset dir="${webapp.dir}"/>
</copy>
<copy todir="${dist.dir}/${target}/temp/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${dist.dir}/${target}/temp/WEB-INF/lib">
<fileset dir="${lib.dir}/xerces">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${dist.dir}/${target}/temp/WEB-INF/lib">
<fileset dir="${lib.dir}/lucene">
<include name="*.jar" />
</fileset>
</copy>
<!-- Copy the class files -->
<copy overwrite="yes" todir="${dist.dir}/${target}/temp/WEB-INF/classes">
<fileset dir="${conf.dir}/${target}/classes"/>
</copy>
<copy overwrite="yes" todir="${dist.dir}/${target}/temp/WEB-INF/classes">
<fileset dir="${class.dir}"/>
</copy>
<copy overwrite="yes" todir="${dist.dir}/${target}/temp/WEB-INF/classes">
<fileset dir="${src.dir}">
<include name="**/*.properties" />
</fileset>
</copy>
<!-- delete the existing war file -->
<delete file="${dist.dir}/${target}/${context.name}.war" failonerror="false"/>
<!-- package the temporary directory -->
<war destfile="${dist.dir}/${target}/${context.name}.war"
basedir="${dist.dir}/${target}/temp"
needxmlfile='false'/>
<delete dir="${dist.dir}/${target}/temp" failonerror="no"/>
</target>
<target name="clean" description="Remove class files">
<delete failonerror="false">
<fileset dir="${dist.dir}" />
<fileset dir="${class.dir}" />
</delete>
</target>
</project>