forked from pettermahlen/voltdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-client.xml
317 lines (284 loc) · 12.1 KB
/
build-client.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?xml version="1.0" ?>
<project default="default" name="VoltDB-Client">
<!-- GENERAL HELPER MACROS -->
<macrodef name="envdefault">
<attribute name="prop" />
<attribute name="var" />
<attribute name="default" />
<sequential>
<condition property="@{prop}" value="${env.@{var}}" else="@{default}">
<isset property="env.@{var}" />
</condition>
</sequential>
</macrodef>
<macrodef name="invoke-javac16">
<attribute name="srcdir"/>
<attribute name="destdir" default="${build.client.dir}"/>
<attribute name="excludes" default=""/>
<attribute name="includes" default=""/>
<sequential>
<javac
target="1.7"
source="1.7"
bootclasspath="${vendor.lib.dir}/classes-java1.7.jar"
srcdir="@{srcdir}"
destdir="@{destdir}"
excludes="@{excludes}"
includes="@{includes}"
encoding='UTF-8'
debug='true'
includeAntRuntime='false'>
<classpath refid="project.classpath" />
</javac>
</sequential>
</macrodef>
<tstamp/>
<!-- make environment var foo available as env.foo -->
<property environment="env"/>
<!-- allow env.VOLTBUILD to override "build" property -->
<envdefault prop="build" var="VOLTBUILD" default="release" />
<property name='base.dir' location='.' />
<property name='build.dir' location='obj/${build}' />
<property name='build.prod.dir' location='${build.dir}/prod' />
<property name='build.client.dir' location='${build.dir}/clientobj' />
<property name='build.clientsrc.dir' location='${build.dir}/clientsrc' />
<property name='build.test.dir' location='${build.dir}/test' />
<property name='build.admin.dir' location='${build.dir}/admin' />
<property name='raw.dist.dir' location='${build.dir}' />
<property name='dist.dir' location='${build.dir}/dist' />
<property name='doc.dir' location='doc' />
<property name='src.gpl.dir' location='src/frontend' />
<property name='lib.dir' location='lib' />
<property name='vendor.src.dir' location='third_party/java/src' />
<property name='vendor.lib.dir' location='third_party/java/jars' />
<property name='vendor.cpp.dir' location='third_party/cpp' />
<property name='depcache' value='.depcache' />
<property name="j2se_api" value="http://docs.oracle.com/javase/7/docs/api/"/>
<!-- os.mac is set when build is running on Mac OSX -->
<condition property="os.mac">
<os family="mac"/>
</condition>
<path id='project.classpath'>
<pathelement location='${build.client.dir}' />
<fileset dir='${vendor.lib.dir}'>
<include name='javaee-api-6.0.jar' />
</fileset>
<pathelement path="${java.class.path}"/>
</path>
<fileset id="vendor.src.files" dir="${vendor.src.dir}"
includes="com/google_voltpatches/**/*.java
org/codehaus_voltpatches/mojo/**/*.java
javax/annotation_voltpatches/**/*.java
org/apache/cassandra_voltpatches/MurmurHash3.java
org/apache/commons_voltpatches/cli/**/*.java
org/apache/hadoop_voltpatches/hbase/utils/DirectMemoryUtils.java
org/apache/hadoop_voltpatches/util/PureJavaCrc*.java
org/apache/jute_voltpatches/**/*.java
org/apache/zookeeper_voltpatches/KeeperException.java
org/cliffc_voltpatches/**/*.java
org/HdrHistogram_voltpatches/**/*.java
org/json_voltpatches/**/*.java
jsr166y/**/*.java
io/netty_voltpatches/NinjaKeySet.java
"
/>
<fileset id="client.src.files" dir="${src.gpl.dir}"
includes="org/voltcore/logging/Level.java
org/voltcore/logging/VoltLogger.java
org/voltcore/logging/VoltUtilLoggingLogger.java
org/voltcore/network/*.java
org/voltcore/utils/CoreUtils.java
org/voltcore/utils/COWMap.java
org/voltcore/utils/COWNavigableSet.java
org/voltcore/utils/COWSortedMap.java
org/voltcore/utils/DBBPool.java
org/voltcore/utils/DeferredSerialization.java
org/voltcore/utils/EstTime.java
org/voltcore/utils/EstTimeUpdater.java
org/voltcore/utils/InstanceId.java
org/voltcore/utils/Pair.java
org/voltcore/utils/RateLimitedLogger.java
org/voltcore/utils/Bits.java
org/voltcore/utils/LatencyWatchdog.java
org/voltcore/utils/CompressionStrategy.java
org/voltcore/utils/VoltTypeUtil.java
org/voltdb/CLIConfig.java
org/voltdb/client/**/*.java
org/voltdb/ClientResponseImpl.java
org/voltdb/InternalConnectionContext.java
org/voltdb/common/Constants.java
org/voltdb/jdbc/**/*.java
org/voltdb/LatencyBucketSet.java
org/voltdb/OperationMode.java
org/voltdb/ParameterConverter.java
org/voltdb/ParameterSet.java
org/voltdb/PrivateVoltTableFactory.java
org/voltdb/parser/JDBCParser.java
org/voltdb/parser/SQL*.java
org/voltdb/types/GeographyValue.java
org/voltdb/types/GeographyPointValue.java
org/voltdb/types/TimestampType.java
org/voltdb/types/VoltDecimalHelper.java
org/voltdb/utils/Base64.java
org/voltdb/utils/Encoder.java
org/voltdb/utils/SerializationHelper.java
org/voltdb/utils/RowWithMetaData.java
org/voltdb/utils/BulkLoaderErrorHandler.java
org/voltdb/utils/CSVDataLoader.java
org/voltdb/utils/CSVBulkDataLoader.java
org/voltdb/utils/CSVTupleDataLoader.java
org/voltdb/utils/PosixAdvise.java
org/voltdb/utils/VoltTypeUtil.java
org/voltdb/VoltOverflowException.java
org/voltdb/VoltTable.java
org/voltdb/VoltTableRow.java
org/voltdb/VoltType.java
org/voltdb/VoltTypeException.java
"
/>
<!--
***************************************
PRIMARY ENTRY POINTS
***************************************
-->
<target name="default"
depends="compile, voltdbclient.jar"
description="Compile Java client classes builds the client/jdbc Jarfile."
/>
<!--
***************************************
DISTRIBUTION
***************************************
-->
<target name="javadoc">
<echo message="Building Client API JavaDoc"/>
<!-- populate selected client javadoc documentation -->
<javadoc
destdir="${doc.dir}/javadoc/java-client-api"
access="protected"
version="true"
use="true"
failonerror="true"
additionalparam="-quiet"
Overview='${src.gpl.dir}/overview-public.html'
Windowtitle='VoltDB Client APIs'>
<link href="${j2se_api}"/>
<classpath refid='project.classpath' />
<fileset dir="." defaultexcludes="yes">
<include name="src/frontend/org/voltdb/VoltTable.java" />
<include name="src/frontend/org/voltdb/VoltTableRow.java" />
<include name="src/frontend/org/voltdb/VoltType.java" />
<include name="src/frontend/org/voltdb/client/Client.java" />
<include name="src/frontend/org/voltdb/client/NoConnectionsException.java" />
<include name="src/frontend/org/voltdb/client/ProcedureCallback.java" />
<include name="src/frontend/org/voltdb/client/ClientConfig.java" />
<include name="src/frontend/org/voltdb/client/ClientFactory.java" />
<include name="src/frontend/org/voltdb/client/SyncCallback.java" />
<include name="src/frontend/org/voltdb/client/NullCallback.java" />
<include name="src/frontend/org/voltdb/client/ProcCallException.java" />
<include name="src/frontend/org/voltdb/client/ClientStatusListener.java" />
<include name="src/frontend/org/voltdb/client/ClientStatusListenerExt.java" />
<include name="src/frontend/org/voltdb/client/ClientResponse.java" />
<include name="src/frontend/org/voltdb/client/ClientStats.java" />
<include name="src/frontend/org/voltdb/client/ClientAffinityStats.java" />
<include name="src/frontend/org/voltdb/client/ClientStatsContext.java" />
<include name="src/frontend/org/voltdb/types/TimestampType.java" />
<include name="src/frontend/org/voltdb/types/GeographyPointValue.java" />
<include name="src/frontend/org/voltdb/types/GeographyValue.java" />
</fileset>
</javadoc>
</target>
<!--
***************************************
CLEANING
***************************************
-->
<target name='clean' description="Remove all voltdb client artifacts.">
<exec dir='.' executable='/bin/sh'>
<arg line="-c 'rm -rf ${build.client.dir}'"/>
</exec>
<exec dir='.' executable='/bin/sh'>
<arg line="-c 'rm -rf voltdb/voltdbclient*.jar'"/>
</exec>
<exec dir='.' executable='/bin/sh'>
<arg line="-c 'rm -rf doc/javadoc/java-client-api/*'"/>
</exec>
</target>
<!--
***************************************
STAGING SOURCE FILES
***************************************
-->
<target name="stage_src" >
<mkdir dir='${build.client.dir}' />
<!-- copy source files -->
<copy todir="${build.clientsrc.dir}">
<fileset refid="vendor.src.files"/>
<fileset refid="client.src.files"/>
</copy>
</target>
<!--
***************************************
JAR BUILDING
***************************************
-->
<target name="buildinfo">
<loadfile property='dist.version' srcFile='version.txt'>
<filterchain><striplinebreaks/></filterchain>
</loadfile>
<exec dir="." executable="tools/getgitinfo.py">
<arg line='${dist.version}' />
</exec>
</target>
<target name="voltdbclient.jar" depends="compile, buildinfo">
<jar destfile="voltdb/voltdbclient-${dist.version}.jar">
<fileset dir="${build.client.dir}" defaultexcludes="yes" >
<include name="**" />
</fileset>
<fileset dir=".">
<include name="buildstring.txt"/>
</fileset>
<fileset dir="src/frontend">
<include name="META-INF/**"/>
</fileset>
<manifest>
<section name="Credits">
<attribute name="Author" value="VoltDB Inc." />
</section>
<section name="Shared">
<attribute
name="Title"
value="VoltDB client interface libraries"
/>
<attribute name="Date" value="${TODAY}" />
</section>
</manifest>
</jar>
</target>
<target name="maven-jars"
description = "makes extra .jar files that get pushed to maven repo"
depends="stage_src, javadoc, buildinfo">
<jar destfile="${build.dir}/voltdbclient-${dist.version}-javadoc.jar"
basedir="${doc.dir}/javadoc/java-client-api"
/>
<jar destfile="${build.dir}/voltdbclient-${dist.version}-sources.jar"
basedir="${build.clientsrc.dir}"
/>
</target>
<!--
***************************************
JAVA COMPILATION
***************************************
-->
<target name="compile" description="Compile all Java client source" depends="stage_src">
<!-- copy resources needed -->
<copy todir="${build.client.dir}">
<fileset dir="${src.gpl.dir}" includes="org/voltdb/jdbc/**/*.properties"/>
<fileset dir="${src.gpl.dir}" includes="org/voltdb/client/**/*.properties"/>
<fileset dir="${src.gpl.dir}" includes="org/voltdb/*.properties"/>
</copy>
<invoke-javac16 srcdir="${build.clientsrc.dir}">
</invoke-javac16>
</target>
<!-- END PROJECT -->
</project>