<?xml version="1.0" encoding="UTF-8"?>
<project name="ch.sahits.codegen.java.datatools" default="build.jars" basedir=".">
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<property name="bundleId" value="ch.sahits.codegen.java.datatools"/>
<property name="bundleVersion" value="2.1.0"/>
<!-- Compiler settings. -->
<property name="javacFailOnError" value="false"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="false"/>
<property name="logExtension" value=".log"/>
<property name="compilerArg" value=""/>
<property name="javacSource" value="1.5"/>
<property name="javacTarget" value="1.2"/>
<condition property="dir_bootclasspath" value="${java.home}/../Classes">
<os family="mac"/>
</condition>
<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<condition property="bundleBootClasspath" value="${J2SE-1.5}" >
<isset property="J2SE-1.5"/>
</condition>
<condition property="bundleJavacSource" value="1.5" >
<isset property="J2SE-1.5"/>
</condition>
<condition property="bundleJavacTarget" value="1.5" >
<isset property="J2SE-1.5"/>
</condition>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins" >
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/ch.sahits.codegen.java.datatools_${bundleVersion}" >
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
<target name="build.update.jar" depends="init" description="Build the plug-in: ch.sahits.codegen.java.datatools for an update site.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<jar destfile="${plugin.destination}/ch.sahits.codegen.java.datatools_${bundleVersion}.jar" basedir="${temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}" filesetmanifest="merge"/>
<delete dir="${temp.folder}"/>
</target>
<target name="@dot" depends="init" unless="@dot" description="Create jar: ch.sahits.codegen.java.datatools @dot.">
<delete dir="${temp.folder}/@dot.bin"/>
<mkdir dir="${temp.folder}/@dot.bin"/>
<path id="@dot.classpath">
<pathelement path="../ch.sahits.codegen.java/bin/"/>
<pathelement path="../ch.sahits.codegen.java/@dot"/>
<pathelement path="../ch.sahits.codegen.i18n.de/bin/"/>
<pathelement path="../ch.sahits.codegen.i18n.de/@dot"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.views_3.3.0.I20080509-2000.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.runtime_3.4.0.v20080512.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.equinox.common_3.4.0.v20080421-2006.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.jobs_3.4.0.v20080512.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/runtime_registry_compatibility.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.equinox.registry_3.4.0.v20080516-0950.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.equinox.preferences_3.2.201.R34x_v20080709.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/@dot"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.contenttype_3.3.0.v20080604-1400.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.equinox.app_${bundleVersion}.v20080421-2006.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.osgi.services_3.1.200.v20071203.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/javax.servlet_2.4.0.v200806031604.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.help_3.3.101.v20080702_34x.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.expressions_3.4.0.v20080603-2000.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui_3.4.1.M20080910-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.swt_3.4.1.v3449c.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jface_3.4.1.M20080827-2000.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.commands_3.4.0.I20080509-2000.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.workbench_3.4.1.M20080827-0800a.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20080509-2000/compatibility.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20080509-2000/@dot"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/com.ibm.icu_3.8.1.v20080530.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jface.databinding_1.2.1.M20080827-0800a.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.databinding_1.1.1.M20080827-0800b.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.resources_3.4.1.R34x_v20080902.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.resources.compatibility_3.4.0.v20080604-1400.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ant.core_3.2.0.v20080529.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.variables_3.2.100.v20080529-1300.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.filesystem_1.2.0.v20080604-1400.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.filesystem.linux.x86_1.2.0.v20080604-1400.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jface.text_3.4.1.r341_v20080827-1100.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.text_3.4.0.v20080605-1800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.editors_3.4.0.v20080603-2000.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.ide_3.4.1.M20080903-2000.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.update.configurator_3.2.201.R34x_v20080819.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.update.core_3.2.201.R34x_v20080714.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.update.core.linux_3.2.0.v20080422.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.net_${bundleVersion}.I20080604.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.net.linux.x86_1.0.0.I20080521.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.equinox.security_1.0.1.R34x_v20080721.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.update.ui_3.2.100.v20080318.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.forms_3.3.101.v20080708_34x.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.workbench.texteditor_3.4.1.r341_v20080827-1100.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.core.filebuffers_3.4.0.v20080603-2000.jar"/>
<pathelement path="../org.jdom/jdom.jar"/>
<pathelement path="../ch.sahits.util/sahitsUtil_0.1.1.jar"/>
<pathelement path="../ch.sahits.util/sahitsUtil_src_0.1.1.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.emf.codegen_2.4.0.v200808251517.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.emf.common_2.4.0.v200808251517.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.compiler.apt_1.0.100.v20080513-1235.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.compiler.tool_1.0.100.v_883_R34x.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.team.core_3.4.1.r34x_20080827.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.launching_3.4.1.v20080729_r341.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.debug.core_3.4.0.v20080612.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.debug_3.4.0.v20080604/jdi.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.debug_3.4.0.v20080604/jdimodel.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.debug_3.4.0.v20080604/tools.jar"/>
<pathelement path="../ch.sahits.model/bin/"/>
<pathelement path="../ch.sahits.model/@dot"/>
<pathelement path="../ch.sahits.codegen.core/bin/"/>
<pathelement path="../ch.sahits.codegen.core/@dot"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.ui_3.4.1.r341_v20080827-1100.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.console_3.3.0.v20080529-1300.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.search_3.4.1.r341_v20080813-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ltk.core.refactoring_3.4.1.r341_v20080716-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ltk.ui.refactoring_3.4.1.r341_v20080716-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.navigator_3.3.101.M20080827-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.compare_3.4.0.I20080604.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.team.ui_3.4.1.r34x_20080827.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.navigator.resources_3.3.101.M20080910-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.ui.views.properties.tabbed_3.4.1.M20080730-0800.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.debug.ui_3.4.1.v20080811_r341.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.jdt.core.manipulation_1.2.0.v20080603-2000.jar"/>
<pathelement path="../ch.sahits.codegen.help/bin/"/>
<pathelement path="../ch.sahits.codegen.help/@dot"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.datatools.connectivity_1.1.1.v200809180120.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.datatools.connectivity.sqm.core_1.0.3.v200809180120.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.emf.ecore.change_2.4.0.v200808251517.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.emf.ecore_2.4.1.v200808251517.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.emf.ecore.xmi_2.4.1.v200808251517.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.datatools.modelbase.sql_1.0.0.v200805152355.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.datatools.modelbase.dbdefinition_1.0.0.v200808020150.jar"/>
<pathelement path="../../../../opt/eclipse3.4/plugins/org.eclipse.datatools.connectivity.db.generic_1.0.0.v200805152355.jar"/>
</path>
<!-- compile the source code -->
<javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" >
<compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
<classpath refid="@dot.classpath" />
<src path="src/" />
<compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<compilerarg line="-log '${temp.folder}/@dot.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</javac>
<!-- Copy necessary resources -->
<copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false">
<fileset dir="src/">
<exclude name="**/*.java"/>
<exclude name="**/package.htm*"/>
</fileset>
</copy>
<mkdir dir="${build.result.folder}"/>
<copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">
<fileset dir="${temp.folder}/@dot.bin">
</fileset>
</copy>
<delete dir="${temp.folder}/@dot.bin"/>
</target>
<target name="src.zip" depends="init" unless="src.zip">
<mkdir dir="${build.result.folder}"/>
<antcall target="zip.src.zip"/>
</target>
<target name="zip.src.zip">
<zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
<fileset dir="src/">
<include name="**/*.java"/>
</fileset>
</zip>
</target>
<target name="copy.src.zip">
<copy todir="${source.destination.folder}/" failonerror="true" overwrite="true">
<fileset dir="src/">
<include name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: ch.sahits.codegen.java.datatools.">
<available property="@dot" file="${build.result.folder}/@dot"/>
<antcall target="@dot"/>
</target>
<target name="build.sources" depends="init">
<available property="src.zip" file="${build.result.folder}/src.zip"/>
<antcall target="src.zip"/>
</target>
<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}"/>
<copy todir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}" failonerror="true" overwrite="false">
<fileset dir="${build.result.folder}/@dot">
<include name="**"/>
</fileset>
</copy>
<copy todir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}" failonerror="true" overwrite="false">
<fileset dir="${basedir}">
<include name="META-INF/"/>
<include name="plugin.xml"/>
</fileset>
</copy>
</target>
<target name="build.zips" depends="init">
</target>
<target name="gather.sources" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}"/>
<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}" failonerror="false" overwrite="false"/>
<antcall target="copy.src.includes">
<param name="source.destination.folder" value="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}"/>
</antcall>
</target>
<target name="gather.individual.sources" depends="init">
<antcall target="copy.src.zip">
<param name="source.destination.folder" value="${destination.temp.folder}"/>
</antcall>
<antcall target="copy.src.includes">
<param name="source.destination.folder" value="${destination.temp.folder}"/>
</antcall>
</target>
<target name="copy.src.includes" depends="init">
</target>
<target name="gather.logs" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}"/>
<copy todir="${destination.temp.folder}/ch.sahits.codegen.java.datatools_${bundleVersion}" failonerror="false" overwrite="false">
<fileset dir="${temp.folder}">
<include name="@dot.bin${logExtension}"/>
</fileset>
</copy>
</target>
<target name="clean" depends="init" description="Clean the plug-in: ch.sahits.codegen.java.datatools of all the zips, jars and logs created.">
<delete dir="${build.result.folder}/@dot"/>
<delete file="${build.result.folder}/src.zip"/>
<delete file="${plugin.destination}/ch.sahits.codegen.java.datatools_${bundleVersion}.jar"/>
<delete file="${plugin.destination}/ch.sahits.codegen.java.datatools_${bundleVersion}.zip"/>
<delete dir="${temp.folder}"/>
</target>
<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
<eclipse.convertPath fileSystemPath="/home/andi/codegen/ch.sahits.codegen.java.datatools" property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
</target>
<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: ch.sahits.codegen.java.datatools.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="build.sources"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<antcall target="gather.sources">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<delete>
<fileset dir="${temp.folder}">
<include name="**/*.bin${logExtension}"/>
</fileset>
</delete>
<zip destfile="${plugin.destination}/ch.sahits.codegen.java.datatools_${bundleVersion}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
<delete dir="${temp.folder}"/>
</target>
</project>