291e00
291e00
291e00
291e00
  on date May 5 2007, time 1501-->
291e00
291e00
<project default="jar" name="jaxen" basedir=".">
291e00
  <property name="defaulttargetdir" value="target">
291e00
  </property>
291e00
  <property name="libdir" value="target/lib">
291e00
  </property>
291e00
  <property name="classesdir" value="target/classes">
291e00
  </property>
291e00
  <property name="testclassesdir" value="target/test-classes">
291e00
  </property>
291e00
  <property name="testclassesdir" value="target/test-classes">
291e00
  </property>
291e00
  <property name="testreportdir" value="target/test-reports">
291e00
  </property>
291e00
  <property name="distdir" value="dist">
291e00
  </property>
291e00
  <property name="javadocdir" value="dist/docs/api">
291e00
  </property>
291e00
  <property name="final.name" value="jaxen-1.1.3">
291e00
  </property>
291e00
  <path id="build.classpath">
291e00
    <fileset dir="${libdir}">
291e00
      <include name="**/*.jar">
291e00
      </include>
291e00
    </fileset>
291e00
  </path>
291e00
  <target name="init" description="o Initializes some properties">
291e00
    <mkdir dir="${libdir}">
291e00
    </mkdir>
291e00
    <condition property="noget">
291e00
      <equals arg2="only" arg1="${build.sysclasspath}">
291e00
      </equals>
291e00
    </condition>
291e00
    
291e00
291e00
    <available property="Junit.present" classname="junit.framework.Test">
291e00
    </available>
291e00
  </target>
291e00
  <target name="compile" description="o Compile the code">
291e00
    <mkdir dir="${classesdir}">
291e00
    </mkdir>
291e00
    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
291e00
      <src>
291e00
        <pathelement location="src/java/main">
291e00
        </pathelement>
291e00
      </src>
291e00
      <classpath refid="build.classpath">
291e00
      </classpath>
291e00
    </javac>
291e00
  </target>
291e00
  <target name="jar" description="o Create the jar" depends="compile">
291e00
    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
291e00
    </jar>
291e00
  </target>
291e00
  <target name="clean" description="o Clean up the generated directories">
291e00
    <delete dir="${defaulttargetdir}">
291e00
    </delete>
291e00
    <delete dir="${distdir}">
291e00
    </delete>
291e00
  </target>
291e00
  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
291e00
    <mkdir dir="dist">
291e00
    </mkdir>
291e00
    <copy todir="dist">
291e00
      <fileset dir="${defaulttargetdir}" includes="*.jar">
291e00
      </fileset>
291e00
      <fileset dir="${basedir}" includes="LICENSE*, README*">
291e00
      </fileset>
291e00
    </copy>
291e00
  </target>
291e00
  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
291e00
    <fail message="There were test failures.">
291e00
    </fail>
291e00
  </target>
291e00
  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
291e00
    <mkdir dir="${testreportdir}">
291e00
    </mkdir>
291e00
    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
291e00
      <sysproperty key="basedir" value=".">
291e00
      </sysproperty>
291e00
      <formatter type="xml">
291e00
      </formatter>
291e00
      <formatter usefile="false" type="plain">
291e00
      </formatter>
291e00
      <classpath>
291e00
        <path refid="build.classpath">
291e00
        </path>
291e00
        <pathelement path="${testclassesdir}">
291e00
        </pathelement>
291e00
        <pathelement path="${classesdir}">
291e00
        </pathelement>
291e00
      </classpath>
291e00
      <batchtest todir="${testreportdir}">
291e00
        <fileset dir="src/java/test">
291e00
          <include name="**/*Test.java">
291e00
          </include>
291e00
        </fileset>
291e00
      </batchtest>
291e00
    </junit>
291e00
  </target>
291e00
  <target name="junit-present" unless="Junit.present" depends="init">
291e00
    <echo>================================= WARNING ================================</echo>
291e00
    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
291e00
    <echo>==========================================================================</echo>
291e00
  </target>
291e00
  <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
291e00
    <mkdir dir="${testclassesdir}">
291e00
    </mkdir>
291e00
    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
291e00
      <src>
291e00
        <pathelement location="src/java/test">
291e00
        </pathelement>
291e00
      </src>
291e00
      <classpath>
291e00
        <path refid="build.classpath">
291e00
        </path>
291e00
        <pathelement path="${classesdir}">
291e00
        </pathelement>
291e00
      </classpath>
291e00
    </javac>
291e00
  </target>
291e00
  <target name="javadoc" description="o Generate javadoc">
291e00
    <mkdir dir="${javadocdir}">
291e00
    </mkdir>
291e00
    <tstamp>
291e00
      <format pattern="2001-yyyy" property="year">
291e00
      </format>
291e00
    </tstamp>
291e00
    <property name="copyright" value="Copyright &copy; 2001-2007 Codehaus. All Rights Reserved.">
291e00
    </property>
291e00
    <property name="title" value="jaxen 1.1.3 API">
291e00
    </property>
291e00
    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java/main" packagenames="org.jaxen.*">
291e00
      <classpath>
291e00
        <path refid="build.classpath">
291e00
        </path>
291e00
      </classpath>
291e00
    </javadoc>
291e00
  </target>
291e00
</project>