blob: 3f7383f60e55cf43bb9de15a840c3cb709f9ab0b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2005, 2011 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
IBM Corporation - initial API and implementation
-->
<project name="Build AntUI Remote Ant support JAR" default="build" basedir="..">
<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/remoteAntLib.jar"/>
<target name="init" depends="properties">
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="build.result.folder" value="${basedir}"/>
<property name="version.suffix" value="_3.1.0"/>
<property name="win32.jar" value="${eclipse.home}/plugins/org.eclipse.swt.win32.win32.x86${version.suffix}.jar"/>
<property name="gtk.jar" value="${eclipse.home}/plugins/org.eclipse.swt.gtk.linux.x86${version.suffix}.jar"/>
<property name="motif.jar" value="${eclipse.home}/plugins/org.eclipse.swt.motif${version.suffix}.jar"/>
<property name="osx.jar" value="${eclipse.home}/plugins/org.eclipse.swt.carbon.macosx.ppc${version.suffix}.jar"/>
<available file="${win32.jar}" property="swt.jar" value="${win32.jar}"/>
<available file="${gtk.jar}" property="swt.jar" value="${gtk.jar}"/>
<available file="${motif.jar}" property="swt.jar" value="${motif.jar}"/>
<available file="${osx.jar}" property="swt.jar" value="${osx.jar}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
<target name="lib/remoteAntLib.jar" description= "Creates the remoteAnt.jar" depends="init">
<property name="destdir" value="${temp.folder}/lib/remoteAnt.jar.bin"/>
<delete dir="${destdir}"/>
<mkdir dir="${destdir}"/>
<!-- compile the source code -->
<javac target="1.1" destdir="${destdir}" failonerror="true" verbose="false" debug="on" includeJavaRuntime= "yes">
<classpath>
<dirset dir="${basedir}/..">
<include name="org.eclipse.swt*/bin"/>
<include name="org.eclipse.ant.launching/common_bin"/>
</dirset>
<fileset dir="${eclipse.home}">
<include name="plugins/org.eclipse.swt*.jar"/>
<include name="plugins/org.eclipse.osgi*.jar"/>
<include name="plugins/org.eclipse.ant.launching*.jar"/>
</fileset>
</classpath>
<src path="Remote Ant Support/"/>
</javac>
<!-- copy necessary resources -->
<copy todir="${destdir}">
<fileset dir="Remote Ant Support/" excludes="**/*.java"/>
</copy>
<mkdir dir="${build.result.folder}/lib"/>
<jar destfile="${build.result.folder}/lib/remoteAnt.jar" basedir="${destdir}"/>
<delete dir="${temp.folder}"/>
</target>
<target name="clean" description="Deletes previous build remnants" depends="init">
<delete file="${build.result.folder}/lib/remoteAnt.jar"/>
<delete dir="${temp.folder}"/>
</target>
</project>