-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
90 lines (78 loc) · 3.38 KB
/
Copy pathbuild.xml
File metadata and controls
90 lines (78 loc) · 3.38 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<project name="webstatus" default="all" basedir=".">
<property environment="env"/>
<!-- If environment variable XMBLD_ROOT is not set, set relative value -->
<property name="work.root" value="${env.XMBLD_ROOT}" />
<!-- ==================== File and Directory Names ======================== -->
<property name="app.name" value="sample"/>
<property name="app.path" value="/${app.name}"/>
<property name="web.home" value="${basedir}/web"/>
<property name="war.dir" value="${basedir}"/>
<property name="src.home" value="${basedir}/src"/>
<property name="class.dir" value="${basedir}/classes"/>
<property name="tomcat.home" value="C:/tomcat"/>
<!-- ==================== Compilation Classpath =========================== -->
<path id="compile.classpath">
<path id="tomcat.classpath">
<pathelement location="${tomcat.home}/lib/servlet-api.jar"/>
<pathelement location="${tomcat.home}/lib/jsp-api.jar"/>
<pathelement location="${tomcat.home}/lib/jasper.jar"/>
<pathelement location="${tomcat.home}/lib/catalina.jar"/>
</path>
</path>
<!-- ==================== All Target ====================================== -->
<target name="all" depends="compile, war"
description="Clean build directory, then compiles and build war"/>
<!-- ==================== Java doc Target =================================== -->
<!-- ==================== Prepare Target ================================== -->
<!-- target used to create the "build" destination directory and copy the
static contents of your web application to it -->
<target name="prepare" depends="">
<!-- Create build directories as needed -->
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/WEB-INF"/>
<mkdir dir="${build.home}/WEB-INF/classes"/>
<mkdir dir="${build.home}/WEB-INF/lib"/>
<copy todir="${build.home}">
<fileset dir="${web.home}" />
</copy>
<!-- Resource files in source tree -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${src.home}">
<include name="**/*.xml"/>
</fileset>
</copy>
</target>
<!-- ==================== Compile Target ================================== -->
<!--
The "compile" target transforms source files (from your "src" directory)
into object files in the appropriate location in the build directory.
This example assumes that you will be including your classes in an
unpacked directory hierarchy under "/WEB-INF/classes".
-->
<target name="compile" depends="prepare" description="Compile Java sources">
<mkdir dir="${build.home}/WEB-INF/classes"/>
<javac
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
encoding="ISO-8859-1">
<src path="${src.home}"/>
<compilerarg value="-Xlint:-unchecked"/>
<classpath refid="compile.classpath"/>
<classpath>
<fileset dir="${basedir}/web/WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<!-- ==================== Clean Targets ==================================== -->
<target name="clean" description="Delete build directory and the war file">
<delete dir="${build.home}"/>
<delete file="${basedir}/${app.name}.war"/>
</target>
<target name="war" description="Create binary distribution">
<jar jarfile="${war.dir}/${app.name}.war" basedir="${build.home}"/>
</target>
</project>