<project name="BPEL_BluePrint2" default="deploy" basedir=".">
	
	<description> 
		${ant.project.name}
		${line.separator}
	</description>
	
	<!-- Import the base Ant build script... -->
	<property file="../../../install/deployment.properties" />
	
	<property name="version" value="1" />
	
	<property name="server.dir" value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
	<property name="conf.dir" value="${server.dir}/conf"/>
	<property name="deploy.dir" value="${server.dir}/deploy"/>
	<property name="server.lib.dir" value="${server.dir}/lib"/>

	<property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
	
	<target name="deploy">
		<echo>Deploy ${ant.project.name}</echo>
		<jar basedir="bpelContent" destfile="${deploy.dir}/${sample.jar.name}" />
	</target> 
 
	<target name="undeploy">
		<echo>Undeploy ${ant.project.name}</echo>
		<delete file="${deploy.dir}/${sample.jar.name}" />
	</target>  
	
	<target name="sendvalid">
		<echo>Send valid test message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint2_PurchaseOrderService"/>
	         	<arg value="messages/valid.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
	
	<target name="sendinvalid">
		<echo>Send invalid test message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint2_PurchaseOrderService"/>
	         	<arg value="messages/invalid.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
	
	<target name="sendtimeout">
		<echo>Send timeout test message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint2_PurchaseOrderService"/>
	         	<arg value="messages/timeout.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
</project>
