Permaine Cheung b241e0c
Permaine Cheung b241e0c
Permaine Cheung b241e0c
Permaine Cheung b241e0c
  on date June 26 2007, time 1708-->
Permaine Cheung b241e0c
<project default="jar" name="bcel" basedir=".">
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
  <property file="build.properties"></property>
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
  <property name="defaulttargetdir" value="${basedir}/target"></property>
Permaine Cheung b241e0c
  <property name="libdir" value="${basedir}/lib"></property>
Permaine Cheung b241e0c
  <property name="classesdir" value="${basedir}/target/classes"></property>
Permaine Cheung b241e0c
  <property name="distdir" value="${basedir}/dist"></property>
Permaine Cheung b241e0c
  <property name="javadocdir" value="${basedir}/dist/docs/api"></property>
Permaine Cheung b241e0c
  <property name="final.name" value="bcel-5.2"></property>
Permaine Cheung b241e0c
  <property name="proxy.host" value=""></property>
Permaine Cheung b241e0c
  <property name="proxy.port" value=""></property>
Permaine Cheung b241e0c
  <property name="proxy.username" value=""></property>
Permaine Cheung b241e0c
  <property name="proxy.password" value=""></property>
bf80784
  <property name="source.encoding" value="ISO-8859-1"></property>
Permaine Cheung b241e0c
  <path id="build.classpath">
Permaine Cheung b241e0c
    <pathelement location="${libdir}/regexp.jar"></pathelement>
Permaine Cheung b241e0c
  </path>
Permaine Cheung b241e0c
  <target name="init" description="o Initializes some properties">
Permaine Cheung b241e0c
    <mkdir dir="${libdir}"></mkdir>
Permaine Cheung b241e0c
    <condition property="noget">
Permaine Cheung b241e0c
      <equals arg2="only" arg1="${build.sysclasspath}"></equals>
Permaine Cheung b241e0c
    </condition>
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
    <available property="Junit.present" classname="junit.framework.Test"></available>
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
    <condition property="useProxy">
Permaine Cheung b241e0c
      <and>
Permaine Cheung b241e0c
        <isset property="proxy.host"></isset>
Permaine Cheung b241e0c
        <not>
Permaine Cheung b241e0c
          <equals trim="true" arg2="" arg1="${proxy.host}"></equals>
Permaine Cheung b241e0c
        </not>
Permaine Cheung b241e0c
      </and>
Permaine Cheung b241e0c
    </condition>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="compile" description="o Compile the code" depends="get-deps">
Permaine Cheung b241e0c
    <mkdir dir="${classesdir}"></mkdir>
bf80784
    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html" encoding="${source.encoding}">
Permaine Cheung b241e0c
      <src>
Permaine Cheung b241e0c
        <pathelement location="${basedir}/src/java"></pathelement>
Permaine Cheung b241e0c
      </src>
Permaine Cheung b241e0c
      <classpath refid="build.classpath"></classpath>
Permaine Cheung b241e0c
    </javac>
Permaine Cheung b241e0c
    <mkdir dir="${classesdir}/META-INF"></mkdir>
Permaine Cheung b241e0c
    <copy todir="${classesdir}/META-INF">
Permaine Cheung b241e0c
      <fileset dir="${basedir}/.">
Permaine Cheung b241e0c
        <include name="NOTICE.txt"></include>
Permaine Cheung b241e0c
      </fileset>
Permaine Cheung b241e0c
    </copy>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="jar" description="o Create the jar" depends="compile,test">
Permaine Cheung b241e0c
    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="clean" description="o Clean up the generated directories">
Permaine Cheung b241e0c
    <delete dir="${defaulttargetdir}"></delete>
Permaine Cheung b241e0c
    <delete dir="${distdir}"></delete>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
Permaine Cheung b241e0c
    <mkdir dir="dist"></mkdir>
Permaine Cheung b241e0c
    <copy todir="dist">
Permaine Cheung b241e0c
      <fileset dir="${defaulttargetdir}" includes="*.jar"></fileset>
Permaine Cheung b241e0c
      <fileset dir="${basedir}" includes="LICENSE*, README*"></fileset>
Permaine Cheung b241e0c
    </copy>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
Permaine Cheung b241e0c
    <fail message="There were test failures."></fail>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests"></target>
Permaine Cheung b241e0c
  <target name="junit-present" unless="Junit.present" depends="init">
Permaine Cheung b241e0c
    <echo>================================= WARNING ================================</echo>
Permaine Cheung b241e0c
    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
Permaine Cheung b241e0c
    <echo>==========================================================================</echo>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="compile-tests" if="Junit.present" depends="junit-present,compile"></target>
Permaine Cheung b241e0c
  <target name="javadoc" description="o Generate javadoc" depends="get-deps">
Permaine Cheung b241e0c
    <mkdir dir="${javadocdir}"></mkdir>
Permaine Cheung b241e0c
    <tstamp>
Permaine Cheung b241e0c
      <format pattern="2002-yyyy" property="year"></format>
Permaine Cheung b241e0c
    </tstamp>
Permaine Cheung b241e0c
    <property name="copyright" value="Copyright &copy;  Apache Software Foundation. All Rights Reserved."></property>
Permaine Cheung b241e0c
    <property name="title" value="jakarta-bcel 5.2 API"></property>
bf80784
    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/src/java" packagenames="org.apache.bcel.*" encoding="${source.encoding}">
