jgraham | 5824350 | 2006-01-10 16:09:30 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | ************************************************************************* |
| 4 | * Copyright (c) 2006 Sybase, Inc. and others. |
| 5 | * All rights reserved. This program and the accompanying materials |
| 6 | * are made available under the terms of the Eclipse Public License v1.0 |
| 7 | * which accompanies this distribution, and is available at |
| 8 | * http://www.eclipse.org/legal/epl-v10.html |
| 9 | * |
| 10 | * Contributors: |
| 11 | * Sybase, Inc. - initial API and implementation |
| 12 | * |
| 13 | *************************************************************************** |
| 14 | --> |
| 15 | <project name="org.eclipse.datatools.sqltools.routineeditor" 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.sqltools.routineeditor"/> |
| 18 | |
| 19 | <property name="basews" value="${ws}"/> |
| 20 | <property name="baseos" value="${os}"/> |
| 21 | <property name="basearch" value="${arch}"/> |
| 22 | <property name="basenl" value="${nl}"/> |
| 23 | <property name="eclipse.home" location="."/> |
| 24 | <property file="build.properties"/> |
| 25 | <!-- JavaDoc settings --> |
| 26 | <property name="javadocWindowTitle" value="DTP SQL Tools Rountine Editor Framework"/> |
| 27 | <property name="javadocDocTitle" value="DTP SQL Tools Rountine Editor Framework API (Internal)"/> |
| 28 | <property name="javadocPackages" value="org.eclipse.datatools.sqltools.routineeditor.*"/> |
| 29 | <property name="javadocFooter" value="<i>Copyright © 2006 Sybase, Inc. and others. All rights reserved. </i>"/> |
| 30 | <!-- Compiler settings. --> |
| 31 | <property name="javacFailOnError" value="true"/> |
| 32 | <property name="javacDebugInfo" value="on"/> |
| 33 | <property name="javacVerbose" value="true"/> |
| 34 | <property name="javacSource" value="${javac.source}"/> |
| 35 | <property name="javacTarget" value="${javac.target}"/> |
| 36 | <property name="compilerArg" value=""/> |
| 37 | <path id="path_bootclasspath"> |
| 38 | <fileset dir="${java.home}/lib"> |
| 39 | <include name="*.jar"/> |
| 40 | </fileset> |
| 41 | <fileset dir="${eclipse.home}/plugins"> |
| 42 | <include name="org.eclipse.core.runtime_*.jar"/> |
| 43 | <include name="org.eclipse.osgi_*.jar"/> |
| 44 | <include name="org.eclipse.ui_*.jar"/> |
| 45 | <include name="org.eclipse.swt_*.jar"/> |
| 46 | <include name="org.eclipse.swt.*_*.jar"/> |
| 47 | <include name="org.eclipse.jface_*.jar"/> |
| 48 | <include name="org.eclipse.core.commands_*.jar"/> |
| 49 | <include name="org.eclipse.ui.workbench_*.jar"/> |
| 50 | <include name="org.eclipse.jface.text_*.jar"/> |
| 51 | <include name="org.eclipse.text_*.jar"/> |
| 52 | <include name="org.eclipse.ui.workbench.texteditor_*.jar"/> |
| 53 | <include name="org.eclipse.core.resources_*.jar"/> |
| 54 | <include name="org.eclipse.ui.editors_*.jar"/> |
| 55 | <include name="org.eclipse.core.filebuffers_*.jar"/> |
| 56 | <include name="org.eclipse.ui.views_*.jar"/> |
| 57 | <include name="org.eclipse.debug.core_*.jar"/> |
| 58 | <include name="org.eclipse.debug.ui_*.jar"/> |
jgraham | ad4e6ad | 2006-02-27 01:27:33 +0000 | [diff] [blame] | 59 | <include name="org.eclipse.ui.ide_*.jar"/> |
jgraham | 5824350 | 2006-01-10 16:09:30 +0000 | [diff] [blame] | 60 | <!-- Include jared EMF plug-ins --> |
| 61 | <include name="org.eclipse.emf.ecore_*.jar"/> |
| 62 | <include name="org.eclipse.emf.common_*.jar"/> |
| 63 | <include name="org.eclipse.emf.ecore.sdo_*.jar"/> |
| 64 | <include name="org.eclipse.emf.commonj.sdo_*.jar"/> |
| 65 | <include name="org.eclipse.emf.ecore.xmi_*.jar"/> |
| 66 | <include name="org.eclipse.emf.ecore.change_*.jar"/> |
| 67 | <!-- Include expanded plug-ins --> |
| 68 | <include name="org.eclipse.core.runtime_*/org.eclipse.core.runtime_*.jar"/> |
| 69 | <include name="org.eclipse.osgi_*/org.eclipse.osgi_*.jar"/> |
| 70 | <include name="org.eclipse.ui_*/org.eclipse.ui_*.jar"/> |
| 71 | <include name="org.eclipse.swt_*/org.eclipse.swt_*.jar"/> |
| 72 | <include name="org.eclipse.swt.*_*/org.eclipse.swt.*_*.jar"/> |
| 73 | <include name="org.eclipse.jface_*/org.eclipse.jface_*.jar"/> |
| 74 | <include name="org.eclipse.core.commands_*/org.eclipse.core.commands_*.jar"/> |
| 75 | <include name="org.eclipse.ui.workbench_*/org.eclipse.ui.workbench_*.jar"/> |
| 76 | <include name="org.eclipse.jface.text_*/org.eclipse.jface.text_*.jar"/> |
| 77 | <include name="org.eclipse.text_*/org.eclipse.text_*.jar"/> |
| 78 | <include name="org.eclipse.ui.workbench.texteditor_*/org.eclipse.ui.workbench.texteditor_*.jar"/> |
| 79 | <include name="org.eclipse.core.resources_*/org.eclipse.core.resources_*.jar"/> |
| 80 | <include name="org.eclipse.ui.editors_*/org.eclipse.ui.editors_*.jar"/> |
| 81 | <include name="org.eclipse.core.filebuffers_*/org.eclipse.core.filebuffers_*.jar"/> |
| 82 | <include name="org.eclipse.ui.views_*/org.eclipse.ui.views_*.jar"/> |
| 83 | <include name="org.eclipse.debug.core_*/org.eclipse.debug.core_*.jar"/> |
| 84 | <include name="org.eclipse.debug.core.ui_*/org.eclipse.debug.ui_*.jar"/> |
jgraham | ad4e6ad | 2006-02-27 01:27:33 +0000 | [diff] [blame] | 85 | <include name="org.eclipse.ui.ide_*/org.eclipse.ui.ide_*.jar"/> |
jgraham | 5824350 | 2006-01-10 16:09:30 +0000 | [diff] [blame] | 86 | <!-- Include expanded EMF plug-ins --> |
| 87 | <include name="org.eclipse.core.runtime_*/org.eclipse.core.runtime_*.jar"/> |
| 88 | <include name="org.eclipse.osgi_*/org.eclipse.osgi_*.jar"/> |
| 89 | <include name="org.eclipse.emf.ecore_*/org.eclipse.emf.ecore*.jar"/> |
| 90 | <include name="org.eclipse.emf.common_*/org.eclipse.emf.common*.jar"/> |
| 91 | <include name="org.eclipse.emf.ecore.sdo_*/org.eclipse.emf.ecore.sdo*.jar"/> |
| 92 | <include name="org.eclipse.emf.commonj.sdo_*/org.eclipse.emf.commonj.sdo*.jar"/> |
| 93 | <include name="org.eclipse.emf.ecore.xmi_*/org.eclipse.emf.ecore.xmi*.jar"/> |
| 94 | <include name="org.eclipse.emf.ecore.change_*/org.eclipse.emf.ecore.change*.jar"/> |
| 95 | </fileset> |
| 96 | <!-- Dependencies on other DTP plug-ins, built before this one --> |
| 97 | <fileset dir="../"> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 98 | <include name="org.eclipse.datatools.connectivity/connectivity.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 99 | <include name="org.eclipse.datatools.connectivity.db.generic/genericdb.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 100 | <include name="org.eclipse.datatools.connectivity.sqm.core/rdbcore.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 101 | <include name="org.eclipse.datatools.connectivity.ui/connectivityui.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 102 | <include name="org.eclipse.datatools.modelbase.dbdefinition/databasedefinition.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 103 | <include name="org.eclipse.datatools.modelbase.sql/sqlmodel.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 104 | <include name="org.eclipse.datatools.sqltools.common.ui/sqltoolscommonui.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 105 | <include name="org.eclipse.datatools.sqltools.editor.core/sqleditorframe.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 106 | <include name="org.eclipse.datatools.sqltools.result/sqlresult.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 107 | <include name="org.eclipse.datatools.sqltools.sql/sqltools.jar"/> |
jgraham | eb4d1a5 | 2006-02-27 01:19:07 +0000 | [diff] [blame] | 108 | <include name="org.eclipse.datatools.sqltools.sqleditor/sqleditor.jar"/> |
jgraham | 5824350 | 2006-01-10 16:09:30 +0000 | [diff] [blame] | 109 | </fileset> |
hcao | e6d564a | 2006-03-31 06:12:53 +0000 | [diff] [blame^] | 110 | <dirset dir="../"> |
| 111 | <include name="org.eclipse.datatools.connectivity/bin"/> |
| 112 | <include name="org.eclipse.datatools.connectivity.ui/bin"/> |
| 113 | <include name="org.eclipse.datatools.connectivity.db.generic/bin"/> |
| 114 | <include name="org.eclipse.datatools.connectivity.sqm.core/bin"/> |
| 115 | <include name="org.eclipse.datatools.modelbase.dbdefinition/bin"/> |
| 116 | <include name="org.eclipse.datatools.modelbase.sql/bin"/> |
| 117 | <include name="org.eclipse.datatools.sqltools.sql/bin"/> |
| 118 | <include name="org.eclipse.datatools.sqltools.editor.core/bin"/> |
| 119 | <include name="org.eclipse.datatools.sqltools.common.ui/bin"/> |
| 120 | <include name="org.eclipse.datatools.sqltools.result/bin"/> |
| 121 | <include name="org.eclipse.datatools.sqltools.sqleditor/bin"/> |
| 122 | </dirset> |
| 123 | |
jgraham | 5824350 | 2006-01-10 16:09:30 +0000 | [diff] [blame] | 124 | </path> |
| 125 | <property name="bootclasspath" refid="path_bootclasspath"/> |
| 126 | |
| 127 | <target name="init" depends="properties"> |
| 128 | <condition property="pluginTemp" value="${buildTempFolder}/plugins"> |
| 129 | <isset property="buildTempFolder"/> |
| 130 | </condition> |
| 131 | <property name="pluginTemp" value="${basedir}"/> |
| 132 | <condition property="build.result.folder" value="${pluginTemp}/${module.name}"> |
| 133 | <isset property="buildTempFolder"/> |
| 134 | </condition> |
| 135 | <property name="build.result.folder" value="${basedir}"/> |
| 136 | <property name="temp.folder" value="${basedir}/temp.folder"/> |
| 137 | <property name="plugin.destination" value="${basedir}"/> |
| 138 | </target> |
| 139 | |
| 140 | <target name="properties" if="eclipse.running"> |
| 141 | <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> |
| 142 | |
| 143 | </target> |
| 144 | |
| 145 | <target name="build.update.jar" depends="init" description="Build the plug-in: org.eclipse.datatools.sqltools.routineeditor for an update site."> |
| 146 | <delete dir="${temp.folder}"/> |
| 147 | <mkdir dir="${temp.folder}"/> |
| 148 | <antcall target="build.jars"/> |
| 149 | <antcall target="gather.bin.parts"> |
| 150 | <param name="destination.temp.folder" value="${temp.folder}/"/> |
| 151 | </antcall> |
| 152 | <zip destfile="${plugin.destination}/${module.name}_${plugin.version}.jar" basedir="${temp.folder}/${module.name}_${plugin.version}" filesonly="false" whenempty="skip" update="false"/> |
| 153 | <delete dir="${temp.folder}"/> |
| 154 | </target> |
| 155 | |
| 156 | <target name="routineeditor.jar" depends="init" unless="routineeditor.jar" description="Create jar: org.eclipse.datatools.sqltools.routineeditor routineeditor.jar."> |
| 157 | <delete dir="${temp.folder}/routineeditor.jar.bin"/> |
| 158 | <mkdir dir="${temp.folder}/routineeditor.jar.bin"/> |
| 159 | <!-- compile the source code --> |
| 160 | <javac destdir="${temp.folder}/routineeditor.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" source="${javacSource}" target="${javacTarget}" > |
| 161 | <compilerarg line="${compilerArg}"/> |
| 162 | <classpath refid="path_bootclasspath"/> |
| 163 | <src path="src/"/> |
| 164 | </javac> |
| 165 | <!-- Copy necessary resources --> |
| 166 | <copy todir="${temp.folder}/routineeditor.jar.bin" failonerror="true" overwrite="false"> |
| 167 | <fileset dir="src/" excludes="**/*.java, **/package.htm*,null" /> |
| 168 | </copy> |
| 169 | <mkdir dir="${build.result.folder}"/> |
| 170 | <jar destfile="${build.result.folder}/routineeditor.jar" basedir="${temp.folder}/routineeditor.jar.bin"/> |
| 171 | <delete dir="${temp.folder}/routineeditor.jar.bin"/> |
| 172 | </target> |
| 173 | |
| 174 | <target name="routineeditorsrc.zip" depends="init" unless="routineeditorsrc.zip"> |
| 175 | <mkdir dir="${build.result.folder}"/> |
| 176 | <zip destfile="${build.result.folder}/routineeditorsrc.zip" filesonly="false" whenempty="skip" update="false"> |
| 177 | <fileset dir="src/" includes="**/*.java" /> |
| 178 | </zip> |
| 179 | </target> |
| 180 | |
| 181 | <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.eclipse.datatools.sqltools.routineeditor."> |
| 182 | <available property="routineeditor.jar" file="${build.result.folder}/routineeditor.jar"/> |
| 183 | <antcall target="routineeditor.jar"/> |
| 184 | </target> |
| 185 | |
| 186 | <target name="build.sources" depends="init"> |
| 187 | <available property="routineeditorsrc.zip" file="${build.result.folder}/routineeditorsrc.zip"/> |
| 188 | <antcall target="routineeditorsrc.zip"/> |
| 189 | </target> |
| 190 | |
| 191 | <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> |
| 192 | <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/> |
| 193 | <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="true" overwrite="false"> |
| 194 | <fileset dir="${build.result.folder}" includes="routineeditor.jar" /> |
| 195 | </copy> |
| 196 | <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="true" overwrite="false"> |
jgraham | af5dea2 | 2006-03-09 15:44:31 +0000 | [diff] [blame] | 197 | <fileset dir="${basedir}" includes="META-INF/,icons/,routineeditor.jar,plugin.xml,plugin.properties,routineeditor.jar,about.html,schema/" /> |
jgraham | 5824350 | 2006-01-10 16:09:30 +0000 | [diff] [blame] | 198 | </copy> |
| 199 | <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"> |
| 200 | <fileset dir="${basedir}" includes="routineeditorsrc.zip"/> |
| 201 | </copy> |
| 202 | </target> |
| 203 | |
| 204 | <target name="build.zips" depends="init"> |
| 205 | </target> |
| 206 | |
| 207 | <target name="gather.sources" depends="init" if="destination.temp.folder"> |
| 208 | <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/> |
| 209 | <copy file="${build.result.folder}/routineeditorsrc.zip" todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"/> |
| 210 | </target> |
| 211 | |
| 212 | <target name="gather.logs" depends="init" if="destination.temp.folder"> |
| 213 | <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/> |
| 214 | <copy file="${temp.folder}/routineeditor.jar.bin.log" todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"/> |
| 215 | </target> |
| 216 | |
| 217 | <target name="clean" depends="init" description="Clean the plug-in: org.eclipse.datatools.sqltools.routineeditor of all the zips, jars and logs created."> |
| 218 | <delete file="${build.result.folder}/routineeditor.jar"/> |
| 219 | <delete file="${build.result.folder}/routineeditorsrc.zip"/> |
| 220 | <delete file="${plugin.destination}/${module.name}_${plugin.version}.jar"/> |
| 221 | <delete file="${plugin.destination}/${module.name}_${plugin.version}.zip"/> |
| 222 | <delete dir="${temp.folder}"/> |
| 223 | </target> |
| 224 | |
| 225 | <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> |
| 226 | <eclipse.convertPath fileSystemPath="C:/V3/3.1/eclipse/workspace-dtp/org.eclipse.datatools.sqltools.routineeditor" property="resourcePath"/> |
| 227 | <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> |
| 228 | </target> |
| 229 | |
| 230 | <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.eclipse.datatools.sqltools.routineeditor."> |
| 231 | <delete dir="${temp.folder}"/> |
| 232 | <mkdir dir="${temp.folder}"/> |
| 233 | <antcall target="build.jars"/> |
| 234 | <antcall target="build.sources"/> |
| 235 | <antcall target="gather.bin.parts"> |
| 236 | <param name="destination.temp.folder" value="${temp.folder}/"/> |
| 237 | </antcall> |
| 238 | <antcall target="gather.sources"> |
| 239 | <param name="destination.temp.folder" value="${temp.folder}/"/> |
| 240 | </antcall> |
| 241 | <delete> |
| 242 | <fileset dir="${temp.folder}" includes="**/*.bin.log" /> |
| 243 | </delete> |
| 244 | <zip destfile="${plugin.destination}/${module.name}_${plugin.version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> |
| 245 | <delete dir="${temp.folder}"/> |
| 246 | </target> |
| 247 | |
| 248 | </project> |