-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
55 lines (46 loc) · 1.88 KB
/
build.xml
File metadata and controls
55 lines (46 loc) · 1.88 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
<project name="CM Sample Web" default="help" basedir=".">
<!-- Define the properties used by the build -->
<property name="app.name" value="cmsampleweb"/>
<property name="tcserver.home" value="/opt/vmware/vfabric-tc-server-standard/tomcat-6.0.25.A.RELEASE" />
<property name="work.home" value="${basedir}/work"/>
<property name="dist.home" value="${basedir}/dist"/>
<property name="src.home" value="${basedir}/src"/>
<property name="web.home" value="${basedir}/WebContent"/>
<!-- Define the CLASSPATH -->
<path id="compile.classpath">
<fileset dir="${web.home}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="all" depends="clean,compile,dist"
description="Clean work dirs, then compile and create a WAR"/>
<target name="clean"
description="Delete old work and dist directories">
<delete dir="${work.home}"/>
<delete dir="${dist.home}"/>
</target>
<target name="prepare" depends="clean"
description="Create working dirs and copy static files to work dir">
<mkdir dir="${dist.home}"/>
<mkdir dir="${work.home}/WEB-INF/classes"/>
<!-- Copy static HTML and JSP files to work dir -->
<copy todir="${work.home}">
<fileset dir="${web.home}"/>
</copy>
</target>
<target name="compile" depends="prepare"
description="Compile Java sources and copy to WEB-INF/classes dir">
<javac srcdir="${src.home}"
destdir="${work.home}/WEB-INF/classes">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${work.home}/WEB-INF/classes">
<fileset dir="${src.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="dist" depends="compile"
description="Create WAR file for binary distribution">
<jar jarfile="${dist.home}/${app.name}.war"
basedir="${work.home}"/>
</target>
</project>