Permaine Cheung b241e0c
      <classpath>
Permaine Cheung b241e0c
        <path refid="build.classpath"></path>
Permaine Cheung b241e0c
      </classpath>
bf80784
      <link href="/usr/share/javadoc/java"/>
Permaine Cheung b241e0c
    </javadoc>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="get-dep-regexp.jar" description="o Download the dependency : regexp.jar" unless="regexp.jar" depends="init,setProxy,noProxy,get-custom-dep-regexp.jar">
Permaine Cheung b241e0c
    <mkdir dir="${libdir}/JPP/jars/"></mkdir>
Permaine Cheung b241e0c
    <get dest="${libdir}/JPP/jars/regexp.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/regexp.jar"></get>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="get-custom-dep-regexp.jar" if="regexp.jar" depends="init,setProxy,noProxy">
Permaine Cheung b241e0c
    <mkdir dir="${libdir}/JPP/jars/"></mkdir>
Permaine Cheung b241e0c
    <get dest="${libdir}/JPP/jars/regexp.jar" usetimestamp="true" ignoreerrors="true" src="${regexp.jar}"></get>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="get-deps" unless="noget" depends="get-dep-regexp.jar"></target>
Permaine Cheung b241e0c
  <target name="setProxy" if="useProxy" depends="init">
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
    <echo>Proxy used :</echo>
Permaine Cheung b241e0c
    <echo>Proxy host [${proxy.host}]</echo>
Permaine Cheung b241e0c
    <echo>Proxy port [${proxy.port}]</echo>
Permaine Cheung b241e0c
    <echo>Proxy user [${proxy.username}]</echo>
Permaine Cheung b241e0c
    <setproxy proxyuser="${proxy.username}" proxyport="${proxy.port}" proxypassword="${proxy.password}" proxyhost="${proxy.host}"></setproxy>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="noProxy" unless="useProxy" depends="init">
Permaine Cheung b241e0c
    <echo>Proxy not used.</echo>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  <target name="install-maven">
Permaine Cheung b241e0c
    <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar"></get>
Permaine Cheung b241e0c
    <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"></unjar>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
    name="check_for_jdom">
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
      property="jdom.present"
Permaine Cheung b241e0c
      classname="org.jdom.JDOMException">
Permaine Cheung b241e0c
      <classpath>
Permaine Cheung b241e0c
        <pathelement location="${jakarta.site2}/lib/${jdom.jar}"/>
Permaine Cheung b241e0c
      </classpath>
Permaine Cheung b241e0c
    </available>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
    depends="check_for_jdom" 
Permaine Cheung b241e0c
    name="docs-prepare-error" 
Permaine Cheung b241e0c
    unless="jdom.present">
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
    <echo>
Permaine Cheung b241e0c
      The Jakarta-Site2 module is not present! Please check
Permaine Cheung b241e0c
      to make sure that you have checked it out from CVS.
Permaine Cheung b241e0c
Permaine Cheung b241e0c
      <http://jakarta.apache.org/site/jakarta-site2.html>
Permaine Cheung b241e0c
    </echo>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
Permaine Cheung b241e0c
  
Permaine Cheung b241e0c
    name="xdocs"
Permaine Cheung b241e0c
    depends="docs-prepare-error"
Permaine Cheung b241e0c
    description="--> generates the HTML documentation"
Permaine Cheung b241e0c
    if="jdom.present">
Permaine Cheung b241e0c
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
      name="anakia"
Permaine Cheung b241e0c
      classname="org.apache.velocity.anakia.AnakiaTask">
Permaine Cheung b241e0c
      <classpath>
Permaine Cheung b241e0c
        <fileset dir="${jakarta.site2}/lib">
Permaine Cheung b241e0c
          <include name="*.jar"/>
Permaine Cheung b241e0c
        </fileset>
Permaine Cheung b241e0c
      </classpath>
Permaine Cheung b241e0c
    </taskdef>
Permaine Cheung b241e0c
        
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
      basedir="${docs.src}" 
Permaine Cheung b241e0c
      destdir="${docs.dest}/"
Permaine Cheung b241e0c
      extension=".html" 
Permaine Cheung b241e0c
      style="./site.vsl"
Permaine Cheung b241e0c
      projectFile="stylesheets/project.xml"
Permaine Cheung b241e0c
      excludes="**/stylesheets/** empty.xml"
Permaine Cheung b241e0c
      includes="**/*.xml"
Permaine Cheung b241e0c
      lastModifiedCheck="true"
Permaine Cheung b241e0c
      templatePath="${jakarta.site2}/xdocs/stylesheets">
Permaine Cheung b241e0c
    </anakia>
Permaine Cheung b241e0c
Permaine Cheung b241e0c
    
Permaine Cheung b241e0c
      todir="${docs.dest}/images" 
Permaine Cheung b241e0c
      filtering="no">
Permaine Cheung b241e0c
      
Permaine Cheung b241e0c
      <fileset dir="${docs.src}/images">
Permaine Cheung b241e0c
        <include name="**/*.gif"/>
Permaine Cheung b241e0c
        <include name="**/*.jpeg"/>
Permaine Cheung b241e0c
        <include name="**/*.jpg"/>
Permaine Cheung b241e0c
      </fileset>
Permaine Cheung b241e0c
    </copy>
Permaine Cheung b241e0c
  </target>
Permaine Cheung b241e0c
Permaine Cheung b241e0c
</project>