1<?xml version="1.0" encoding="UTF-8"?> 2<project name="net.sourceforge.phpeclipse.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.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.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.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.core_1.2.3.200910091456PRD.jar" basedir="${temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" filesetmanifest="merge"/> 68 <delete dir="${temp.folder}"/> 69 </target> 70 71 <target name="webcore.jar" depends="init" unless="webcore.jar" description="Create jar: net.sourceforge.phpeclipse.core webcore.jar."> 72 <delete dir="${temp.folder}/webcore.jar.bin"/> 73 <mkdir dir="${temp.folder}/webcore.jar.bin"/> 74 <path id="webcore.jar.classpath"> 75 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime_3.3.100.v20070530.jar"/> 76 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.osgi_3.3.1.R33x_v20070828.jar"/> 77 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.common_3.3.0.v20070426.jar"/> 78 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.jobs_3.3.1.R33x_v20070709.jar"/> 79 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/runtime_registry_compatibility.jar"/> 80 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316"/> 81 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.registry_3.3.1.R33x_v20070802.jar"/> 82 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.preferences_3.2.100.v20070522.jar"/> 83 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/@dot"/> 84 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.contenttype_3.2.100.v20070319.jar"/> 85 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar"/> 86 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.equinox.app_1.0.1.R33x_v20070828.jar"/> 87 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.osgi.services_3.1.200.v20070605.jar"/> 88 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/javax.servlet_2.4.0.v200706111738.jar"/> 89 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.text_3.3.0.v20070606-0010.jar"/> 90 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20071204_2007j/icu-jse4.jar"/> 91 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20071204_2007j/icu-data.jar"/> 92 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20071204_2007j"/> 93 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20080102_2007k/icu-jse4.jar"/> 94 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20080102_2007k/icu-data.jar"/> 95 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu36.data.update_3.6.1.v20080102_2007k"/> 96 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/com.ibm.icu_3.6.1.v20070906.jar"/> 97 <pathelement path="../../../../../../software/eclipse/eclipse.3.3.1.1/plugins/org.eclipse.core.commands_3.3.0.I20070605-0010.jar"/> 98 </path> 99 <!-- compile the source code --> 100 <javac destdir="${temp.folder}/webcore.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" > 101 <compilerarg line="${compilerArg}" compiler="${build.compiler}"/> 102 <classpath refid="webcore.jar.classpath" /> 103 <src path="src/" /> 104 <compilerarg value="@${basedir}/javaCompiler.webcore.jar.args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/> 105 <compilerarg line="-log '${temp.folder}/webcore.jar.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/> 106 </javac> 107 <!-- Copy necessary resources --> 108 <copy todir="${temp.folder}/webcore.jar.bin" failonerror="true" overwrite="false"> 109 <fileset dir="src/"> 110 <exclude name="**/*.java"/> 111 <exclude name="**/package.htm*"/> 112 </fileset> 113 </copy> 114 <mkdir dir="${build.result.folder}"/> 115 <jar destfile="${build.result.folder}/webcore.jar" basedir="${temp.folder}/webcore.jar.bin"/> 116 <delete dir="${temp.folder}/webcore.jar.bin"/> 117 </target> 118 119 <target name="webcoresrc.zip" depends="init" unless="webcoresrc.zip"> 120 <mkdir dir="${build.result.folder}"/> 121 <zip destfile="${build.result.folder}/webcoresrc.zip" filesonly="false" whenempty="skip" update="false"> 122 <fileset dir="src/"> 123 <include name="**/*.java"/> 124 </fileset> 125 </zip> 126 </target> 127 128 <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: net.sourceforge.phpeclipse.core."> 129 <available property="webcore.jar" file="${build.result.folder}/webcore.jar"/> 130 <antcall target="webcore.jar"/> 131 </target> 132 133 <target name="build.sources" depends="init"> 134 <available property="webcoresrc.zip" file="${build.result.folder}/webcoresrc.zip"/> 135 <antcall target="webcoresrc.zip"/> 136 </target> 137 138 <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> 139 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD"/> 140 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" failonerror="true" overwrite="false"> 141 <fileset dir="${build.result.folder}"> 142 <include name="webcore.jar"/> 143 </fileset> 144 </copy> 145 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" failonerror="true" overwrite="false"> 146 <fileset dir="${basedir}"> 147 <include name="plugin.xml"/> 148 <include name="webcore.jar"/> 149 <include name="META-INF/"/> 150 </fileset> 151 </copy> 152 <!--eclipse.versionReplacer path="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" version="1.2.3.200910091456PRD"/--> 153 </target> 154 155 <target name="build.zips" depends="init"> 156 </target> 157 158 <target name="gather.sources" depends="init" if="destination.temp.folder"> 159 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD"/> 160 <copy file="${build.result.folder}/webcoresrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" failonerror="false" overwrite="false"/> 161 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" failonerror="false" overwrite="false"> 162 <fileset dir="${basedir}"> 163 <include name="src/"/> 164 <include name=".classpath"/> 165 <include name=".cvsignore"/> 166 <include name=".project"/> 167 <include name="META-INF/"/> 168 <include name="build.properties"/> 169 </fileset> 170 </copy> 171 </target> 172 173 <target name="gather.logs" depends="init" if="destination.temp.folder"> 174 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD"/> 175 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD" failonerror="false" overwrite="false"> 176 <fileset dir="${temp.folder}"> 177 <include name="webcore.jar.bin${logExtension}"/> 178 </fileset> 179 </copy> 180 </target> 181 182 <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.core of all the zips, jars and logs created."> 183 <delete file="${build.result.folder}/webcore.jar"/> 184 <delete file="${build.result.folder}/webcoresrc.zip"/> 185 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD.jar"/> 186 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD.zip"/> 187 <delete dir="${temp.folder}"/> 188 </target> 189 190 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> 191 <eclipse.convertPath fileSystemPath="/data/builds/PHPEclipse/build/stable/plugins/net.sourceforge.phpeclipse.core" property="resourcePath"/> 192 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> 193 </target> 194 195 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.core."> 196 <delete dir="${temp.folder}"/> 197 <mkdir dir="${temp.folder}"/> 198 <antcall target="build.jars"/> 199 <antcall target="build.sources"/> 200 <antcall target="gather.bin.parts"> 201 <param name="destination.temp.folder" value="${temp.folder}/"/> 202 </antcall> 203 <antcall target="gather.sources"> 204 <param name="destination.temp.folder" value="${temp.folder}/"/> 205 </antcall> 206 <delete> 207 <fileset dir="${temp.folder}"> 208 <include name="**/*.bin${logExtension}"/> 209 </fileset> 210 </delete> 211 <zip destfile="${plugin.destination}/net.sourceforge.phpeclipse.core_1.2.3.200910091456PRD.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> 212 <delete dir="${temp.folder}"/> 213 </target> 214 215</project> 216