-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
49 lines (40 loc) · 1.26 KB
/
build.xml
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
<project default="make-jar">
<property file="build.properties"/>
<property name="test.ouput.dir" value="test-output"/>
<property name="jar.file" value="java-weather.jar"/>
<property name="war.file" value="counter-example.war"/>
<taskdef resource="testngtasks" classpath="${testng.path}"/>
<path id="cp">
<pathelement location="bin/" />
<pathelement location="${testng.path}"/>
</path>
<path id="test.cp">
<pathelement location="bin/"/>
</path>
<target name="compile">
<javac srcdir="src/" destdir="bin/"/>
<javac srcdir="test/" destdir="bin/"/>
</target>
<target name="test" depends="compile">
<mkdir dir="${test.ouput.dir}"/>
<testng classpathref="cp" outputdir="${test.ouput.dir}" haltonfailure="true">
<classfileset dir="bin/" includes="**/*Test.class"/>
</testng>
</target>
<target name="make-jar" depends="test">
<jar destfile="${jar.file}">
<fileset dir="bin/">
<include name="**/*.class"/>
<exclude name="**/*Test*.class"/>
</fileset>
</jar>
</target>
<target name="make-war" depends="compile">
<war destfile="${war.file}" webxml="resources/WEB-INF/web.xml">
<classes dir="bin/">
<include name="**/servlet/*.class"/>
<exclude name="**/*Test*.class"/>
</classes>
</war>
</target>
</project>