-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
99 lines (88 loc) · 3.33 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
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
<project name="cirrus" default="jar" basedir=".">
<property name="version" value="1.0" />
<target name="init">
<mkdir dir="target/classes" />
<mkdir dir="target/test-classes" />
</target>
<target name="compile" depends="init" description="compile">
<javac srcdir="src/main/java" destdir="target/classes"
debug="on" source="1.5" target="1.5" includeAntRuntime="false">
<classpath>
<fileset dir="lib" />
</classpath>
</javac>
<copy todir="target/classes">
<fileset dir="src/main/resources"/>
</copy>
</target>
<target name="compile-test" depends="compile" description="compile test">
<javac srcdir="src/test/java" destdir="target/test-classes"
debug="on" source="1.5" target="1.5" includeAntRuntime="false">
<classpath>
<pathelement location="target/classes"/>
<fileset dir="lib" />
</classpath>
</javac>
<copy todir="target/test-classes">
<fileset dir="src/test/resources"/>
<fileset dir="src/test/javascript"/>
</copy>
</target>
<target name="test" depends="compile-test,no-debug" description="test">
<taskdef name="jairusunit" classname="com.joelhockey.jairusunit.JairusUnitTask">
<classpath>
<fileset dir="lib" />
</classpath>
</taskdef>
<jairusunit>
<jvmarg line="-server ${debugjvm} ${suspendjvm} ${debugjs}" />
<classpath>
<pathelement location="target/test-classes"/>
<pathelement location="target/classes"/>
<fileset dir="lib" />
</classpath>
<batchtest>
<fileset dir="src/test/javascript">
<include name="unit/**/*test*.js"/>
<include name="functional/**/*test*.js"/>
</fileset>
</batchtest>
</jairusunit>
</target>
<target name="report" depends="test" description="junit report" >
<mkdir dir="target/report/html" />
<junitreport todir="target/report">
<fileset dir="target/surefire-reports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="target/report/html"/>
</junitreport>
</target>
<target name="jar" depends="compile" description="jar">
<jar jarfile="target/${ant.project.name}-${version}.jar" basedir="target/classes" />
</target>
<target name="clean" description="clean">
<delete dir="target" />
</target>
<!-- the *debug* targets allow js debug and jvm debug to be turned on. By default debug is off -->
<target name="no-debug">
<property name="debugjs" value=""/>
<property name="debugjvm" value=""/>
<property name="suspendjvm" value=""/>
</target>
<target name="debugjs" description="turn on js debug">
<property name="debugjs" value="-Ddebugjs"/>
</target>
<target name="debugjvm" description="turn on jvm debug">
<property name="debugjvm" value="-agentlib:jdwp=server=y,suspend=n,transport=dt_socket,address=2718"/>
</target>
<target name="suspendjvm" description="turn on jvm debug">
<property name="suspendjvm" value="-agentlib:jdwp=server=y,suspend=y,transport=dt_socket,address=2718"/>
</target>
<target name="server" depends="compile-test,no-debug" description="start web server">
<java jar="lib/runtime/js.jar" fork="true">
<jvmarg line="-server ${debugjvm} ${suspendjvm} ${debugjs}" />
<arg value="script/server.js" />
</java>
</target>
</project>