commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/digester/src/examples/api/addressbook build.xml readme.txt
Date Sun, 28 Sep 2003 09:40:26 GMT
rdonkin     2003/09/28 02:40:26

  Modified:    digester/src/examples/api/addressbook readme.txt
  Added:       digester/src/examples/api/addressbook build.xml
  Log:
  Added build for the examples. Submitted by Simon Kitching.
  
  Revision  Changes    Path
  1.2       +18 -0     jakarta-commons/digester/src/examples/api/addressbook/readme.txt
  
  Index: readme.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/examples/api/addressbook/readme.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- readme.txt	14 Aug 2003 18:25:34 -0000	1.1
  +++ readme.txt	28 Sep 2003 09:40:26 -0000	1.2
  @@ -1,3 +1,5 @@
  +== overview
  +
   The files in this directory are intended as an example of how to use
   the Apache Digester's basic functionality via its java interface.
   
  @@ -13,3 +15,19 @@
     in a tag's body
   * how to use the "call parameter rule" to process the contents of an 
     xml attribute.
  +
  +== compiling and running
  +
  +First rename the build.properties.sample file in the parent directory
  +to build.properties and edit it to suit your environment. Then in this
  +directory:
  +
  +* to compile:
  +  ant compile
  +
  +* to run:
  +  ant run
  +
  +Alternatively, you can set up your CLASSPATH appropriately, and
  +run the example directly. See the build.properties and build.xml
  +files for details.
  
  
  
  1.1                  jakarta-commons/digester/src/examples/api/addressbook/build.xml
  
  Index: build.xml
  ===================================================================
  <project name="Example-AddressBook" default="compile" basedir=".">
  
  
  <!-- ========== Initialize Properties ===================================== -->
  
  
    <property file="build.properties"/>                <!-- Component local   -->
    <property file="../build.properties"/>             <!-- examples/api local-->
    <property file="../../../../build.properties"/>    <!-- Digester local     -->
    <property file="../../../../../build.properties"/> <!-- Commons local     -->
    <property file="${user.home}/build.properties"/>   <!-- User local        -->
  
  
  <!-- ========== External Dependencies ===================================== -->
  
  
    <!-- The directories corresponding to your necessary dependencies -->
    <property name="jaxp.home"               value="/usr/local/jaxp1.1"/>
    <property name="commons.home"            value="../../../../.."/>
    <property name="beanutils.home"          value="${commons.home}/beanutils"/>
    <property name="collections.home"        value="${commons.home}/collections"/>
    <property name="logging.home"            value="${commons.home}/logging"/>
    <property name="digester.home"            value="${commons.home}/digester"/>
  
  
  <!-- ========== Derived Values ============================================ -->
  
  
    <!-- The locations of necessary jar files -->
    <property name="jaxp.jaxp.jar"           value="${jaxp.home}/jaxp.jar"/>
    <property name="jaxp.parser.jar"         value="${jaxp.home}/crimson.jar"/>
    <property name="commons-beanutils.jar"   value="${beanutils.home}/dist/commons-beanutils.jar"/>
    <property name="commons-collections.jar" value="${collections.home}/dist/commons-collections.jar"/>
    <property name="commons-logging.jar"     value="${logging.home}/dist/commons-logging.jar"/>
    <property name="commons-digester.jar"     value="${digester.home}/dist/commons-digester.jar"/>
  
  
  <!-- ========== Component Declarations ==================================== -->
  
    <!-- The name of this component -->
    <property name="component.name"          value="addressbook"/>
  
  
  <!-- ========== Compiler Defaults ========================================= -->
  
    <!-- Should Java compilations set the 'debug' compiler option? -->
    <property name="compile.debug"           value="true"/>
  
    <!-- Should Java compilations set the 'deprecation' compiler option? -->
    <property name="compile.deprecation"     value="false"/>
  
    <!-- Should Java compilations set the 'optimize' compiler option? -->
    <property name="compile.optimize"        value="true"/>
  
    <!-- Construct compile classpath -->
    <path id="compile.classpath">
      <pathelement location="."/>
      <pathelement location="${jaxp.jaxp.jar}"/>
      <pathelement location="${jaxp.parser.jar}"/>
      <pathelement location="${commons-beanutils.jar}"/>
      <pathelement location="${commons-collections.jar}"/>
      <pathelement location="${commons-logging.jar}"/>
      <pathelement location="${commons-digester.jar}"/>
    </path>
  
  
  <!-- ========== Executable Targets ======================================== -->
  
  
    <target name="compile">
      <javac  srcdir="."
             destdir="."
               debug="${compile.debug}"
         deprecation="${compile.deprecation}"
            optimize="${compile.optimize}">
        <classpath refid="compile.classpath"/>
      </javac>
    </target>
  
  
    <target name="clean">
      <delete>
        <fileset dir="." includes="*.class"/>
      </delete>
      <delete dir="docs"/>
    </target>
  
    <target name="all" depends="clean,compile"/>
  
    <target name="javadoc" depends="compile">
      <mkdir      dir="docs"/>
      <javadoc destdir="docs"
                   author="true"
                  private="true"
                  version="true">
        <classpath  refid="compile.classpath"/>
        <fileset dir="." includes="*.java"/>
      </javadoc>
    </target>
  
    <target name="run" depends="compile">
      <java classname="AddressBookDigester" fork="yes">
        <arg value="example.xml"/>
        <classpath refid="compile.classpath"/>
        <classpath>
          <pathelement location="."/>
        </classpath>
      </java>
    </target>
  </project>
  
  
  

Mime
View raw message