-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
57 lines (49 loc) · 1.66 KB
/
build.xml
File metadata and controls
57 lines (49 loc) · 1.66 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
<?xml version="1.0"?>
<project name="ReverseAjax-JspTagJspFragmetDemo" default="web-archeive" basedir=".">
<property name="lib.dir" value="lib" />
<property name="web_content.dir" value="web_content" />
<property name="src.dir" value="src/main/java" />
<property name="build.dir" value="build" />
<property name="target.dir" value="target" />
<target name="clean">
<echo>Cleaning the ${build.dir}</echo>
<delete dir="${build.dir}" />
</target>
<target name="create" depends="clean">
<echo>Creating required directories</echo>
<mkdir dir="${build.dir}/js" />
<mkdir dir="${build.dir}/WEB-INF/classes" />
<mkdir dir="${build.dir}/WEB-INF/lib" />
<mkdir dir="${build.dir}/WEB-INF/tags" />
<mkdir dir="${build.dir}/WEB-INF/tlds" />
<mkdir dir="${target.dir}" />
</target>
<path id="classpath">
<fileset dir="${lib.dir}" includes="servlet-api.jar" />
</path>
<target name="compile" depends="create">
<echo>Compiling source files</echo>
<javac srcdir="${src.dir}" destdir="${build.dir}/WEB-INF/classes">
<classpath refid="classpath" />
</javac>
</target>
<target name="copy" depends="compile">
<copy todir="${build.dir}/WEB-INF">
<fileset dir="${web_content.dir}/WEB-INF" />
</copy>
<copy todir="${build.dir}">
<fileset dir="${web_content.dir}" />
</copy>
<copy todir="${build.dir}/WEB-INF/lib">
<fileset dir="${lib.dir}">
<exclude name="servlet-api.jar" />
</fileset>
</copy>
</target>
<target name="web-archeive" depends="copy">
<echo>Packaging war</echo>
<war destfile="${target.dir}/${ant.project.name}.war" webxml="${build.dir}/WEB-INF/web.xml">
<fileset dir="${build.dir}" />
</war>
</target>
</project>