-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
83 lines (74 loc) · 2.65 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
<?xml version="1.0"?>
<project name="coriander-oauth-make-jar" basedir=".">
<property name="app.name" value="Coriander.OAuth"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="2.1.0"/>
<property name="src.home" value="${basedir}/src"/>
<property name="testsrc.home" value="${basedir}/test"/>
<property name="build.home" value="${basedir}/out"/>
<property name="jar.home" value="${build.home}/jar"/>
<property name="jar.name" value="coriander-oauth-${app.version}.jar"/>
<property name="report.home" value="${basedir}/reports"/>
<target name="jar" depends="build">
<mkdir dir="${jar.home}"/>
<jar
destfile="${jar.home}/${jar.name}"
basedir="${build.home}"
>
<manifest>
<attribute name="Author" value="Ben Biddington"/>
<attribute name="Version" value="${app.version}"/>
</manifest>
<fileset dir="${basedir}">
<include name="LICENSE"/>
</fileset>
</jar>
</target>
<target name="test" depends="testbuild">
<mkdir dir="${report.home}"/>
<junit fork="no" printsummary="yes" showoutput="yes">
<classpath refid="build.classpath"/>
<formatter type="xml"/>
<batchtest todir="${build.home}">
<fileset dir="${build.home}">
<include name="**/*Test.class"/>
<exclude name="**/TestBase.class"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="${report.home}">
<fileset dir="${build.home}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${report.home}"/>
</junitreport>
</target>
<target name="testbuild" depends="build">
<scalac srcdir="${testsrc.home}" destdir="${build.home}" classpathref="build.classpath"/>
</target>
<target name="build" depends="init">
<mkdir dir="${build.home}"/>
<scalac srcdir="${src.home}" destdir="${build.home}" classpathref="build.classpath">
</scalac>
</target>
<target name="init" depends="clean">
<property name="scala-library.jar" value="lib/scala-library.jar" />
<path id="build.classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${build.home}"/>
</path>
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<pathelement location="lib/scala-compiler.jar"/>
<pathelement location="${scala-library.jar}"/>
</classpath>
</taskdef>
</target>
<target name="clean">
<delete dir="${jar.home}" verbose="true"/>
<delete dir="${build.home}" verbose="true"/>
<delete dir="${report.home}" verbose="true"/>
</target>
</project>