-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.xml
executable file
·80 lines (66 loc) · 2.78 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
<project name="benchmarksql" default="dist" basedir=".">
<description>BenchmarkSQL Build File</description>
<property name="src" location="src"/>
<property name="apps" location="application"/>
<property name="appdummy" location="appdummy"/>
<property name="appstemp" location="${src}/appstemp"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="logs" location="run/logs"/>
<property name="docker.tag" value="benchmarksql-v6.0"/>
<property name="lib.dir" value="lib"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${appstemp}"/>
</target>
<!-- Copy the Generic application into the source tree -->
<target name="appGeneric">
<copy file="${apps}/AppGeneric.java" todir="${appstemp}" overwrite="true"/>
</target>
<!-- Copy the PostgreSQLStoredProc application into the source tree -->
<target name="appPGProc">
<copy file="${apps}/AppPostgreSQLStoredProc.java" todir="${appstemp}" overwrite="true"/>
</target>
<!-- Conditionally copy the OracleStoredProc application into the source tree -->
<!-- If -DOracleSupport=true is specified, then we copy the real thing. -->
<!-- Otherwise we copy a dummy version that doesn't need the ojdbc?.jar to -->
<!-- build but doesn't work either. -->
<target name="appOraProcReal" if="${OracleSupport}">
<copy file="${apps}/AppOracleStoredProc.java" todir="${appstemp}" overwrite="true"/>
</target>
<target name="appOraProcDummy" unless="${OracleSupport}">
<copy file="${appdummy}/AppOracleStoredProc.java" todir="${appstemp}" overwrite="true"/>
</target>
<target name="appOraProc" depends="appOraProcReal,appOraProcDummy"/>
<!-- Invoke all the copy targets -->
<target name="apps" depends="appGeneric,appPGProc,appOraProc" />
<target name="compile" depends="init,apps">
<javac srcdir="${src}" destdir="${build}" classpathref="classpath"
debug="true" includeantruntime="false" compiler="modern">
<compilerarg value="-Xlint:all"/>
</javac>
</target>
<target name="dist" depends="compile" >
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/BenchmarkSQL-6.devel.jar" basedir="${build}"/>
</target>
<target name="docker" depends="dist" >
<exec executable="docker" >
<arg value="build"/>
<arg value="-t${docker.tag}"/>
<arg value="."/>
</exec>
</target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${logs}"/>
<delete dir="${appstemp}"/>
</target>
</project>