-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
97 lines (83 loc) · 3.39 KB
/
Copy pathbuild.xml
File metadata and controls
97 lines (83 loc) · 3.39 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
<project name="frizzle" default="jar" basedir=".">
<property name="src" location="src/main/java" />
<property name="resources" location="src/main/resources" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="frizzle.jar" location="${dist}/frizzle.jar" />
<property name="lib" location="lib" />
<property name="test.src" location="src/test/java" />
<property name="test.lib" location="test/lib" />
<property name="test.build" location="test/build" />
<property name="test.reports" location="test/reports" />
<property name="rhino.jar" location="${lib}/rhino-1.7.7.1.jar" />
<property name="guava.jar" location="${lib}/guava-19.0.jar" />
<property name="testng.jar" location="${test.lib}/testng-6.9.10.jar" />
<property name="jcommander.jar" location="${test.lib}/jcommander-1.48.jar" />
<property name="sizzle.repo" location="sizzle" />
<property name="sizzle.location" location="${resources}/com/on_site/frizzle/sizzle.js" />
<property name="sizzle.destination" location="${build}/com/on_site/frizzle" />
<path id="classpath">
<pathelement location="${rhino.jar}" />
<pathelement location="${guava.jar}" />
</path>
<path id="test.classpath">
<pathelement location="${rhino.jar}" />
<pathelement location="${guava.jar}" />
<pathelement location="${testng.jar}" />
<pathelement location="${jcommander.jar}" />
<pathelement location="${frizzle.jar}" />
<pathelement location="${test.build}"/>
</path>
<target name="clean" description="clean up">
<delete dir="${build}" />
<delete dir="${test.build}" />
<delete file="${frizzle.jar}" />
<delete dir="${dist}" />
</target>
<target name="init">
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<fail message="Missing ${rhino.jar}, please download it.">
<condition>
<not><available file="${rhino.jar}" /></not>
</condition>
</fail>
<fail message="Missing ${guava.jar}, please download it.">
<condition>
<not><available file="${guava.jar}" /></not>
</condition>
</fail>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}"
includeantruntime="true"
classpathref="classpath" debug="true" />
<copy file="${sizzle.location}" todir="${sizzle.destination}" />
</target>
<target name="jar" depends="compile">
<jar jarfile="${frizzle.jar}" basedir="${build}" />
</target>
<target name="init-test" depends="init">
<mkdir dir="${test.build}" />
<fail message="Missing ${testng.jar}, please download it.">
<condition>
<not><available file="${testng.jar}" /></not>
</condition>
</fail>
<fail message="Missing ${jcommander.jar}, please download it.">
<condition>
<not><available file="${jcommander.jar}" /></not>
</condition>
</fail>
</target>
<target name="compile-test" depends="init-test, jar">
<javac srcdir="${test.src}" destdir="${test.build}" classpathref="test.classpath" debug="true" />
</target>
<target name="test" depends="compile-test">
<taskdef resource="testngtasks" classpath="${testng.jar}"/>
<delete dir="${test.reports}" />
<testng classpathref="test.classpath" outputDir="${test.reports}" haltOnFailure="true" verbose="2">
<classfileset dir="${test.build}" includes="**/*Test.class" />
</testng>
</target>
</project>