<?xml version="1.0"?>
<!-- ====================================================================== 
     Feb 11, 2005 1:04:21 PM                                                        

      This build file is intended to compile and run the Axis2 samples
      provided here with the service being deployed at Tomcat or by
      running a simple Axis2 server.   
     
                   
                                                                     
     ====================================================================== -->
<project name="samples" basedir=".." default="mail-test">
    <property name="maven.repo.local" value="${user.home}/.maven/repository/"/>
    <property name="class.dir" value="${basedir}/target/test-classes"/>
    <property name="report.dir" value="${basedir}/target/test-reports"/>
    <property name="src.dir" value="${basedir}/test"/>

    <path id="test.classpath">
        <fileset dir="${maven.repo.local}">
            <include name="geronimo-spec/jars/geronimo-spec-activation-1.0.2-SNAPSHOT.jar"/>
            <include name="j2ee/jars/mail.jar"/>
            <include name="axis/jars/axis2-core-0.9.jar"/>
            <include name="axis/jars/axis2-xml-0.9.jar"/>
            <include name="axis/jars/axis2-wsdl-0.9.jar"/>
            <include name="axis/jars/axis-wsdl4j-1.2.jar"/>
            <include name="commons-logging/jars/commons-logging-1.0.3.jar"/>
            <include name="stax/jars/stax-1.1.2-dev.jar"/>
            <include name="stax/jars/stax-api-1.0.jar"/>
            <include name="log4j/jars/log4j-1.2.8.jar"/>
            <include name="junit/jars/*.jar"/>
        </fileset>
    </path>
    

    <target name="mail-test" description="Delete all generated files">
        <echo message="running Mail tests"/>
        <mkdir dir="${report.dir}"/>
        <mkdir dir="${class.dir}"/>

        <javac srcdir="${src.dir}" destdir="${class.dir}">
            <classpath refid="test.classpath"/>
        </javac>
        <copy todir="${class.dir}">
            <fileset dir="${src.dir}">
                <include name="**/*.jpg"/>
            </fileset>
        </copy>
        <junit printsummary="yes" haltonfailure="yes">
            <formatter type="plain"/>
            <test name="org.apache.axis2.mail.MailetRequestResponceRawXMLTest" todir="${report.dir}"/>
            <classpath>
                <pathelement location="${class.dir}"/>
                <path refid="test.classpath"/>
            </classpath>
        </junit>
        <junit printsummary="yes" haltonfailure="yes">
            <formatter type="plain"/>
            <test name="org.apache.axis2.mail.MailOneWayRawXMLTest" todir="${report.dir}"/>
            <classpath>
                <pathelement location="${class.dir}"/>
                <path refid="test.classpath"/>
            </classpath>
        </junit>
        <junit printsummary="yes" haltonfailure="yes">
            <formatter type="plain"/>
            <test name="org.apache.axis2.mail.MailRequestResponseRawXMLTest" todir="${report.dir}"/>
            <classpath>
                <pathelement location="${class.dir}"/>
                <path refid="test.classpath"/>
            </classpath>
        </junit>

    </target>
</project>

