This repository has been archived by the owner on Apr 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.xml
74 lines (67 loc) · 2.8 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="bbb-java" basedir=".">
<property name="src.dir" value="src/main/java"/>
<property name="lib.dir" value="lib"/>
<property name="test.src.dir" value="src/test/java"/>
<property name="target.dir" value="target"/>
<property name="classes.dir" value="${target.dir}/classes"/>
<property name="test.classes.dir" value="${target.dir}/test-classes"/>
<property name="target.lib.dir" value="${target.dir}/${ant.project.name}/lib"/>
<property name="flazr.dir" value="../flazr"/>
<property name="flazr.lib.dir" value="${flazr.dir}/target/flazr/lib/"/>
<path id="classpath">
<fileset dir="${flazr.lib.dir}" includes="**/*.jar"/>
<fileset dir="lib" includes="**/*.jar"/>
</path>
<target name="clean">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${target.dir}"/>
</delete>
</target>
<target name="compile">
<ant dir="${flazr.dir}" target="dist"/>
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="compile-test" depends="compile">
<mkdir dir="${test.classes.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.classes.dir}" debug="true" includeantruntime="false">
<classpath id="test.classpath">
<path path="${classes.dir}"/>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-test">
<junit printsummary="yes" haltonfailure="false" showoutput="yes">
<classpath>
<pathelement location="${classes.dir}" />
<pathelement location="${test.classes.dir}" />
<fileset dir="${flazr.lib.dir}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<formatter type="brief" usefile="false" />
<batchtest fork="yes">
<fileset dir="${test.classes.dir}">
<include name="**/*Test*.class" />
</fileset>
</batchtest>
</junit>
</target>
<target name="dist" depends="compile">
<mkdir dir="${target.lib.dir}"/>
<delete file="${target.lib.dir}/${ant.project.name}-git.jar" failonerror="false"/>
<jar destfile="${target.lib.dir}/${ant.project.name}-git.jar">
<fileset dir="${classes.dir}"/>
</jar>
<copy toDir="${target.lib.dir}">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</copy>
</target>
</project>