blob: 940669ab9756a8fb916221f1a349c34d5b24e390 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2009 Chris Aniszczyk 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:
Chris Aniszczyk - initial API and implementation
-->
<project name="Build WikiText Ant Support Jar" default="build" basedir="..">
<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/wikitext-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/wikitext-ant.jar" description= "Creates the lib/wikitext-ant.jar" depends="init">
<property name="destdir" value="${temp.folder}/lib/wikitext-ant.bin"/>
<property name="target.platform.path" value="${eclipse.home}" />
<delete dir="${destdir}"/>
<mkdir dir="${destdir}"/>
<mkdir dir="${build.result.folder}/lib"/>
<!-- compile the source code -->
<javac target="1.5" source="1.5" 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.jdt.core/bin"/>
<include name="org.eclipse.core.resources/bin"/>
<include name="com.ibm.icu/bin"/>
<include name="org.eclipse.mylyn.wikitext.core/bin"/>
</dirset>
<fileset dir="${target.platform.path}">
<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.mylyn.wikitext.core*.jar"/>
</fileset>
</classpath>
<src path="../org.eclipse.mylyn.wikitext.core.ant/src"/>
</javac>
<!-- copy the *.class files to the jar location -->
<copy todir="${destdir}" failonerror="true" overwrite="false">
<fileset dir="../org.eclipse.mylyn.wikitext.core.ant/src">
<exclude name="**/*.java"/>
<exclude name="**/package.htm*"/>
</fileset>
</copy>
<jar destfile="${build.result.folder}/lib/wikitext-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/wikitext-ant.jar"/>
<delete dir="${temp.folder}"/>
</target>
</project>