<project name="run.xml" default="all" basedir=".">

	<!-- include additional libraries -->
	<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${libs}/ant-contrib-1.0b3.jar" />

	<property environment="env" />
	<!-- change this property if the build.properties is placed in another folder -->
	<property name="${builder}" value="${basedir}" />
	
	<!-- load the property configurations -->
	<property file="${builder}/build.properties" />

	<target name="pde-build">
		<trycatch property="errorMsg">
			<try>
				<property name="compilerArg" value="-encoding UTF-8" />

				<!-- call PDE build script -->
				<path id="pde.build.script.path">
					<fileset dir="${launcherLocation}/plugins">
						<include name="org.eclipse.pde.build_*/scripts/build.xml" />
					</fileset>
				</path>
				<property name="pde.build.script.path" refid="pde.build.script.path" />

				<echo message="Calling pde build script: ${pde.build.script.path} with builder ${builder}" />
				<ant antfile="${pde.build.script.path}">
					<property name="builder" value="${builder}" />
				</ant>
			</try>
			<catch>
				<fail message="PDE Build failed: ${errorMsg}" />
			</catch>
		</trycatch>
	</target>

	<target name="all">
		<antcall target="pde-build" />
	</target>
</project>
