Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 55007a1b23bacfe15e350469e7904615 > files > 2

avalon-framework-4.2.0-1.4.0mdv2009.0.src.rpm

<?xml version="1.0"?>

<project default="jar" basedir=".">

  <property name="build.dir"      location="build"/>
  <property name="test.dir"      location="test"/>
  <property name="doc.dir"        location="doc/api"/>
  <property name="dist.dir"       location="dist"/>
  <property name="api.dir"        location="api/src/java"/>
  <property name="impl.dir"       location="impl/src/java"/>

  <target name="prepare">
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${test.dir}"/>
    <mkdir dir="${doc.dir}"/>
    <mkdir dir="${dist.dir}"/>
  </target>

  <target name="clean">
    <delete failonerror="false" dir="${build.dir}"/>
    <delete failonerror="false" dir="${test.dir}"/>
    <delete failonerror="false" dir="${doc.dir}"/>
    <delete failonerror="false" dir="${dist.dir}"/>
  </target>

  <target name="compile" depends="prepare">
    <javac srcdir="${api.dir}" 
	   destdir="${build.dir}" debug="true" nowarn="true" source="1.4" target="1.4"/>
    <javac srcdir="${impl.dir}" 
	   destdir="${build.dir}" debug="true" nowarn="true"  source="1.4" target="1.4"/>
  </target>

  <target name="compile-tests" depends="compile">
    <javac srcdir="api/src/test" 
	   destdir="${test.dir}" debug="true" nowarn="true" source="1.4" target="1.4" classpath="${build.dir}"/>
    <javac srcdir="impl/src/test" 
	   destdir="${test.dir}" debug="true" nowarn="true" source="1.4" target="1.4" classpath="${build.dir}"/>
  </target>

  <target name="jar" depends="compile-tests">
    <jar destfile="${dist.dir}/avalon-framework.jar">
      <fileset dir="${build.dir}"/>
    </jar>   
  </target>

  <target name="doc">
    <javadoc destdir="${doc.dir}">
      <fileset dir="${api.dir}"/>
      <fileset dir="${impl.dir}"/>
    </javadoc>
  </target>

  <target name="test-all" depends="compile-tests">
      <junit printsummary="yes">
      <batchtest>
        <fileset dir="api/src/test">
          <include name="**/*TestCase.java"/>
        </fileset>
        <fileset dir="impl/src/test">
          <include name="**/*TestCase.java"/>
        </fileset>
      </batchtest>      
     <classpath>
        <pathelement location="${dist.dir}/avalon-framework.jar"/>
        <pathelement location="${test.dir}"/>
      </classpath>
    </junit>
  </target>

</project>