mcconnell    2003/02/07 21:50:39

  Added:       tests    test.xml test.properties README.txt
  Log:
  Test build and deploy with cleanup of references.
  
  Revision  Changes    Path
  1.1                  jakarta-james/tests/test.xml
  
  Index: test.xml
  ===================================================================
  
  <project default="main" basedir=".">
  
      <!--
      Give user a chance to override without editing this file
      (and without typing -D each time he compiles it)
      -->
  
      <property file=".ant.properties"/>
      <property file="${user.home}/.ant.properties"/>
      <property file="test.properties"/>
      <property file="${james.dir}/james.properties"/>
  
      <property name="name" value="james"/>
      <property name="Name" value="James"/>
      <property name="version" value="2.1a1-cvs"/>
      <property name="year" value="1999-2002"/>
      <!-- There should be no need to override default compiler but need to change
      javac task to run without this -->
      <property name="build.compiler" value="modern"/>
      <!--
      these are here only for those who use jikes compiler. For other
      developers this part makes no difference.
      -->
      <property name="build.compiler.emacs" value="on"/>
      <property name="build.compiler.pedantic" value="true"/>
      <property name="build.compiler.depend" value="true"/>
      <property name="build.compiler.fulldepend" value="true"/>
      <property name="debug" value="on"/>
      <property name="optimize" value="on"/>
      <property name="deprecation" value="on"/>
  
      <!--
         ===================================================================
         Set the properties for intermediate directory
         ===================================================================
      -->
      <property name="build.dir" value="build/tests"/>
      <property name="build.classes" value="${build.dir}/classes"/>
      <property name="james.classes" value="../build/classes"/>
      <!--
         ===================================================================
         Set the properties for source directories and parameters
         ===================================================================
      -->
      <property name="src.dir" value="src"/>
      <property name="java.dir" value="${src.dir}/java"/>
      <property name="conf.dir" value="${src.dir}/conf"/>
      
      <property name="lib.dir" value="../lib"/>
      <property name="phoenix-lib.dir" value="../lib"/>
  
    <path id="project.class.path">
      <pathelement location="${junit.jar}"/>
      <pathelement location="${xerces.jar}"/>
      <pathelement location="${xalan.jar}"/>
      <pathelement location="${xml-apis.jar}"/>
      <pathelement location="${dns.jar}"/>
      <pathelement location="${javax-mail.jar}"/>
      <pathelement location="${javax-activation.jar}"/>
      <pathelement location="${commons-net.jar}"/>
      <pathelement location="${excalibur-io.jar}"/>
      <pathelement location="${excalibur-cli.jar}"/>
      <pathelement location="${avalon-framework.jar}"/>
      <pathelement location="${jakarta-oro.jar}"/>
  
      <pathelement path="${java.class.path}" />
  
      <fileset dir="../build/lib">
        <include name="james-3.0.jar"/>
        <include name="mailet.jar"/>
      </fileset>
  
      <pathelement path="${build.classes}"/>
  
    </path>
  
      
    <target name="main" depends="test"/>
  
      <target name="compile" >
      <echo message="compiling James"/>
          <available property="jndi.present" classname="javax.naming.InitialContext"/>
          <mkdir dir="${build.classes}"/>
          <javac destdir="${build.classes}" debug="${debug}" optimize="${optimize}" 
deprecation="${deprecation}">
              <classpath refid="project.class.path"/>
              <src path="${src.dir}"/>
          </javac>
          <copy todir="${build.classes}">
              <fileset dir="${java.dir}">
                  <include name="**/*.properties"/>
              </fileset>
          </copy>
    </target>    
  
    <!-- ==================================================================== -->
    <!-- Run the unit test suite                                            -->
    <!-- =================================================================== -->  
        <target name="test" depends="compile">
                <junit printsummary="yes" showoutput="false">
                        <formatter type="plain" usefile="no"/>
                        <classpath refid="project.class.path"/>
                        <test name="org.apache.james.testing.EndToEnd" 
haltonerror="true"/> 
                </junit>
        </target>
  
     <target name="clean">
       <delete dir="build"/>
     </target>
  
  </project>
  
  
  1.1                  jakarta-james/tests/test.properties
  
  Index: test.properties
  ===================================================================
  
  
  james.dir=${basedir}/..
  
  
  
  
  1.1                  jakarta-james/tests/README.txt
  
  Index: README.txt
  ===================================================================
  
  To run the James test - do the following:
  
      $ cd <james-directory>
      $ ant -buildfile james.xml clean
      $ and -buildfile james.xml
  
  You now have a version of james built above the Avalon release candidates:
  
      build/lib/james-3.0.jar
      build/lib/mailet.jar
  
  The sar generation is not complete yet. If you have Merlin installed you can run 
James with the following command:
  
      $ merlin -home tests -profile merlin\kernel.xml -system %MERLIN_HOME% 
  
  To invoke the testcase:
  
      $ cd <james-dir>/tests
      $ ant -buildfile test.xml
  
  Cheers, Steve.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to