mirror of
https://github.com/Wisser/Jailer.git
synced 2026-01-04 01:29:57 -06:00
196 lines
8.5 KiB
XML
196 lines
8.5 KiB
XML
<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>
|