rcernich | 51ade37 | 2006-01-27 19:43:59 +0000 | [diff] [blame] | 1 | <?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 |
| 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.connectivity.db.generic.ui" 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.connectivity.db.generic.ui"/> |
| 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 | <!-- No JavaDoc required for this plugin --> |
| 26 | <property name="add.javadoc" value="false"/> |
| 27 | <property name="javadocWindowTitle" value="DTP JDBC Connection Profile"/> |
| 28 | <property name="javadocDocTitle" value="DTP JDBC Connection Profile Example"/> |
| 29 | <property name="javadocPackages" value="org.eclipse.datatools.connectivity.db.*"/> |
| 30 | <property name="javadocFooter" value="<i>Copyright © 2005 Sybase, Inc. and others. All rights reserved. </i>"/> |
| 31 | <!-- Compiler settings. --> |
| 32 | <property name="javacFailOnError" value="true"/> |
| 33 | <property name="javacDebugInfo" value="on"/> |
| 34 | <property name="javacVerbose" value="true"/> |
| 35 | <property name="javacSource" value="${javac.source}"/> |
| 36 | <property name="javacTarget" value="${javac.target}"/> |
| 37 | <property name="compilerArg" value=""/> |
| 38 | <path id="path_bootclasspath"> |
| 39 | <fileset dir="${java.home}/lib"> |
| 40 | <include name="*.jar"/> |
| 41 | </fileset> |
| 42 | <fileset dir="${eclipse.home}/plugins"> |
| 43 | <!-- Include jared plug-ins --> |
| 44 | <include name="org.eclipse.core.runtime_*.jar"/> |
| 45 | <include name="org.eclipse.osgi_*.jar"/> |
| 46 | <include name="org.eclipse.ui_*.jar"/> |
| 47 | <include name="org.eclipse.swt_*.jar"/> |
| 48 | <include name="org.eclipse.swt.*_*.jar"/> |
| 49 | <include name="org.eclipse.jface_*.jar"/> |
| 50 | <include name="org.eclipse.core.commands_*.jar"/> |
| 51 | <include name="org.eclipse.ui.workbench_*.jar"/> |
jgraham | efd7c6b | 2006-02-21 22:36:08 +0000 | [diff] [blame] | 52 | <include name="org.eclipse.ui.navigator_*.jar"/> |
rcernich | 51ade37 | 2006-01-27 19:43:59 +0000 | [diff] [blame] | 53 | <!-- Include expanded plug-ins --> |
| 54 | <include name="org.eclipse.core.runtime_*/org.eclipse.core.runtime_*.jar"/> |
| 55 | <include name="org.eclipse.osgi_*/org.eclipse.osgi_*.jar"/> |
| 56 | <include name="org.eclipse.ui_*/org.eclipse.ui_*.jar"/> |
| 57 | <include name="org.eclipse.swt_*/org.eclipse.swt_*.jar"/> |
| 58 | <include name="org.eclipse.swt.*_*/org.eclipse.swt.*_*.jar"/> |
| 59 | <include name="org.eclipse.jface_*/org.eclipse.jface_*.jar"/> |
| 60 | <include name="org.eclipse.core.commands_*/org.eclipse.core.commands_*.jar"/> |
| 61 | <include name="org.eclipse.ui.workbench_*/org.eclipse.ui.workbench_*.jar"/> |
| 62 | <include name="org.eclipse.ui.navigator_*/navigator.jar"/> |
| 63 | </fileset> |
| 64 | <!-- Dependencies on other DTP plug-ins, built before this one --> |
| 65 | <fileset dir="../"> |
| 66 | <include name="org.eclipse.datatools.connectivity/bin/*"/> |
| 67 | <include name="org.eclipse.datatools.connectivity/connectivity.jar"/> |
| 68 | <include name="org.eclipse.datatools.connectivity.ui/bin/*"/> |
| 69 | <include name="org.eclipse.datatools.connectivity.ui/connectivityui.jar"/> |
| 70 | <include name="org.eclipse.datatools.connectivity.db.generic/bin/*"/> |
| 71 | <include name="org.eclipse.datatools.connectivity.db.generic/genericdb.jar"/> |
| 72 | </fileset> |
| 73 | </path> |
| 74 | <property name="bootclasspath" refid="path_bootclasspath"/> |
| 75 | <target name="init" depends="properties"> |
| 76 | <condition property="pluginTemp" value="${buildTempFolder}/plugins"> |
| 77 | <isset property="buildTempFolder"/> |
| 78 | </condition> |
| 79 | <property name="pluginTemp" value="${basedir}"/> |
| 80 | <condition property="build.result.folder" value="${pluginTemp}/${module.name}"> |
| 81 | <isset property="buildTempFolder"/> |
| 82 | </condition> |
| 83 | <property name="build.result.folder" value="${basedir}"/> |
| 84 | <property name="temp.folder" value="${basedir}/temp.folder"/> |
| 85 | <property name="plugin.destination" value="${basedir}"/> |
| 86 | </target> |
| 87 | <target name="properties" if="eclipse.running"> |
| 88 | <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> |
| 89 | </target> |
| 90 | <target name="build.update.jar" depends="init" description="Build the plug-in: org.eclipse.datatools.connectivity.db.generic.ui for an update site."> |
| 91 | <delete dir="${temp.folder}"/> |
| 92 | <mkdir dir="${temp.folder}"/> |
| 93 | <antcall target="build.jars"/> |
| 94 | <antcall target="gather.bin.parts"> |
| 95 | <param name="destination.temp.folder" value="${temp.folder}/"/> |
| 96 | </antcall> |
| 97 | <zip destfile="${plugin.destination}/${module.name}_${plugin.version}.jar" basedir="${temp.folder}/${module.name}_${plugin.version}" filesonly="false" whenempty="skip" update="false"/> |
| 98 | <delete dir="${temp.folder}"/> |
| 99 | </target> |
| 100 | <target name="genericdbui.jar" depends="init" unless="genericdbui.jar" description="Create jar: org.eclipse.datatools.connectivity.db.generic.ui genericdbui.jar."> |
| 101 | <delete dir="${temp.folder}/genericdbui.jar.bin"/> |
| 102 | <mkdir dir="${temp.folder}/genericdbui.jar.bin"/> |
| 103 | <!-- compile the source code --> |
| 104 | <javac destdir="${temp.folder}/genericdbui.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" source="${javacSource}" target="${javacTarget}"> |
| 105 | <compilerarg line="${compilerArg}"/> |
| 106 | <classpath refid="path_bootclasspath"/> |
| 107 | <src path="src/"/> |
| 108 | </javac> |
| 109 | <!-- Copy necessary resources --> |
| 110 | <copy todir="${temp.folder}/genericdbui.jar.bin" failonerror="true" overwrite="false"> |
| 111 | <fileset dir="src/" excludes="**/*.java, **/package.htm*,null"/> |
| 112 | </copy> |
| 113 | <mkdir dir="${build.result.folder}"/> |
| 114 | <jar destfile="${build.result.folder}/genericdbui.jar" basedir="${temp.folder}/genericdbui.jar.bin"/> |
| 115 | <delete dir="${temp.folder}/genericdbui.jar.bin"/> |
| 116 | </target> |
| 117 | <target name="genericdbuisrc.zip" depends="init" unless="genericdbuisrc.zip"> |
| 118 | <mkdir dir="${build.result.folder}"/> |
| 119 | <zip destfile="${build.result.folder}/genericdbuisrc.zip" filesonly="false" whenempty="skip" update="false"> |
| 120 | <fileset dir="src/" includes="**/*.java"/> |
| 121 | </zip> |
| 122 | </target> |
| 123 | <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.eclipse.datatools.connectivity.db.generic.ui."> |
| 124 | <available property="genericdbui.jar" file="${build.result.folder}/genericdbui.jar"/> |
| 125 | <antcall target="genericdbui.jar"/> |
| 126 | </target> |
| 127 | <target name="build.sources" depends="init"> |
| 128 | <available property="genericdbuisrc.zip" file="${build.result.folder}/genericdbuisrc.zip"/> |
| 129 | <antcall target="genericdbuisrc.zip"/> |
| 130 | </target> |
| 131 | <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> |
| 132 | <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/> |
| 133 | <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="true" overwrite="false"> |
| 134 | <fileset dir="${build.result.folder}" includes="genericdbui.jar"/> |
| 135 | </copy> |
| 136 | <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="true" overwrite="false"> |
jgraham | a1e9eda | 2006-03-09 15:36:58 +0000 | [diff] [blame] | 137 | <fileset dir="${basedir}" includes="META-INF/,plugin.xml,plugin.properties,about.html,genericdbui.jar,icons/"/> |
rcernich | 51ade37 | 2006-01-27 19:43:59 +0000 | [diff] [blame] | 138 | </copy> |
| 139 | <copy todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"> |
| 140 | <fileset dir="${basedir}" includes="genericdbuisrc.zip"/> |
| 141 | </copy> |
| 142 | </target> |
| 143 | <target name="build.zips" depends="init"/> |
| 144 | <target name="gather.sources" depends="init" if="destination.temp.folder"> |
| 145 | <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/> |
| 146 | <copy file="${build.result.folder}/genericdbuisrc.zip" todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"/> |
| 147 | </target> |
| 148 | <target name="gather.logs" depends="init" if="destination.temp.folder"> |
| 149 | <mkdir dir="${destination.temp.folder}/${module.name}_${plugin.version}"/> |
| 150 | <copy file="${temp.folder}/genericdbui.jar.bin.log" todir="${destination.temp.folder}/${module.name}_${plugin.version}" failonerror="false" overwrite="false"/> |
| 151 | </target> |
| 152 | <target name="clean" depends="init" description="Clean the plug-in: org.eclipse.datatools.connectivity.db.generic.ui of all the zips, jars and logs created."> |
| 153 | <delete file="${build.result.folder}/genericdbui.jar"/> |
| 154 | <delete file="${build.result.folder}/genericdbuisrc.zip"/> |
| 155 | <delete file="${plugin.destination}/${module.name}_${plugin.version}.jar"/> |
| 156 | <delete file="${plugin.destination}/${module.name}_${plugin.version}.zip"/> |
| 157 | <delete dir="${temp.folder}"/> |
| 158 | <antcall target="clean.download.dir"/> |
| 159 | </target> |
| 160 | <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> |
| 161 | <eclipse.convertPath fileSystemPath="C:/V3/3.1/eclipse/workspace-dtp/${module.name}" property="resourcePath"/> |
| 162 | <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> |
| 163 | </target> |
| 164 | <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.eclipse.datatools.connectivity.db.generic.ui."> |
| 165 | <delete dir="${temp.folder}"/> |
| 166 | <mkdir dir="${temp.folder}"/> |
| 167 | <antcall target="build.jars"/> |
| 168 | <antcall target="build.sources"/> |
| 169 | <antcall target="gather.bin.parts"> |
| 170 | <param name="destination.temp.folder" value="${temp.folder}/"/> |
| 171 | </antcall> |
| 172 | <antcall target="gather.sources"> |
| 173 | <param name="destination.temp.folder" value="${temp.folder}/"/> |
| 174 | </antcall> |
| 175 | <delete> |
| 176 | <fileset dir="${temp.folder}" includes="**/*.bin.log"/> |
| 177 | </delete> |
| 178 | <zip destfile="${plugin.destination}/${module.name}_${plugin.version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> |
| 179 | <delete dir="${temp.folder}"/> |
| 180 | </target> |
| 181 | </project> |