<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.equinox.p2.metadata.generator" default="default" basedir="..">

	<target name="init" depends="properties">
		<property name="plugin" value="org.eclipse.equinox.p2.publisher.eclipse"/>
		<property name="temp.folder" value="${basedir}/temp.folder"/>
		<property name="plugin.destination" value="${basedir}"/>
		<property name="build.result.folder" value="${basedir}/ant_tasks"/>
		<property name="version.suffix" value="_1.0.0"/>
	</target>

	<target name="properties" if="eclipse.running">
		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
	</target>

	<target name="buildScripts" depends="init" description="Build from generated scripts">
		<tstamp/>
		<eclipse.buildScript elements="plugin@${plugin}" 
			buildDirectory="${buildDirectory}" 
			configInfo="*,*,*" 
			baseLocation="${baseLocation}" 
			buildingOSGi="true" 
			outputUpdateJars="false"
			pluginpath="${basedir}"
			forceContextQualifier="z${DSTAMP}${TSTAMP}"
			/>
		<delete file="${basedir}/ant_tasks/pdepublishing-ant.jar" failonerror="false"/>
		<ant antfile="${basedir}/build.xml" target="ant_tasks/pdepublishing-ant.jar"/>
	</target>

	<target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
		<mkdir dir="${basedir}/ant_tasks" />
		<delete file="${basedir}/ant_tasks/pdepublishing-ant.jar" failonerror="false"/>
		<jar destfile="${basedir}/ant_tasks/pdepublishing-ant.jar" basedir="bin_ant"/>
	</target>
</project>