Blame SOURCES/build.xml

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