blob: 7be6e31f8a42835fbeb43858661a6e0d792aa0da [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.pde.build" default="build.jars" basedir=".">
<property name="bootclasspath" value=""/>
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<property name="javacFailOnError" value="false"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="true"/>
<property name="javacSource" value="1.3"/>
<property name="javacTarget" value="1.1"/>
<target name="init" depends="properties">
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
<property name="build.result.folder" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
<target name="build.update.jar" depends="init" description="Build the plug-in: org.eclipse.pde.build for an update site.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<zip zipfile="${plugin.destination}/org.eclipse.pde.build_3.0.0.jar" basedir="${temp.folder}/org.eclipse.pde.build_3.0.0" filesonly="false" whenempty="skip"/>
<delete dir="${temp.folder}"/>
</target>
<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0"/>
<copy todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0">
<fileset dir="${build.result.folder}" includes="plugin.xml,plugin.properties,about.html,*.jar,lib/*.jar,scripts/, templates/, feature/, notes/" />
</copy>
<copy todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0">
<fileset dir="${basedir}" includes="plugin.xml,plugin.properties,about.html,*.jar,lib/*.jar,scripts/, templates/, feature/, notes/" />
</copy>
</target>
<target name="pdebuild.jar" depends="init" unless="pdebuild.jar" description="Create jar: pdebuild.jar.">
<delete dir="${temp.folder}/pdebuild.jar.bin"/>
<mkdir dir="${temp.folder}/pdebuild.jar.bin"/>
<!-- compile the source code -->
<javac destdir="${temp.folder}/pdebuild.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../../../eclipse/eclipse/plugins/org.eclipse.core.boot_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.core.boot_3.0.0/boot.jar;../org.eclipse.core.runtime/bin;../org.eclipse.core.runtime/runtime.jar;../org.eclipse.osgi/bin;../org.eclipse.osgi/osgi.jar;../org.eclipse.osgi/core.jar;../org.eclipse.osgi/resolver.jar;../org.eclipse.osgi/defaultAdaptor.jar;../org.eclipse.osgi/eclipseAdaptor.jar;../org.eclipse.osgi/console.jar;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.services_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.services_3.0.0/services.jar;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.util_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.util_3.0.0/util.jar;../org.eclipse.core.runtime.compatibility/bin;../org.eclipse.core.runtime.compatibility/compatibility.jar;../../../../eclipse/eclipse/plugins/org.eclipse.update.configurator_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.update.configurator_3.0.0/configurator.jar;../../../../eclipse/eclipse/plugins/org.eclipse.ant.core_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.ant.core_3.0.0/antsupport.jar;../../../../eclipse/eclipse/plugins/org.eclipse.core.variables_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.core.variables_3.0.0/variables.jar;../../../../eclipse/eclipse/plugins/org.eclipse.update.core_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.update.core_3.0.0/updatecore.jar;../../../../eclipse/eclipse/plugins/org.eclipse.update.core.win32_3.0.0/updatecore.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/bin;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-antlr.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-apache-bsf.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-apache-resolver.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-commons-logging.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-commons-net.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-icontract.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jai.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-bcel.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-log4j.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-oro.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-regexp.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-javamail.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jdepend.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jmf.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jsch.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-junit.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-launcher.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-netrexx.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-nodeps.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-starteam.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-stylebook.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-swing.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-trax.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-vaj.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-weblogic.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-xalan1.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-xalan2.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-xslp.jar" source="${javacSource}" target="${javacTarget}" >
<src path="src/" />
</javac>
<!-- copy necessary resources -->
<copy todir="${temp.folder}/pdebuild.jar.bin">
<fileset dir="src/" excludes="**/*.java" />
</copy>
<mkdir dir="${build.result.folder}"/>
<jar jarfile="${build.result.folder}/pdebuild.jar" basedir="${temp.folder}/pdebuild.jar.bin"/>
<delete dir="${temp.folder}/pdebuild.jar.bin"/>
</target>
<target name="pdebuildsrc.zip" depends="init" unless="pdebuildsrc.zip">
<mkdir dir="${build.result.folder}"/>
<zip zipfile="${build.result.folder}/pdebuildsrc.zip" filesonly="false" whenempty="skip">
<fileset dir="src/" includes="**/*.java" />
</zip>
</target>
<target name="lib/pdebuild-ant.jar" depends="init" unless="lib/pdebuild-ant.jar" description="Create jar: lib/pdebuild-ant.jar.">
<delete dir="${temp.folder}/lib/pdebuild-ant.jar.bin"/>
<mkdir dir="${temp.folder}/lib/pdebuild-ant.jar.bin"/>
<!-- compile the source code -->
<javac destdir="${temp.folder}/lib/pdebuild-ant.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../../../eclipse/eclipse/plugins/org.eclipse.core.boot_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.core.boot_3.0.0/boot.jar;bin;pdebuild.jar;../org.apache.ant/ant.jar;../org.eclipse.core.runtime/bin;../org.eclipse.core.runtime/runtime.jar;../org.eclipse.osgi/bin;../org.eclipse.osgi/osgi.jar;../org.eclipse.osgi/core.jar;../org.eclipse.osgi/resolver.jar;../org.eclipse.osgi/defaultAdaptor.jar;../org.eclipse.osgi/eclipseAdaptor.jar;../org.eclipse.osgi/console.jar;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.services_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.services_3.0.0/services.jar;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.util_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.osgi.util_3.0.0/util.jar;../org.eclipse.core.runtime.compatibility/bin;../org.eclipse.core.runtime.compatibility/compatibility.jar;../../../../eclipse/eclipse/plugins/org.eclipse.update.configurator_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.update.configurator_3.0.0/configurator.jar;../../../../eclipse/eclipse/plugins/org.eclipse.ant.core_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.ant.core_3.0.0/antsupport.jar;../../../../eclipse/eclipse/plugins/org.eclipse.core.variables_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.core.variables_3.0.0/variables.jar;../../../../eclipse/eclipse/plugins/org.eclipse.update.core_3.0.0/bin;../../../../eclipse/eclipse/plugins/org.eclipse.update.core_3.0.0/updatecore.jar;../../../../eclipse/eclipse/plugins/org.eclipse.update.core.win32_3.0.0/updatecore.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/bin;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-antlr.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-apache-bsf.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-apache-resolver.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-commons-logging.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-commons-net.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-icontract.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jai.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-bcel.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-log4j.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-oro.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jakarta-regexp.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-javamail.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jdepend.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jmf.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-jsch.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-junit.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-launcher.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-netrexx.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-nodeps.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-starteam.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-stylebook.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-swing.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-trax.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-vaj.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-weblogic.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-xalan1.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-xalan2.jar;../../../../eclipse/eclipse/plugins/org.apache.ant_1.6.1/lib/ant-xslp.jar" source="${javacSource}" target="${javacTarget}" >
<src path="src_ant/" />
</javac>
<!-- copy necessary resources -->
<copy todir="${temp.folder}/lib/pdebuild-ant.jar.bin">
<fileset dir="src_ant/" excludes="**/*.java" />
</copy>
<mkdir dir="${build.result.folder}/lib"/>
<jar jarfile="${build.result.folder}/lib/pdebuild-ant.jar" basedir="${temp.folder}/lib/pdebuild-ant.jar.bin"/>
<delete dir="${temp.folder}/lib/pdebuild-ant.jar.bin"/>
</target>
<target name="lib/pdebuild-antsrc.zip" depends="init" unless="lib/pdebuild-antsrc.zip">
<mkdir dir="${build.result.folder}/lib"/>
<zip zipfile="${build.result.folder}/lib/pdebuild-antsrc.zip" filesonly="false" whenempty="skip">
<fileset dir="src_ant/" includes="**/*.java" />
</zip>
</target>
<target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.eclipse.pde.build.">
<available property="pdebuild.jar" file="${build.result.folder}/pdebuild.jar"/>
<antcall target="pdebuild.jar"/>
<available property="lib/pdebuild-ant.jar" file="${build.result.folder}/lib/pdebuild-ant.jar"/>
<antcall target="lib/pdebuild-ant.jar"/>
</target>
<target name="build.sources" depends="init">
<available property="pdebuildsrc.zip" file="${build.result.folder}/pdebuildsrc.zip"/>
<antcall target="pdebuildsrc.zip"/>
<available property="lib/pdebuild-antsrc.zip" file="${build.result.folder}/lib/pdebuild-antsrc.zip"/>
<antcall target="lib/pdebuild-antsrc.zip"/>
</target>
<target name="build.zips" depends="init">
</target>
<target name="gather.sources" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0"/>
<copy file="${build.result.folder}/pdebuildsrc.zip" todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0"/>
<mkdir dir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0/lib"/>
<copy file="${build.result.folder}/lib/pdebuild-antsrc.zip" todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0/lib"/>
<copy todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0">
<fileset dir="${basedir}" includes="about.html" />
</copy>
</target>
<target name="gather.logs" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0"/>
<copy file="${temp.folder}/pdebuild.jar.bin.log" todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0"/>
<mkdir dir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0/lib"/>
<copy file="${temp.folder}/lib/pdebuild-ant.jar.bin.log" todir="${destination.temp.folder}/org.eclipse.pde.build_3.0.0/lib"/>
</target>
<target name="clean" depends="init" description="Clean the plug-in: org.eclipse.pde.build of all the zips, jars and logs created.">
<delete file="${build.result.folder}/pdebuild.jar"/>
<delete file="${build.result.folder}/pdebuildsrc.zip"/>
<delete file="${build.result.folder}/lib/pdebuild-ant.jar"/>
<delete file="${build.result.folder}/lib/pdebuild-antsrc.zip"/>
<delete file="${plugin.destination}/org.eclipse.pde.build_3.0.0.jar"/>
<delete file="${plugin.destination}/org.eclipse.pde.build_3.0.0.zip"/>
<delete dir="${temp.folder}"/>
</target>
<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
<eclipse.convertPath fileSystemPath="d:/work/workspaces/towardM8/org.eclipse.pde.build/" property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
</target>
<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.eclipse.pde.build.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="build.sources"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<antcall target="gather.sources">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<delete>
<fileset dir="${temp.folder}" includes="**/*.bin.log" />
</delete>
<zip zipfile="${plugin.destination}/org.eclipse.pde.build_3.0.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip"/>
<delete dir="${temp.folder}"/>
</target>
</project>