-
Notifications
You must be signed in to change notification settings - Fork 0
/
coordinate.xml
53 lines (43 loc) · 1.93 KB
/
coordinate.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="graphCoordinate" default="package" basedir=".">
<target name="init">
<echo message="Basedir = ${ant.project.name}" />
<echo message="Basedir = ${basedir}" />
<property name="main.build.dir" value="build/main"/>
<property name="main.src.dir" value="src/main/java"/>
<property name="test.build.dir" value="build/test"/>
<property name="test.src.dir" value="src/test/java"/>
<property name="dist.dir" value="build/dist"/>
<property name="dist.file" value="${ant.project.name}.jar"/>
</target>
<path id="classpath.test">
<pathelement location="lib/junit4.jar"/>
<pathelement location="${basedir}/build/main"/>
</path>
<target name="compile" depends="init">
<mkdir dir="${main.build.dir}"/>
<javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeantruntime="false"/>
</target>
<target name="test-compile" depends="compile">
<mkdir dir="${test.build.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" includeantruntime="false" >
<classpath refid="classpath.test"/>
</javac>
</target>
<target name="test" depends="test-compile">
<junit printsummary="on" haltonfailure="yes" fork="true">
<classpath>
<path refid="classpath.test"/>
<pathelement location="${test.build.dir}"/>
</classpath>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${test.src.dir}" includes="**/*Test.java" />
</batchtest>
</junit>
</target>
<target name="package" depends="test">
<mkdir dir="${dist.dir}" />
<jar destfile="${dist.dir}/${dist.file}" basedir="${main.build.dir}" />
</target>
</project>