blob: 0d1aaa3597ef76c72a0b7f2b3ec802e3772e14c3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) IBM Corporation and others 2008, 2010 This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
All Platform Debug contexts, those for org.eclipse.debug.ui, are located in this file
All contexts are grouped by their relation, with all relations grouped alphabetically.
-->
<project name="Build API Tools Ant Support Jar" default="build" basedir="..">
<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/apitooling-ant.jar"/>
<target name="init" depends="properties">
<property name="temp.folder" value="${basedir}/temp.folder"/>
<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="lib/apitooling-ant.jar" description= "Creates the lib/apitooling-ant.jar" depends="init">
<property name="destdir" value="${temp.folder}/lib/apitooling-ant.bin"/>
<delete dir="${destdir}"/>
<mkdir dir="${destdir}"/>
<mkdir dir="${build.result.folder}/lib"/>
<!-- compile the source code -->
<javac target="1.2" source="1.3" destdir="${destdir}" failonerror="false" verbose="false" debug="on">
<classpath>
<dirset dir="${basedir}/..">
<include name="org.eclipse.core.runtime/bin"/>
<include name="org.eclipse.equinox.common/bin"/>
<include name="org.eclipse.osgi/bin"/>
<include name="org.eclipse.pde.api.tools/bin"/>
<include name="org.eclipse.jdt.core/bin"/>
<include name="org.eclipse.core.resources/bin"/>
<include name="com.ibm.icu/bin"/>
<include name="org.eclipse.pde.core/bin"/>
</dirset>
<fileset dir="${eclipse.home}">
<include name="plugins/org.eclipse.core.runtime*.jar"/>
<include name="plugins/org.eclipse.equinox.common*.jar"/>
<include name="plugins/org.eclipse.osgi*.jar"/>
<include name="plugins/org.eclipse.jdt.core*.jar"/>
<include name="plugins/org.eclipse.core.resources*.jar"/>
<include name="plugins/com.ibm.icu*.jar"/>
<include name="plugins/org.eclipse.pde.core*.jar"/>
</fileset>
</classpath>
<src path="src_ant/"/>
</javac>
<!-- copy the *.class files to the jar location -->
<copy todir="${destdir}" failonerror="true" overwrite="false">
<fileset dir="src_ant/">
<exclude name="**/*.java"/>
<exclude name="**/package.htm*"/>
</fileset>
</copy>
<!-- copy default XSLT files to the jar location -->
<copy todir="${destdir}" failonerror="true" overwrite="false">
<fileset dir="xml/">
<exclude name="**/*.xsd"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<jar destfile="${build.result.folder}/lib/apitooling-ant.jar" basedir="${destdir}"/>
<delete dir="${temp.folder}"/>
</target>
<target name="clean" description="Deletes previous build remnants" depends="init">
<delete file="${build.result.folder}/lib/apitooling-ant.jar"/>
<delete dir="${temp.folder}"/>
</target>
</project>