-
Notifications
You must be signed in to change notification settings - Fork 125
/
build.xml.in
99 lines (84 loc) · 3.63 KB
/
build.xml.in
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
<!-- Hypertable -->
<project name="hypertable" default="compile" basedir="@HYPERTABLE_SOURCE_DIR@">
<property name="Name" value="Hypertable"/>
<property name="name" value="hypertable"/>
<property name="version" value="@VERSION@"/>
<property name="final.name" value="${name}-${version}"/>
<property name="year" value="2008"/>
<property name="src.dir" value="${basedir}/src/java/Core"/>
<property name="thriftsrc.dir" value="${basedir}/src/java/ThriftClient"/>
<property name="gensrc.dir" value="${basedir}/src/gen-java"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="contrib.dir" value="${basedir}/contrib"/>
<property name="mapred.src" value="${contrib.dir}/java/MapReduce/"/>
<property name="build.dir" value="${basedir}/build"/>
<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 Hypertable 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 jar' 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='\${gensrc.dir}' destdir='\${build.classes}'
deprecation='yes' debug='true'>
<classpath refid='project.classpath'/>
</javac>
<javac srcdir='\${thriftsrc.dir}' destdir='\${build.classes}'
deprecation='yes' debug='true'>
<classpath refid='project.classpath'/>
</javac>
<javac srcdir="${src.dir}" destdir="${build.classes}" deprecation="yes"
debug="true">
<classpath refid="project.classpath"/>
</javac>
<javac srcdir="${mapred.src}" destdir="${build.classes}" deprecation="yes"
debug="true">
<classpath refid="project.classpath"/>
</javac>
</target>
<!-- ================================================================== -->
<!-- Make hypertable.jar -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="jar" depends="compile">
<jar destfile="${build.dir}/${final.name}.jar" basedir="${build.classes}">
<manifest>
<section name="org/hypertable">
<attribute name="Implementation-Title" value="Hypertable"/>
<attribute name="Implementation-Version" value="${version}"/>
</section>
</manifest>
</jar>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</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>
</project>