<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<project name="Remote Bundle Deployer" default="transform" basedir=".">

  <!-- set global properties for this build -->
	<property name="src.dir" value="."/>
	<property name="build.dir" value="."/>
	
	<target name="help">
		<loadfile property="file" srcFile="README.txt"/>
		<echo>${file}</echo>
	</target>


	<target name="init">
    <!-- Create the time stamp -->
		<tstamp/>
	</target>
	
	<target name="validate" depends="init">
		<xmlvalidate warn="yes">
			<fileset dir="${src.dir}">
				<include name="**/*.xml"/>
				<include name="**/*.xsl"/>
				<exclude name="build.xml"/>
			</fileset>
		</xmlvalidate>
	</target>
	
	<target name="transform" depends="init">
		<xslt in="script.xml" out="build2runscript.xml" style="script2build.xsl">
			<outputproperty name="method" value="xml"/>
			<outputproperty name="standalone" value="yes"/>
			<outputproperty name="encoding" value="iso8859_1"/>
			<outputproperty name="indent" value="yes"/>
			<param name="date" expression="${TODAY}"/>
			<param name="author" expression="Didier Donsez"/>
		</xslt>
		<xslt in="script.xml" out="cmdlines.txt" style="script2cmdlines.xsl">
			<outputproperty name="method" value="text"/>
			<outputproperty name="encoding" value="iso8859_1"/>
			<outputproperty name="indent" value="yes"/>
			<param name="date" expression="${TODAY}"/>
			<param name="author" expression="Didier Donsez"/>
		</xslt>
	</target>

	
	<target name="run" depends="init,runhttp,runtelnet,runssh">

	</target>

	<target name="runhttp" depends="init,transform">
		<ant antfile="build2runscript.xml" inheritall="false" target="callhttp"/>
	</target>

	<target name="runtelnet" depends="init,transform">
		<ant antfile="build2runscript.xml" inheritall="false" target="calltenet"/>
	</target>

	<target name="runssh" depends="init,transform">
		<ant antfile="build2runscript.xml" inheritall="false" target="callssh"/>
	</target>

	
	<target name="clean">
		<delete file="build2runscript.xml"/>
		<delete file="cmdlines.txt"/>
	</target>

	
</project>

