-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathbuild.xml
More file actions
82 lines (62 loc) · 2.2 KB
/
build.xml
File metadata and controls
82 lines (62 loc) · 2.2 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="tomcat-loadgen" basedir="." default="war">
<property file="build.properties" />
<!-- The Class-Path for the build is defined here-->
<path id="cp">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<!-- The Class-Path for the JUnit Test is defined here.This also includes the compiled classes directory-->
<path id="jUnit.cp">
<path refid="cp"/>
<pathelement location="${bin.dir}" />
</path>
<!-- Clean the classes, dist & report folder -->
<target name="clean">
<delete dir="${bin.dir}" />
<delete dir="${temp.dir}" />
<delete dir="${bin_res.dir}" />
</target>
<!-- Create the bin,dist & report folders for fresh build -->
<target name="init" depends="clean">
<mkdir dir="${bin.dir}" />
<mkdir dir="${temp.dir}" />
<mkdir dir="${bin_res.dir}" />
</target>
<!-- Compilation of Java Src Files into WEB-INF/classes -->
<target name="compile" depends="init">
<javac destdir="${bin.dir}" debug="true" srcdir="${src.dir}" >
<classpath refid="cp"/>
</javac>
<copy todir="${bin.dir}">
<fileset dir="${src.dir}">
<include name="**/*.properties" />
<include name="**/*.xml" />
<include name="**/*.jsp" />
<include name="**/*.zip" />
</fileset>
</copy>
<copy todir="${bin_res.dir}">
<fileset dir="${resources.dir}">
<include name="**/*.properties" />
<include name="**/*.zip" />
</fileset>
</copy>
</target>
<!-- Package the build into a WAR File after compilation & testing tasks are completed.-->
<target name="war" depends="compile">
<war destfile="${temp.dir}/tomcat-loadgen.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent" >
<include name="*/*.xml" />
<include name="**/*.jar" />
<include name="**/*.jsp" />
<include name="**/*.png" />
</fileset>
<zipfileset dir="." includes="src/**" prefix="WEB-INF"/>
<lib dir="./WebContent/WEB-INF/lib">
</lib>
<classes dir="./WebContent/WEB-INF/classes" />
</war>
</target>
<!-- Copying the WAR File to the deployment folder -->
<!-- This task is Used to Unit-Test the Compiled Java Files -->
</project>