<project name="hello1-example" default="build" basedir=".">
 

   <target name="init">
       <tstamp/>
   </target>
 
 
   
 
   <property name="example" 
             value="hello1" />
 
   <property name="path" 
             value="/${example}"/>
 
   <property name="build"   
             value="/usr/local/apache/htdocs/tech/webservices/examples/${example}/build" />
 
   <property name="url"      
             value="http://www.setgetweb.com/manager"/>

   <property file="build.properties"/>

   <property file="${user.home}/build.properties"/>
 
   

 
   <path id="classpath">

     <fileset dir="/usr/tomcat/common/lib">
       <include name="*.jar"/>
     </fileset>

   </path>



   <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>	
   <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
   <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
   <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>	
 


   <target name="prepare" depends="init" description="Create build directories.">

     <mkdir dir="${build}" />
     <mkdir dir="${build}/webapps/ROOT/WEB-INF" />
     <mkdir dir="${build}/webapps/ROOT/WEB-INF/classes" />		

   </target>
 
 
 
   <target name="list" description="List web applications">

     <list url="${url}" username="${username}" password="${password}" />

   </target>
 



   <target name="install" description="Install web application" depends="build">
 
     <install url="${url}" 
              username="${username}" 
              password="${password}"
              path="${path}" 
              war="file:${build}"/>
 
   </target>


 

   <target name="reload" description="Reload web application" depends="build">
 
       <reload url="${url}" 
               username="${username}" 
               password="${password}"
               path="${path}"/>
   </target>
 


   <target name="remove" description="Remove web application">
 
       <remove url="${url}" 
               username="${username}" 
               password="${password}"
               path="${path}"/>
   </target>
 


   <target name="build" depends="prepare" description="Compile copy pages >

     <javac srcdir="src" 
            destdir="${build}/webapps/ROOT/WEB-INF/classes">
 
     	   <include name="**/*.java" />
      	   <classpath refid="classpath"/>
 
     </javac>
 
     <copy todir="${build}/webapps/ROOT/WEB-INF">
 
            <fileset dir="web/WEB-INF">
                <include name="web.xml" />
            </fileset>
 
     </copy>
 
     <copy todir="${build}">
 
            <fileset dir="web">
                  <include name="*.html" />
                  <include name="*.jsp" />
                  <include name="*.gif" />
            </fileset>
 
     </copy>
 
   </target>



 
  
  </project>