<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== 
     Mar 18, 2010 4:31:09 PM                                                        

     project    
     description
                   
     ymh                                                                
     ====================================================================== -->
<project name="project" default="deploy_all" basedir="../..">
    <description>
            description
    </description>
	<property name="url" value="http://localhost:9080/manager" />
	<property name="username" value="tomcat"/>
	<property name="password" value="tomcat"/>
	<property name="solr.path" value="/solr" />
	<property name="sonyengine.path" value="/sonyengine" />
	<property name="build" value="${basedir}/engine" />

	<!-- Configure the custom Ant tasks for the Manager application -->
	<taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>
	<taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
	<taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>
	<taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
	<taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/>
	<taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>
	<taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
	<taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"/>
	
	<target name="deploy_solr">
		<deploy 
			localwar="${build}${solr.path}/apache-solr-1.4.0.war"
			url="${url}"
			username="${username}"
			password="${password}"
			path="${solr.path}"
			config="${build}${solr.path}/context.xml"
			>
		</deploy>
	</target>
	
	<target name="deploy_sonyengine">
		<echo>${build}${sonyengine.path}/mosatags.sonyengine.war</echo>
    <deploy 
      localwar="${build}${sonyengine.path}/mosatags.sonyengine.war"
      url="${url}"
      username="${username}"
      password="${password}"
      path="${sonyengine.path}"
      config="${build}${sonyengine.path}/context.xml"
      >
    </deploy>
	</target>
	
	<target name="reload_sonyengine" description="Reload web application">
		<reload  url="${url}" username="${username}" password="${password}"
	            path="${sonyengine.path}"/>
	  </target>

	<target name="reload_solr" description="Reload web application">
		<reload  url="${url}" username="${username}" password="${password}"
	            path="${solr.path}"/>
	  </target>

	<target name="undeploy_sonyengine" description="Remove web application">
	    <undeploy url="${url}" username="${username}" password="${password}"
	            path="${sonyengine.path}"/>
	</target>
	<target name="undeploy_solr" description="Remove web application">
	    <undeploy url="${url}" username="${username}" password="${password}"
	            path="${solr.path}"/>
	</target>
	
	<!-- ================================= 
          target: deploy_all              
         ================================= -->
    <target name="deploy_all" depends="deploy_solr, deploy_sonyengine" description="²description">
    </target>

</project>
