-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.xml
103 lines (89 loc) · 3.34 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
100
101
102
103
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="java-genomics-toolkit" default="jar" basedir=".">
<description>
build the toolkit
</description>
<!-- set global properties for this build -->
<property name="version" value="1.1.0" />
<property name="buildnumber" value="1" />
<property name="copyright" value="Copyright © 2011 Timothy Palpant" />
<property name="reports" location="reports"/>
<property name="reports.junit" location="${reports}/junit"/>
<property name="reports.junit.xml" location="${reports.junit}/xml"/>
<!-- directory variables -->
<property name="src" location="src" />
<property name="test" location="test" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="lib" location="lib" />
<property name="docs" location="docs" />
<path id="classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- compile all Java code -->
<target name="compile" description="compile the scripts">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" source="1.7" target="1.7" debug="true">
<classpath refid="classpath" />
</javac>
<!-- Compile the java code from ${test} into ${build} -->
<javac srcdir="${test}" destdir="${build}" source="1.7" target="1.7" debug="true">
<classpath location="${build}" />
<classpath refid="classpath" />
</javac>
</target>
<!-- package all Java code into a JAR file -->
<target name="jar" depends="compile" description="generate the jarfile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<!-- Put everything in ${build} into the jar file -->
<jar jarfile="${dist}/${ant.project.name}.jar" manifest="META-INF/MANIFEST.MF">
<fileset dir="${build}">
<!--
Include all the application classes, but
don't include the test classes.
-->
<include name="**/*.class" />
<exclude name="**/*Test.class" />
</fileset>
</jar>
</target>
<target name="test" depends="compile" description="run the unit tests">
<mkdir dir="${reports}" />
<mkdir dir="${reports.junit}" />
<mkdir dir="${reports.junit.xml}" />
<junit fork="true" forkmode="once" dir="${basedir}" failureProperty="test.failed">
<classpath location="${build}" />
<classpath refid="classpath" />
<formatter type="xml" />
<batchtest todir="${reports.junit.xml}">
<fileset dir="${test}">
<include name="**/*Test.java" />
<exclude name="**/Abstract*Test.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="${reports.junit.xml}">
<fileset dir="${reports.junit.xml}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${reports.junit}" />
</junitreport>
</target>
<target name="javadoc" description="generate javadocs">
<mkdir dir="${docs}" />
<javadoc destdir="${docs}">
<fileset dir="${src}" includes="**/*.java" />
</javadoc>
</target>
<target name="clean" description="clean up">
<delete dir="${build}" />
<delete dir="${dist}"/>
<delete dir="${reports}"/>
<delete dir="${docs}"/>
</target>
</project>