-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
114 lines (97 loc) · 3.66 KB
/
build.xml
File metadata and controls
114 lines (97 loc) · 3.66 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<project name="SeleniumRunner" default="dist" basedir=".">
<description>Selenese Remote WebDriver runner</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="build.test" location="build/test"/>
<property name="dist" location="dist"/>
<property name="test" location="test"/>
<property name="logs" location="logs"/>
<path id="compile.classpath">
<fileset dir="libs">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}"
destdir="${build}"
includeantruntime="false">
<classpath>
<path refid="compile.classpath"/>
</classpath>
</javac>
</target>
<target name="compile.test" depends="compile"
description="compile the source">
<mkdir dir="${build.test}"/>
<!-- <path id="test.classpath">
<path refid="compile.classpath" />
<fileset dir="${build}">
<include name="**/*.class"/>
<exclude name="test/**/*.class"/>
</fileset>
</path>
<property name="myclasspath" refid="test.classpath"/>
<echo message="Classpath = ${myclasspath}"/> -->
<javac srcdir="${test}"
destdir="${build.test}"
includeantruntime="false">
<classpath>
<pathelement path="${build}"/>
<path refid="compile.classpath"/>
</classpath>
</javac>
</target>
<target name="test"
depends="compile.test"
description="run the tests">
<mkdir dir="${logs}"/>
<junit fork="yes">
<classpath>
<pathelement path="${build}"/>
<pathelement path="${build.test}"/>
<path refid="compile.classpath"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes"
todir="${logs}">
<fileset dir="${build.test}">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="dist" depends="compile"
description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<copy todir="${dist}/lib">
<fileset dir="libs" excludes="junit/"/>
</copy>
<manifestclasspath property="jar.classpath" jarfile="${dist}/SeleniumRunner-${DSTAMP}.jar">
<classpath refid="compile.classpath"/>
</manifestclasspath>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/SeleniumRunner-${DSTAMP}.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="org.openqa.runner.SeleniumRunner"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
</target>
<target name="clean"
description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>