-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
106 lines (88 loc) · 3.53 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
104
105
106
<!-- KFS -->
<project name="kfs" default="compile" basedir=".">
<property name="Name" value="KFS"/>
<property name="name" value="kfs"/>
<property name="version" value="0.5"/>
<property name="final.name" value="${name}-${version}"/>
<property name="year" value="2008"/>
<property name="src.dir" value="${basedir}/src/java"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="lib.dir" value="${build.dir}/lib"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.src" value="${build.dir}/src"/>
<!-- javadoc -->
<property name="doc.dir" location="doc" />
<!-- test directory -->
<property name="test.dir" location="test" />
<path id="project.classpath">
<pathelement location="${build.classes}" />
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<!-- Default target: usage. Prints out instructions. -->
<target name="usage" description="Prints out instructions">
<echo message="Welcome to the KFS project!" />
<echo message="And for developers:"/>
<echo message="Use 'ant clean' to clean compiled files." />
<echo message="Use 'ant compile' to compile the source code." />
<echo message="Use 'ant tar' to build a release tarball." />
<echo message="Use 'ant test' to run unit tests." />
</target>
<target name="prepare">
<mkdir dir="${build.classes}"/>
</target>
<target name="compile" depends="prepare" description="Standard compile">
<javac srcdir="${src.dir}" destdir="${build.classes}" debug="true">
<classpath refid="project.classpath"/>
</javac>
</target>
<!-- ================================================================== -->
<!-- Make kfs.jar -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="jar" depends="compile">
<jar jarfile="${build.dir}/${name}-${version}.jar"
basedir="${build.classes}">
<manifest>
<section name="org/kosmos">
<attribute name="Implementation-Title" value="KFS"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="Kosmix"/>
</section>
</manifest>
</jar>
</target>
<target name="clean">
<delete file="${build.dir}/${name}-${version}.jar"/>
<delete dir="${build.classes}"/>
</target>
<target name="test" depends="compile" description="Execute tests">
<junit showoutput="true" haltonfailure="true">
<classpath refid="project.classpath" />
<formatter type="brief" usefile="false" />
<batchtest fork="true">
<fileset dir="${build.classes}" includes="**/*Test.class" />
</batchtest>
</junit>
</target>
<!--
<target name="compile-tests" depends="compile" description="Compile the tests">
<javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="true">
<classpath refid="project.classpath" />
</javac>
</target>
<target name="test" depends="compile-tests" description="Run the tests">
<junit haltonfailure="true">
<classpath refid="project.classpath" />
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${build.test.dir}" includes="**/*Test.class" />
</batchtest>
<sysproperty key="doc.dir" value="${doc.dir}" />
<sysproperty key="index.dir" value="${index.dir}" />
</junit>
</target>
-->
</project>