-
-
Notifications
You must be signed in to change notification settings - Fork 123
/
build.xml
195 lines (180 loc) · 8.48 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
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
<project name="jailer" default="package" basedir=".">
<target name="help">
<echo>
available targets:
- help (this page)
- compile (compiles sources)
- package (generates jailer.jar)
</echo>
</target>
<property name="BUILD_DIR" location="out" />
<property name="COMPILE_DIR" location="${BUILD_DIR}/classes" />
<property name="TEST_DIR" location="${BUILD_DIR}/test/classes" />
<property name="SRC_DIR" location="src" />
<property name="JAR" location="jailer.jar" />
<property name="JAR-ENGINE" location="jailer-engine.jar" />
<property name="JAR-ENGINE-SRC" location="jailer-engine-sources.jar" />
<property name="JAR-ENGINE-DOC" location="jailer-engine-javadoc.jar" />
<property name="TEST_BASE_DIR" location="src/test" />
<property file="src/test/test.properties" />
<path id="default.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<path id="test.classpath">
<pathelement location="jailer.jar" />
<pathelement location="${TEST_DIR}" />
<path refid="default.classpath" />
</path>
<target name="clean" description="Cleans up the whole build area.">
<delete dir="${BUILD_DIR}" />
</target>
<target name="compile-engine" depends="clean">
<delete file="${JAR-ENGINE}" />
<mkdir dir="${COMPILE_DIR}" />
<javac source="1.8" target="1.8" destdir="${COMPILE_DIR}" srcdir="${SRC_DIR}/main/engine" debug="on" deprecation="off" encoding="ISO-8859-1">
<classpath>
<path refid="default.classpath" />
</classpath>
<include name="**/*.java" />
</javac>
<copy todir="${COMPILE_DIR}/net/sf/jailer/configuration">
<fileset dir="${SRC_DIR}/main/engine/net/sf/jailer/configuration">
<include name="**/*.json" />
</fileset>
</copy>
<copy todir="${COMPILE_DIR}/net/sf/jailer/script">
<fileset dir="${SRC_DIR}/main/engine/net/sf/jailer/script">
<include name="**/*" />
</fileset>
</copy>
</target>
<target name="compile-gui" depends="compile-engine">
<delete file="${JAR}" />
<mkdir dir="${COMPILE_DIR}" />
<javac source="1.8" target="1.8" destdir="${COMPILE_DIR}" srcdir="${SRC_DIR}/main/gui" debug="on" deprecation="off" encoding="ISO-8859-1">
<classpath>
<path refid="default.classpath" />
</classpath>
<include name="**/*.java" />
</javac>
<copy todir="${COMPILE_DIR}/net/sf/jailer/ui/resource">
<fileset dir="${SRC_DIR}/main/gui/net/sf/jailer/ui/resource">
<include name="**/*" />
</fileset>
</copy>
</target>
<target name="package-engine" depends="compile-engine">
<jar destfile="${JAR-ENGINE}" basedir="${COMPILE_DIR}">
<manifest>
<attribute name="Main-Class" value="net.sf.jailer.Jailer" />
<attribute name="Class-Path" value="lib/axb-api-2.3.0.jar lib/liquibase-core-4.27.0.jar lib/commons-collections4-4.4.jar lib/commons-lang3-3.14.0.jar lib/commons-text-1.11.0.jar lib/opencsv-5.9.jar lib/snakeyaml-2.2.jar lib/jackson-core-2.16.1.jar lib/jackson-annotations-2.16.1.jar lib/jackson-databind-2.16.1.jar lib/log4j-api-2.17.2.jar lib/log4j-core-2.17.2.jar lib/log4j-slf4j-impl-2.17.2.jar lib/slf4j-api-1.7.25.jar lib/flatlaf-3.3.jar lib/args4j.jar config/" />
</manifest>
</jar>
</target>
<target name="package" depends="package-engine,compile-gui">
<jar destfile="${JAR}" basedir="${COMPILE_DIR}">
<manifest>
<attribute name="Main-Class" value="net.sf.jailer.ui.JailerUI" />
<attribute name="Class-Path" value="lib/axb-api-2.3.0.jar lib/liquibase-core-4.27.0.jar lib/commons-collections4-4.4.jar lib/commons-lang3-3.14.0.jar lib/commons-text-1.11.0.jar lib/opencsv-5.9.jar lib/snakeyaml-2.2.jar lib/jackson-core-2.16.1.jar lib/jackson-annotations-2.16.1.jar lib/jackson-databind-2.16.1.jar lib/prefuse.jar config/ lib/log4j-api-2.17.2.jar lib/log4j-core-2.17.2.jar lib/log4j-slf4j-impl-2.17.2.jar lib/slf4j-api-1.7.25.jar lib/flatlaf-3.3.jar lib/args4j.jar lib/sdoc-0.5.0-beta.jar lib/jsqlparser-3.2.jar lib/tablefilter-swing-5.3.1.jar" />
</manifest>
</jar>
<copy todir=".">
<fileset dir="${SRC_DIR}/main/engine/net/sf/jailer/configuration">
<include name="**/*.json" />
</fileset>
</copy>
<copy todir="script">
<fileset dir="${SRC_DIR}/main/engine/net/sf/jailer/script">
<include name="**/*" />
</fileset>
</copy>
<java
fork="true"
failonerror="true"
logError="true"
classname="net.sf.jailer.JailerVersion"
outputproperty="VERSION">
<classpath>
<pathelement location="${JAR-ENGINE}"/>
</classpath>
</java>
<rename src="${JAR-ENGINE}" dest="jailer-engine-${VERSION}.jar"/>
</target>
<target name="compile-test" depends="compile-engine">
<mkdir dir="${TEST_DIR}" />
<javac source="1.8" target="1.8" destdir="${TEST_DIR}" srcdir="${SRC_DIR}/test" debug="on" deprecation="off" encoding="ISO-8859-1">
<classpath>
<path refid="test.classpath" />
</classpath>
<include name="**/*.java" />
</javac>
</target>
<target name="db2-test" depends="package, compile-test">
<junit fork="no">
<sysproperty key="DB_URL" value="${DB2_DB_URL}" />
<sysproperty key="DRIVER_CLASS" value="${DB2_DRIVER_CLASS}" />
<sysproperty key="DB_USER" value="${DB2_DB_USER}" />
<sysproperty key="DB_PASSWORD" value="${DB2_DB_PASSWORD}" />
<sysproperty key="DB_SUPPORTS_SESSION_LOCAL" value="yes" />
<sysproperty key="BASE_DIR" value="${TEST_BASE_DIR}/single-row-cycle:${TEST_BASE_DIR}/general:${TEST_BASE_DIR}/pseudocolumns:${TEST_BASE_DIR}/pseudocolumns2" />
<classpath refid="test.classpath" />
<formatter type="brief" usefile="false" />
<test name="net.sf.jailer.GeneralDbmsTestSuite" />
</junit>
</target>
<target name="oracle-test" depends="package, compile-test">
<junit fork="no">
<sysproperty key="DB_URL" value="${ORACLE_DB_URL}" />
<sysproperty key="DRIVER_CLASS" value="${ORACLE_DRIVER_CLASS}" />
<sysproperty key="DB_USER" value="${ORACLE_DB_USER}" />
<sysproperty key="DB_PASSWORD" value="${ORACLE_DB_PASSWORD}" />
<sysproperty key="DB_SUPPORTS_SESSION_LOCAL" value="yes" />
<sysproperty key="BASE_DIR" value="${TEST_BASE_DIR}/single-row-cycle:${TEST_BASE_DIR}/general:${TEST_BASE_DIR}/pseudocolumns:${TEST_BASE_DIR}/pseudocolumns2" />
<classpath refid="test.classpath" />
<formatter type="brief" usefile="false" />
<test name="net.sf.jailer.GeneralDbmsTestSuite" />
</junit>
</target>
<target name="mysql-test" depends="package, compile-test">
<junit fork="no">
<sysproperty key="DB_URL" value="${MYSQL_DB_URL}" />
<sysproperty key="DRIVER_CLASS" value="${MYSQL_DRIVER_CLASS}" />
<sysproperty key="DB_USER" value="${MYSQL_DB_USER}" />
<sysproperty key="DB_PASSWORD" value="${MYSQL_DB_PASSWORD}" />
<sysproperty key="DB_SUPPORTS_SESSION_LOCAL" value="no" />
<sysproperty key="BASE_DIR" value="${TEST_BASE_DIR}/single-row-cycle:${TEST_BASE_DIR}/general:${TEST_BASE_DIR}/pseudocolumns:${TEST_BASE_DIR}/pseudocolumns2" />
<classpath refid="test.classpath" />
<formatter type="brief" usefile="false" />
<test name="net.sf.jailer.GeneralDbmsTestSuite" />
</junit>
</target>
<target name="postgre-test" depends="package, compile-test">
<junit fork="no">
<sysproperty key="DB_URL" value="${POSTGRE_DB_URL}" />
<sysproperty key="DRIVER_CLASS" value="${POSTGRE_DRIVER_CLASS}" />
<sysproperty key="DB_USER" value="${POSTGRE_DB_USER}" />
<sysproperty key="DB_PASSWORD" value="${POSTGRE_DB_PASSWORD}" />
<sysproperty key="DB_SUPPORTS_SESSION_LOCAL" value="yes" />
<sysproperty key="BASE_DIR" value="${TEST_BASE_DIR}/single-row-cycle:${TEST_BASE_DIR}/general:${TEST_BASE_DIR}/pseudocolumns:${TEST_BASE_DIR}/pseudocolumns2" />
<classpath refid="test.classpath" />
<formatter type="brief" usefile="false" />
<test name="net.sf.jailer.GeneralDbmsTestSuite" />
</junit>
</target>
<target name="all" depends="package">
<zip destfile="${JAR-ENGINE-SRC}" basedir="${SRC_DIR}/main/engine">
</zip>
<javadoc packagenames="net.sf.jailer.*" sourcepath="src/main/engine" defaultexcludes="yes" destdir="docs/api" author="true" version="true" use="true" windowtitle="Jailer Subsetter API">
<doctitle><![CDATA[<h1>Jailer Subsetter API</h1>]]></doctitle>
<tag name="todo" scope="all" description="To do:" />
<link offline="true" href="http://docs.oracle.com/javase/7/docs/api/" packagelistLoc="C:\tmp" />
<link href="http://docs.oracle.com/javase/7/docs/api/" />
</javadoc>
<zip destfile="${JAR-ENGINE-DOC}" basedir="docs/api">
</zip>
<rename src="${JAR-ENGINE-SRC}" dest="jailer-engine-${VERSION}-sources.jar"/>
<rename src="${JAR-ENGINE-DOC}" dest="jailer-engine-${VERSION}-javadoc.jar"/>
</target>
</project>