blob: 13b97cc76b0abe6339fb03ed9a844d996a02be45 [file] [log] [blame]
jgraham03ebc7e2006-01-10 16:09:27 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 *************************************************************************
4 * Copyright (c) 2005 Sybase, Inc. and others.
5 * All rights reserved. This program and the accompanying materials
nickboldt209258c2018-11-01 16:51:54 -04006 * are made available under the terms of the Eclipse Public License 2.0
jgraham03ebc7e2006-01-10 16:09:27 +00007 * which accompanies this distribution, and is available at
nickboldt209258c2018-11-01 16:51:54 -04008 * https://www.eclipse.org/legal/epl-2.0/
jgraham03ebc7e2006-01-10 16:09:27 +00009 *
10 * Contributors:
11 * Sybase, Inc. - initial API and implementation
12 *
13 ***************************************************************************
14 -->
15<project name="org.eclipse.datatools.modelbase.sql.xml.query" default="build.jars" basedir=".">
16 <import file="../org.eclipse.datatools.build/common_build.xml" optional="true"/>
17 <property name="module.name" value="org.eclipse.datatools.modelbase.sql.xml.query"/>
18 <property name="basews" value="${ws}"/>
19 <property name="baseos" value="${os}"/>
20 <property name="basearch" value="${arch}"/>
21 <property name="basenl" value="${nl}"/>
22 <property name="eclipse.home" location="."/>
23 <property file="build.properties"/>
24 <!-- JavaDoc settings -->
25 <property name="javadocWindowTitle" value="DTP SQL XML Query Model"/>
26 <property name="javadocDocTitle" value="DTP SQL XML Query Model API (Internal)"/>
27 <property name="javadocPackages" value="org.eclipse.datatools.modelbase.sql.xml.query.*"/>
28 <property name="javadocFooter" value="&lt;i>Copyright &#169; 2005 IBM Corporation and others. All rights reserved. &lt;/i>"/>
29 <!-- Compiler settings. -->
30 <property name="javacFailOnError" value="true"/>
31 <property name="javacDebugInfo" value="on"/>
32 <property name="javacVerbose" value="true"/>
33 <property name="javacSource" value="${javac.source}"/>
34 <property name="javacTarget" value="${javac.target}"/>
35 <property name="compilerArg" value=""/>
36 <path id="path_bootclasspath">
37 <fileset dir="${java.home}/lib">
38 <include name="*.jar"/>
39 </fileset>
40 <!-- Plug-ins found in Eclipse install directory -->
41 <fileset dir="${eclipse.home}/plugins">
42 <include name="org.eclipse.core.runtime_*.jar"/>
43 <include name="org.eclipse.osgi_*.jar"/>
44 <!-- Include jared EMF plug-ins -->
45 <include name="org.eclipse.emf.ecore_*.jar"/>
46 <include name="org.eclipse.emf.common_*.jar"/>
47 <include name="org.eclipse.emf.ecore.sdo_*.jar"/>
48 <include name="org.eclipse.emf.commonj.sdo_*.jar"/>
49 <include name="org.eclipse.emf.ecore.xmi_*.jar"/>
50 <include name="org.eclipse.emf.ecore.change_*.jar"/>
51 <!-- Include expanded EMF plug-ins -->
52 <include name="org.eclipse.core.runtime_*/org.eclipse.core.runtime_*.jar"/>
53 <include name="org.eclipse.osgi_*/org.eclipse.osgi_*.jar"/>
54 <include name="org.eclipse.emf.ecore_*/org.eclipse.emf.ecore*.jar"/>
55 <include name="org.eclipse.emf.common_*/org.eclipse.emf.common*.jar"/>
56 <include name="org.eclipse.emf.ecore.sdo_*/org.eclipse.emf.ecore.sdo*.jar"/>
57 <include name="org.eclipse.emf.commonj.sdo_*/org.eclipse.emf.commonj.sdo*.jar"/>
58 <include name="org.eclipse.emf.ecore.xmi_*/org.eclipse.emf.ecore.xmi*.jar"/>
59 <include name="org.eclipse.emf.ecore.change_*/org.eclipse.emf.ecore.change*.jar"/>
60 </fileset>
61 <!-- Dependencies on other DTP plug-ins, built before this one -->
62 <fileset dir="../">
63 <include name="org.eclipse.datatools.modelbase.sql/bin/*"/>
64 <include name="org.eclipse.datatools.modelbase.sql/sqlmodel.jar"/>
65 <include name="org.eclipse.datatools.modelbase.sql.query/bin/*"/>
66 <include name="org.eclipse.datatools.modelbase.sql.query/sqlquerymodel.jar"/>
67 </fileset>
68 </path>
69 <property name="bootclasspath" refid="path_bootclasspath"/>
70 <target name="init" depends="properties">
71 <condition property="pluginTemp" value="${buildTempFolder}/plugins">
72 <isset property="buildTempFolder"/>
73 </condition>
74 <property name="pluginTemp" value="${basedir}"/>
75 <condition property="build.result.folder" value="${pluginTemp}/${module.name}">
76 <isset property="buildTempFolder"/>
77 </condition>
78 <property name="build.result.folder" value="${basedir}"/>
79 <property name="temp.folder" value="${basedir}/temp.folder"/>
80 <property name="plugin.destination" value="${basedir}"/>
81 </target>
82 <target name="properties" if="eclipse.running">
83 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
84 </target>
85 <target name="build.update.jar" depends="init" description="Build the plug-in: org.eclipse.datatools.modelbase.sql.xml.query for an update site.">
86 <delete dir="${temp.folder}"/>
87 <mkdir dir="${temp.folder}"/>
88 <antcall target="build.jars"/>
89 <antcall target="gather.bin.parts">
90 <param name="destination.temp.folder" value="${temp.folder}/"/>
91 </antcall>
92 <zip destfile="${plugin.destination}/${module.name}_${plugin.version}.jar" basedir="${temp.folder}/${module.name}_${plugin.version}" filesonly="false" whenempty="skip" update="false"/>
93 <delete dir="${temp.folder}"/>
94 </target>
95 <target name="sqlxmlquerymodel.jar" depends="init" unless="sqlxmlquerymodel.jar" description="Create jar: org.eclipse.datatools.modelbase.sql.xml.query sqlxmlquerymodel.jar.">
96 <delete dir="${temp.folder}/sqlxmlquerymodel.jar.bin"/>
97 <mkdir dir="${temp.folder}/sqlxmlquerymodel.jar.bin"/>
98 <!-- compile the source code -->
99 <javac destdir="${temp.folder}/sqlxmlquerymodel.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" source="${javacSource}" target="${javacTarget}">
100 <compilerarg line="${compilerArg}"/>
101 <classpath refid="path_bootclasspath"/>
102 <src path="src/"/>
103 </javac>
104 <!-- Copy necessary resources -->
105 <copy todir="${temp.folder}/sqlxmlquerymodel.jar.bin" failonerror="true" overwrite="false">
106 <fileset dir="src/" excludes="**/*.java, **/package.htm*,null"/>
107 </copy>
108 <mkdir dir="${build.result.folder}"/>
109 <jar destfile="${build.result.folder}/sqlxmlquerymodel.jar" basedir="${temp.folder}/sqlxmlquerymodel.jar.bin"/>
110 <delete dir="${temp.folder}/sqlxmlquerymodel.jar.bin"/>
111 </target>
112 <target name="sqlxmlquerymodelsrc.zip" depends="init" unless="sqlxmlquerymodelsrc.zip">
113 <mkdir dir="${build.result.folder}"/>
114 <zip destfile="${build.result.folder}/sqlxmlquerymodelsrc.zip" filesonly="false" whenempty="skip" update="false">
115 <fileset dir="src/" includes="**/*.java"/>
116 </zip>
117 </target>
118 <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.eclipse.datatools.modelbase.sql.xml.query.">
119 <available property="sqlxmlquerymodel.jar" file="${build.result.folder}/sqlxmlquerymodel.jar"/>
120 <antcall target="sqlxmlquerymodel.jar"/>
121 </target>
122 <target name="build.sources" depends="init">
123 <available property="sqlxmlquerymodelsrc.zip" file="${build.result.folder}/sqlxmlquerymodelsrc.zip"/>
124 <antcall target="sqlxmlquerymodelsrc.zip"/>
125 </target>
126 <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
127 <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/>
128 <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="true" overwrite="false">
129 <fileset dir="${build.result.folder}" includes="sqlxmlquerymodel.jar"/>
130 </copy>
131 <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="true" overwrite="false">
132 <fileset dir="${basedir}" includes="plugin.xml,about.html,META-INF/,sqlxmlquerymodel.jar,META-INF/,plugin.properties"/>
133 </copy>
134 <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false">
135 <fileset dir="${basedir}" includes="sqlxmlquerymodelsrc.zip"/>
136 </copy>
137 </target>
138 <target name="build.zips" depends="init"/>
139 <target name="gather.sources" depends="init" if="destination.temp.folder">
140 <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/>
141 <copy file="${build.result.folder}/sqlxmlquerymodelsrc.zip" todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"/>
142 </target>
143 <target name="gather.logs" depends="init" if="destination.temp.folder">
144 <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/>
145 <copy file="${temp.folder}/sqlxmlquerymodel.jar.bin.log" todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"/>
146 </target>
147 <target name="clean" depends="init" description="Clean the plug-in: org.eclipse.datatools.modelbase.sql.xml.query of all the zips, jars and logs created.">
148 <delete file="${build.result.folder}/sqlxmlquerymodel.jar"/>
149 <delete file="${build.result.folder}/sqlxmlquerymodelsrc.zip"/>
150 <delete file="${plugin.destination}/${module.name}_${plugin.version}.jar"/>
151 <delete file="${plugin.destination}/${module.name}_${plugin.version}.zip"/>
152 <delete dir="${temp.folder}"/>
153 </target>
154 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
155 <eclipse.convertPath fileSystemPath="C:/V3/3.1/eclipse/workspace-dtp/org.eclipse.datatools.modelbase.sql.xml.query" property="resourcePath"/>
156 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
157 </target>
158 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.eclipse.datatools.modelbase.sql.xml.query.">
159 <delete dir="${temp.folder}"/>
160 <mkdir dir="${temp.folder}"/>
161 <antcall target="build.jars"/>
162 <antcall target="build.sources"/>
163 <antcall target="gather.bin.parts">
164 <param name="destination.temp.folder" value="${temp.folder}/"/>
165 </antcall>
166 <antcall target="gather.sources">
167 <param name="destination.temp.folder" value="${temp.folder}/"/>
168 </antcall>
169 <delete>
170 <fileset dir="${temp.folder}" includes="**/*.bin.log"/>
171 </delete>
172 <zip destfile="${plugin.destination}/${module.name}_${plugin.version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
173 <delete dir="${temp.folder}"/>
174 </target>
175</project>