-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
142 lines (120 loc) · 5.06 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" standalone="yes"?>
<project name="galileo-spacetime" basedir="." default="jar">
<!-- Build properties -->
<property name="project.version" value="1.0"/>
<property name="project.url" value="http://galileo.cs.colostate.edu"/>
<tstamp>
<format property="build.date" pattern="MM-dd-yyyy"/>
</tstamp>
<!-- Directories -->
<property name="src" value="src"/>
<property name="build" value="classes"/>
<property name="lib" value="lib"/>
<property name="docs" value="docs/api"/>
<property name="depcache" value="depcache"/>
<property name="jar.name"
value="${lib}/${ant.project.name}-${project.version}.jar"/>
<property file="build.properties"/>
<path id="classpath">
<fileset dir="." includes="lib/*.jar"/>
</path>
<target name="compile" description="Compile source files" depends="clean">
<mkdir dir="${build}"/>
<depend srcdir="${src}"
destdir="${build}"
cache="${depcache}"
closure="yes"/>
<javac srcdir="${src}"
destdir="${build}"
classpathref="classpath"
includeantruntime="false" debug="true">
<compilerarg value="-Xlint"/>
<!-- These can be enabled selectively using ant command line options
(-Dbuild.tests=true) or you can override these properties by
creating a build.properties file for your local environment -->
<exclude name="galileo/test/**" unless="${build.tests}"/>
<exclude name="galileo/samples/**" unless="${build.samples}"/>
</javac>
</target>
<target name="testcompile">
<echo>Compiling with build.tests=true</echo>
<antcall target="compile">
<param name="build.tests" value="true"/>
</antcall>
</target>
<target name="jar" depends="compile">
<mkdir dir="${lib}"/>
<manifestclasspath property="jar.classpath" jarfile="${jar.name}">
<classpath refid="classpath"/>
</manifestclasspath>
<jar basedir="${build}" jarfile="${jar.name}">
<manifest>
<attribute name="Built-By"
value="${user.name}"/>
<attribute name="Specification-Title"
value="${ant.project.name}"/>
<attribute name="Specification-Version"
value="${project.version}"/>
<attribute name="Specification-URL"
value="${project.url}"/>
</manifest>
</jar>
</target>
<target name="javadoc" description="Generates javadoc">
<antcall target="compile">
<param name="build.tests" value="false"/>
<param name="build.samples" value="false"/>
</antcall>
<mkdir dir="${docs}"/>
<property name="doctitle"
value="${ant.project.name} ${project.version} Documentation"/>
<javadoc destdir="${docs}"
classpathref="classpath"
doctitle="${doctitle}"
windowtitle="${doctitle}">
<fileset dir="src" defaultexcludes="yes">
<exclude name="galileo/test/**"/>
<exclude name="galileo/samples/**"/>
</fileset>
</javadoc>
</target>
<target name="test" depends="testcompile,jar">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="classpath"/>
<formatter type="plain" usefile="false"/>
<test name="galileo.test.dataset.feature.TestSuite"/>
<test name="galileo.test.dht.partitioning.TestSuite"/>
<test name="galileo.test.graph.TestSuite"/>
<test name="galileo.test.stat.TestSuite"/>
</junit>
</target>
<!-- cleans up everything from the releaseclean task, plus additional files
that should not be cleaned up for a release -->
<target name="clean" depends="releaseclean">
<delete dir="${build}"/>
<delete file="${jar.name}"/>
</target>
<!-- cleans up any files that should not be included in a release zip -->
<target name="releaseclean">
<delete dir="${build}"/>
<delete dir="${depcache}"/>
<delete dir="release"/>
<delete file="${ant.project.name}-${project.version}.zip"/>
</target>
<target name="release" depends="compile,jar,javadoc,releaseclean">
<echo>Generating release ${project.version}</echo>
<echo>Built by: ${user.name} on ${build.date}</echo>
<echo>Operating System: ${os.name} ${os.version}</echo>
<property name="reldir"
value="release/${ant.project.name}-${project.version}"/>
<mkdir dir="${reldir}"/>
<copy todir="${reldir}">
<!-- ignore hidden files -->
<fileset dir="." excludes="**/.*"/>
</copy>
<delete dir="${reldir}/release"/>
<zip destfile="${ant.project.name}-${project.version}.zip"
basedir="release"/>
<delete dir="release"/>
</target>
</project>