blob: ae8767187df4a7c69c6cd3a11bd469c9a8a3bff1 [file] [log] [blame]
<!--
For use in development of the Ant core plugin
This script can be used to update a target for testing/debugging
Export a jar of .class files for the org.eclipse.ant.core Eclipse plugin
along with other important plugin files to the "plugin-export" subdirectory
of the target Eclipse installation
As well the export of the plugin is copied to a target installation.
-->
<project name="org.eclipse.ant.core" default="export" basedir="..">
<!-- Set the timestamp and important properties -->
<target name="init">
<tstamp/>
<property name="bootclasspath" value=""/>
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<property name="destdir" value="../../plugin-export" />
<property name="pluginName" value= "org.eclipse.ant.core_2.1.0"/>
<property name="destBin" value="${destdir}/${pluginName}" />
<property name="destSrc" value="${destdir}/org.eclipse.platform.source/src/org.eclipse.ant.core_2.1.0" />
<property name="temp.folder" value="${destdir}/temp.folder"/>
<property name="currentBuild" value="../../Debugger/Ant/eclipse"/>
<property name="currentBuildPlugins" value="${currentBuild}/plugins/${pluginName}"/>
</target>
<!-- Create the jar of .class files, and copy other important files to export dir -->
<target name="export" depends="init">
<mkdir dir="${destdir}" />
<delete dir="${destBin}" />
<mkdir dir="${destBin}" />
<delete dir="${destSrc}" />
<mkdir dir="${destSrc}" />
<delete dir="${destBin}/lib" />
<jar
jarfile="${destBin}/antsupport.jar"
basedir="bin"
excludes="bin/org/eclipse/ant/internal/core/ant"
/>
<!-- Create the source zip -->
<zip zipfile="${destSrc}/antsuppportsrc.zip">
<fileset dir="src"/>
</zip>
<copy file="plugin.xml" todir="${destBin}"/>
<copy file="plugin.properties" todir="${destBin}"/>
<copy file="about.html" todir="${destBin}"/>
<copy file=".classpath" todir="${destBin}"/>
<copy file=".options" todir="${destBin}"/>
<delete dir="${temp.folder}/lib/antsupportlib.jar.bin"/>
<mkdir dir="${temp.folder}/lib/antsupportlib.jar.bin"/>
<!-- compile the source code -->
<javac destdir="${temp.folder}/lib/antsupportlib.jar.bin" failonerror="false" verbose="false" debug="on" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="${basedir}/../org.eclipse.core.runtime/runtime.jar;${basedir}/../org.apache.ant/ant.jar;${basedir}/../org.apache.xerces/xercesImpl.jar;${basedir}/../org.apache.xerces/xmlParserAPIs.jar;${basedir}/bin;${basedir}/../org.eclipse.core.boot/boot.jar;">
<src path="src_ant/"/>
</javac>
<!-- copy necessary resources -->
<copy todir="${temp.folder}/lib/antsupportlib.jar.bin">
<fileset dir="src_ant/" excludes="**/*.java"/>
</copy>
<mkdir dir="${destBin}/lib"/>
<jar jarfile="${destBin}/lib/antsupportlib.jar" basedir="${temp.folder}/lib/antsupportlib.jar.bin"/>
<delete dir="${temp.folder}"/>
</target>
<target name="copy" depends="init">
<copy todir="${currentBuildPlugins}">
<fileset dir="${destBin}"/>
</copy>
</target>
</project>