-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
53 lines (47 loc) · 1.53 KB
/
build.xml
File metadata and controls
53 lines (47 loc) · 1.53 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
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<project name="ANTMayProj" basedir="." default="run">
<!-- 'init' target for Initializing Variables -->
<target name="init">
<property name="bin" value="${basedir}/bin"/>
<property name="lib" value="${basedir}/libraries"/>
<property name="src" value="${basedir}/src"/>
<property name="report" value="${basedir}/report"/>
</target>
<!-- 'clean' target -->
<target name="clean" depends="init">
<echo message="Deleting existing report folder" />
<delete dir="${report}" />
<echo message="Deleting existing bin folder" />
<delete dir="${bin}" />
<echo message="Creating empty bin folder" />
<mkdir dir="${bin}" />
</target>
<!-- 'compile' target -->
<target name="compile" depends="clean">
<javac srcdir="${src}" destdir="${bin}" >
<classpath>
<pathelement path="${bin}"></pathelement>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<!-- ======Set the classpath ====-->
<path id="classpath" >
<pathelement path="bin" ></pathelement>
<fileset dir="libraries" >
<include name="**/*.jar" />
</fileset>
</path>
<!-- 'run' target -->
<target name="run" depends="compile">
<mkdir dir="${report}" />
<taskdef name="testng" classname="org.testng.TestNGAntTask">
<classpath location="${lib}/testng-6.14.3.jar" />
</taskdef>
<testng outputdir="${report}" classpathref="classpath" useDefaultListeners="true">
<xmlfileset dir="${src}" includes="testng.xml" />
</testng>
</target>
</project>