<?xml version = '1.0' encoding = 'windows-1252'?>

<!--Ant buildfile generated by Oracle JDeveloper 10g-->
<!--Generated Aug 30, 2004 6:26:17 PM-->
<project name="ICAQApp" default="deploy" basedir=".">

   <!--Set the JDeveloper home directory-->
   <property name="jdev.home" value="C:\jdev"/>

   <!--Set the output directories-->
   <property name="compile.outdir" value="classes"/>
   <property name="javadoc.outdir" value="javadoc"/>
   <property name="deploy.outdir" value="deploy" />
   <property name="web.dir" value="public_html" />
   
   <!--Set the classpath-->
   <path id="classpath">
  <!--
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/lib/rt.jar"/>
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/lib/i18n.jar"/>
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/lib/sunrsasign.jar"/>
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/lib/jsse.jar"/>
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/lib/jce.jar"/>
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/lib/charsets.jar"/>
      <pathelement location="../../../../../j2sdk1.4.2_05/jre/classes"/>
  -->
      <pathelement location="${compile.outdir}"/>
      <pathelement location="${home}/system/appserver/oc4j/rdbms/jlib/aqapi.jar"/>
      <pathelement location="${home}/system/appserver/oc4j/jdbc/lib/classes12dms.jar"/>
      <pathelement location="${home}/lib/orabpel.jar"/>
      <pathelement location="${home}/lib/orabpel-common.jar"/>
      <pathelement location="${home}l/lib/orabpel-external.jar"/>
      <pathelement location="${home}/lib/orabpel-boot.jar"/>
      <pathelement location="${home}/lib/orabpel-ant.jar"/>
      <pathelement location="${home}/system/appserver/oc4j/j2ee/home/oc4j.jar"/>
      <pathelement location="${home}/system/appserver/oc4j/j2ee/home/lib/servlet.jar"/>
      <!--
      <pathelement location="${home}/system/appserver/oc4j/j2ee/home/lib/ojsp.jar"/>
      <pathelement location="${home}/system/appserver/oc4j/j2ee/home/jsp/lib/taglib/ojsputil.jar"/>
      <pathelement location="${home}/system/appserver/oc4j/jdev/lib/ojc.jar"/>
      -->
   </path>

   <!--Set the source path-->
   <property name="src.dir" value="src"/>
   <path id="srcpath">
      <pathelement location="${src.dir}"/>
   </path>

   <target name="init">
      <tstamp/>
      <mkdir dir="${deploy.outdir}" />
   </target>

   <target name="compile" depends="init">
      <mkdir dir="${compile.outdir}"/>
      <!--Compile Java source files-->
      <javac destdir="${compile.outdir}" debug="on" encoding="Cp1252">
         <classpath refid="classpath"/>
         <src refid="srcpath"/>
         <include name="aq/services/ICBpelMessageTypeRef.java"/>
         <include name="aq/services/ICBpelMessageType.java"/>
         <include name="ICAQ/ICBPELConfig.java"/>
         <include name="ICAQ/ICAQServlet.java"/>
         <include name="aq/services/DequeueService.java"/>
         <include name="ICAQ/BPELSender.java"/>
         <include name="ICAQ/AQListener.java"/>
      </javac>
      <!--Copy files to output directory-->
      <copy file="${src.dir}/META-INF/orion-application.xml" tofile="${compile.outdir}/META-INF/orion-application.xml"/>
      <copy file="${src.dir}/META-INF/data-sources.xml" tofile="${compile.outdir}/META-INF/data-sources.xml"/>
      <copy file="${src.dir}/META-INF/application.xml" tofile="${compile.outdir}/META-INF/application.xml"/>
   </target>

   <target name="doc" depends="init">
      <mkdir dir="${javadoc.outdir}"/>
      <!--Create Javadoc-->
      <javadoc sourcepathref="srcpath" classpathref="classpath" destdir="${javadoc.outdir}" version="false" author="false" encoding="Cp1252" additionalparam="-J-Xmx32m">
         <package name="aq.services"/>
         <package name="ICAQ"/>
      </javadoc>
   </target>

  <target name="web-war" depends="compile" >
     <copy todir="${deploy.outdir}/icbpel-web" >
        <fileset dir="${web.dir}/" >
           <include name="**" />
        </fileset>
    </copy>
    <copy todir="${deploy.outdir}/icbpel-web/WEB-INF/classes">
        <fileset dir="${compile.outdir}" >
          <include name="**/**.class" />
        </fileset>
      </copy>
      <jar destfile="${deploy.outdir}/icbpel.war" basedir="${deploy.outdir}/icbpel-web" />
  </target>
  <target name="ear" depends="web-war" >
     <copy file="${deploy.outdir}/icbpel.war" todir="${deploy.outdir}/icbpel-ear" >
       <fileset dir="${compile.outdir}" >
          <include name="META-INF/**" />
       </fileset>
     </copy>
     <jar destfile="${deploy.outdir}/icbpel.ear" basedir="${deploy.outdir}/icbpel-ear" />
  </target>
    
  
   <target name="deploy" depends="ear">
	    <java jar="${home}/system/appserver/oc4j/j2ee/home/admin.jar" fork="true">
         <arg line="ormi://localhost admin welcome -deploy -parent orabpel -file ${deploy.outdir}/icbpel.ear -deploymentName icbpel"/>
     </java>
	   <java jar="${home}/system/appserver/oc4j/j2ee/home/admin.jar" fork="true">
         <arg line="ormi://localhost admin welcome -bindWebApp icbpel icbpel http-web-site /icbpel"/>
     </java>
   </target>
   
   <target name="undeploy">
	    <java jar="${home}/system/appserver/oc4j/j2ee/home/admin.jar" fork="true">
         <arg line="ormi://localhost admin welcome -undeploy icbpel"/>
     </java>
   </target>
   
   <target name="zip" >
      <antcall target="clean" />
      <zip destfile="../icbpel-listener.zip" basedir="." />
   </target>

   <target name="clean">
      <!--Delete output directories-->
      <delete dir="${compile.outdir}"/>
      <delete dir="${javadoc.outdir}"/>
      <delete dir="${deploy.outdir}" />
   </target>

   <target name="make" depends="compile"/>

   <target name="rebuild" depends="clean,compile"/>

   <target name="all" depends="compile,doc"/>

</project>

