ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Walend <>
Subject Re: Example on web page
Date Wed, 26 Jul 2000 03:26:59 GMT
Thanks for the feedback. Here's another rev:

<project name="foo" default="dist" basedir=".">

  <!-- set global properties for this build -->
  <property name="src" value="." />
  <property name="build" value="build" />
  <property name="dist"  value="dist" />

  <target name="init">
    <!-- Create the time stamp -->

  <target name="prepare" depends="init">
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}" />

  <target name="compile" depends="prepare">
    <!-- Compile the java code from ${src} into ${build}
       Use filtering to replace @version@ and @year@ marks in the code -->
    <javac srcdir="${src}" destdir="${build}">
      <include name="*.java"/>

  <target name="dist" depends="compile">
    <!-- Create the ${dist}/lib directory 
       put everything in ${build} into the foo${DSTAMP}.jar file-->
    <mkdir dir="${dist}/lib" />
    <jar jarfile="${dist}/lib/foo${DSTAMP}.jar" 
      <include name="**" />

  <target name="clean">
    <!-- Delete the ${build} and ${dist} directory trees -->
    <deltree dir="${build}" />
    <deltree dir="${dist}" />


The changes from the first rev:

I switched to two space indents. (emacs' psgml kit)
I removed the filtering.
I moved the properties out of the init target and added a comment global
properties. (Will this cause less or more confusion?)
I removed clean's depends="init"
I changed the includes attributes to include tags, but left them in.
(Else, the build.xml file gets copied to the build tree.)
I've left things grey. (I like grey.)

I welcome any other feedback. Tomorrow night I hope to show my first



View raw message