-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
61 lines (51 loc) · 2.29 KB
/
build.xml
File metadata and controls
61 lines (51 loc) · 2.29 KB
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
<?xml version="1.0" encoding="UTF-8" ?>
<project basedir="." default="build" name="Project 4">
<property name="debuglevel" value="source,lines,vars"/>
<property name="build-dir" location="build" />
<property name="lib-dir" location="lib" />
<property name="src-dir" location="src" />
<property name="war-name" value="eBay" />
<property environment="env"/>
<path id="classpath">
<fileset dir="${lib-dir}" includes="**/*.jar" />
<fileset dir="${env.CATALINA_HOME}/lib" includes="**/*.jar" />
<fileset dir="${env.AXIS2_HOME}/lib" includes="**/*.jar" />
<pathelement location="${obj-dir}"/>
</path>
<target name="init">
<mkdir dir="${build-dir}" />
<mkdir dir="${build-dir}/WEB-INF" />
<mkdir dir="${build-dir}/WEB-INF/classes" />
</target>
<target name="clean">
<delete dir="${build-dir}" />
</target>
<target name="compile" depends="init">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" srcdir="${src-dir}" destdir="${build-dir}/WEB-INF/classes" includes="**/*.java">
<classpath refid="classpath"/>
</javac>
</target>
<target name="build" depends="clean">
<echo message="${ant.project.name}: ${war-name}"/>
<!-- build the class files first -->
<antcall target="compile" />
<!-- copy necessary files to include in the war file -->
<mkdir dir="${build-dir}/WEB-INF/lib" />
<copy todir="${build-dir}/WEB-INF/lib" preservelastmodified="true" overwrite="true">
<fileset dir="${lib-dir}" />
</copy>
<copy todir="${build-dir}" preservelastmodified="true" overwrite="true">
<fileset dir="WebContents" />
</copy>
<!-- create the war file -->
<jar basedir="${build-dir}" destfile="${build-dir}/${war-name}.war"/>
</target>
<target name="deploy">
<delete dir="${env.CATALINA_HOME}/webapps/${war-name}" />
<delete includeemptydirs="true">
<fileset dir="${env.CATALINA_HOME}/work" includes="**/*"/>
</delete>
<copy file="${build-dir}/${war-name}.war" todir="${env.CATALINA_HOME}/webapps" preservelastmodified="true" overwrite="true" />
</target>
</project>