1<?xml version="1.0" encoding="UTF-8"?> 2<project name="net.sourceforge.phpeclipse.xml.core" default="build.jars" basedir="."> 3 4 <property name="basews" value="${ws}"/> 5 <property name="baseos" value="${os}"/> 6 <property name="basearch" value="${arch}"/> 7 <property name="basenl" value="${nl}"/> 8 <property name="bundleId" value="net.sourceforge.phpeclipse.xml.core"/> 9 <property name="bundleVersion" value="1.2.3.200910091456PRD"/> 10 11 <!-- Compiler settings. --> 12 <property name="javacFailOnError" value="false"/> 13 <property name="javacDebugInfo" value="on"/> 14 <property name="javacVerbose" value="false"/> 15 <property name="logExtension" value=".log"/> 16 <property name="compilerArg" value=""/> 17 <property name="javacSource" value="1.3"/> 18 <property name="javacTarget" value="1.2"/> 19 <condition property="dir_bootclasspath" value="${java.home}/../Classes"> 20 <os family="mac"/> 21 </condition> 22 <property name="dir_bootclasspath" value="${java.home}/lib"/> 23 <path id="path_bootclasspath"> 24 <fileset dir="${dir_bootclasspath}"> 25 <include name="*.jar"/> 26 </fileset> 27 </path> 28 <property name="bootclasspath" refid="path_bootclasspath"/> 29 <condition property="bundleBootClasspath" value="${J2SE-1.4}"> 30 <isset property="J2SE-1.4"/> 31 </condition> 32 <condition property="bundleJavacSource" value="1.3"> 33 <isset property="J2SE-1.4"/> 34 </condition> 35 <condition property="bundleJavacTarget" value="1.2"> 36 <isset property="J2SE-1.4"/> 37 </condition> 38 <property name="bundleJavacSource" value="${javacSource}"/> 39 <property name="bundleJavacTarget" value="${javacTarget}"/> 40 <property name="bundleBootClasspath" value="${bootclasspath}"/> 41 42 <target name="init" depends="properties"> 43 <condition property="pluginTemp" value="${buildTempFolder}/plugins"> 44 <isset property="buildTempFolder"/> 45 </condition> 46 <property name="pluginTemp" value="${basedir}"/> 47 <condition property="build.result.folder" value="${pluginTemp}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD"> 48 <isset property="buildTempFolder"/> 49 </condition> 50 <property name="build.result.folder" value="${basedir}"/> 51 <property name="temp.folder" value="${basedir}/temp.folder"/> 52 <property name="plugin.destination" value="${basedir}"/> 53 </target> 54 55 <target name="properties" if="eclipse.running"> 56 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> 57 58 </target> 59 60 <target name="build.update.jar" depends="init" description="Build the plug-in: net.sourceforge.phpeclipse.xml.core for an update site."> 61 <delete dir="${temp.folder}"/> 62 <mkdir dir="${temp.folder}"/> 63 <antcall target="build.jars"/> 64 <antcall target="gather.bin.parts"> 65 <param name="destination.temp.folder" value="${temp.folder}/"/> 66 </antcall> 67 <jar destfile="${plugin.destination}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD.jar" basedir="${temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" filesetmanifest="merge"/> 68 <delete dir="${temp.folder}"/> 69 </target> 70 71 <target name="xmlcore.jar" depends="init" unless="xmlcore.jar" description="Create jar: net.sourceforge.phpeclipse.xml.core xmlcore.jar."> 72 <delete dir="${temp.folder}/xmlcore.jar.bin"/> 73 <mkdir dir="${temp.folder}/xmlcore.jar.bin"/> 74 <path id="xmlcore.jar.classpath"> 75 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core/bin/"/> 76 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD/bin/"/> 77 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core/webcore.jar"/> 78 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD/webcore.jar"/> 79 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime_3.3.100.v20070530.jar"/> 80 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.osgi_3.3.1.R33x_v20070828.jar"/> 81 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.common_3.3.0.v20070426.jar"/> 82 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.jobs_3.3.1.R33x_v20070709.jar"/> 83 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/runtime_registry_compatibility.jar"/> 84 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/@dot"/> 85 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.registry_3.3.1.R33x_v20070802.jar"/> 86 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.preferences_3.2.100.v20070522.jar"/> 87 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.contenttype_3.2.100.v20070319.jar"/> 88 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar"/> 89 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.app_1.0.1.R33x_v20070828.jar"/> 90 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.osgi.services_3.1.200.v20070605.jar"/> 91 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/javax.servlet_2.4.0.v200706111738.jar"/> 92 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.text_3.3.0.v20070606-0010.jar"/> 93 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20071204_2007j/icu-jse4.jar"/> 94 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20071204_2007j/icu-data.jar"/> 95 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20071204_2007j/@dot"/> 96 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20080102_2007k/icu-jse4.jar"/> 97 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20080102_2007k/icu-data.jar"/> 98 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20080102_2007k/@dot"/> 99 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu_3.6.1.v20070906.jar"/> 100 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.commands_3.3.0.I20070605-0010.jar"/> 101 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.resources_3.3.0.v20070604.jar"/> 102 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.resources.compatibility_3.2.100.v20070502.jar"/> 103 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.ant.core_3.1.200.v20070522.jar"/> 104 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.variables_3.2.0.v20070426.jar"/> 105 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.expressions_3.3.0.v20070606-0010.jar"/> 106 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.filesystem_1.1.0.v20070606.jar"/> 107 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.filesystem.linux.x86_1.1.0.v20070416.jar"/> 108 </path> 109 <!-- compile the source code --> 110 <javac destdir="${temp.folder}/xmlcore.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" > 111 <compilerarg line="${compilerArg}" compiler="${build.compiler}"/> 112 <classpath refid="xmlcore.jar.classpath" /> 113 <src path="src/" /> 114 <compilerarg value="@${basedir}/javaCompiler.xmlcore.jar.args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/> 115 <compilerarg line="-log '${temp.folder}/xmlcore.jar.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/> 116 </javac> 117 <!-- Copy necessary resources --> 118 <copy todir="${temp.folder}/xmlcore.jar.bin" failonerror="true" overwrite="false"> 119 <fileset dir="src/"> 120 <exclude name="**/*.java"/> 121 <exclude name="**/package.htm*"/> 122 </fileset> 123 </copy> 124 <mkdir dir="${build.result.folder}"/> 125 <jar destfile="${build.result.folder}/xmlcore.jar" basedir="${temp.folder}/xmlcore.jar.bin"/> 126 <delete dir="${temp.folder}/xmlcore.jar.bin"/> 127 </target> 128 129 <target name="xmlcoresrc.zip" depends="init" unless="xmlcoresrc.zip"> 130 <mkdir dir="${build.result.folder}"/> 131 <zip destfile="${build.result.folder}/xmlcoresrc.zip" filesonly="false" whenempty="skip" update="false"> 132 <fileset dir="src/"> 133 <include name="**/*.java"/> 134 </fileset> 135 </zip> 136 </target> 137 138 <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: net.sourceforge.phpeclipse.xml.core."> 139 <available property="xmlcore.jar" file="${build.result.folder}/xmlcore.jar"/> 140 <antcall target="xmlcore.jar"/> 141 </target> 142 143 <target name="build.sources" depends="init"> 144 <available property="xmlcoresrc.zip" file="${build.result.folder}/xmlcoresrc.zip"/> 145 <antcall target="xmlcoresrc.zip"/> 146 </target> 147 148 <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> 149 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD"/> 150 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" failonerror="true" overwrite="false"> 151 <fileset dir="${build.result.folder}"> 152 <include name="xmlcore.jar"/> 153 </fileset> 154 </copy> 155 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" failonerror="true" overwrite="false"> 156 <fileset dir="${basedir}"> 157 <include name="xmlcore.jar"/> 158 <include name="cpl-v10.html"/> 159 <include name="plugin.properties"/> 160 <include name="META-INF/"/> 161 </fileset> 162 </copy> 163 <!--eclipse.versionReplacer path="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" version="1.2.3.200910091456PRD"/--> 164 </target> 165 166 <target name="build.zips" depends="init"> 167 </target> 168 169 <target name="gather.sources" depends="init" if="destination.temp.folder"> 170 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD"/> 171 <copy file="${build.result.folder}/xmlcoresrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" failonerror="false" overwrite="false"/> 172 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" failonerror="false" overwrite="false"> 173 <fileset dir="${basedir}"> 174 <include name="src/"/> 175 <include name=".classpath"/> 176 <include name=".cvsignore"/> 177 <include name=".project"/> 178 <include name="plugin.properties"/> 179 <include name="cpl-v10.html"/> 180 <include name="build.properties"/> 181 <include name="META-INF/"/> 182 </fileset> 183 </copy> 184 </target> 185 186 <target name="gather.logs" depends="init" if="destination.temp.folder"> 187 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD"/> 188 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD" failonerror="false" overwrite="false"> 189 <fileset dir="${temp.folder}"> 190 <include name="xmlcore.jar.bin${logExtension}"/> 191 </fileset> 192 </copy> 193 </target> 194 195 <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.xml.core of all the zips, jars and logs created."> 196 <delete file="${build.result.folder}/xmlcore.jar"/> 197 <delete file="${build.result.folder}/xmlcoresrc.zip"/> 198 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD.jar"/> 199 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD.zip"/> 200 <delete dir="${temp.folder}"/> 201 </target> 202 203 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> 204 <eclipse.convertPath fileSystemPath="/data/builds/PHPEclipse/build/stable/plugins/net.sourceforge.phpeclipse.xml.core" property="resourcePath"/> 205 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> 206 </target> 207 208 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.xml.core."> 209 <delete dir="${temp.folder}"/> 210 <mkdir dir="${temp.folder}"/> 211 <antcall target="build.jars"/> 212 <antcall target="build.sources"/> 213 <antcall target="gather.bin.parts"> 214 <param name="destination.temp.folder" value="${temp.folder}/"/> 215 </antcall> 216 <antcall target="gather.sources"> 217 <param name="destination.temp.folder" value="${temp.folder}/"/> 218 </antcall> 219 <delete> 220 <fileset dir="${temp.folder}"> 221 <include name="**/*.bin${logExtension}"/> 222 </fileset> 223 </delete> 224 <zip destfile="${plugin.destination}/net.sourceforge.phpeclipse.xml.core_1.2.3.200910091456PRD.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> 225 <delete dir="${temp.folder}"/> 226 </target> 227 228</project> 229