ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Walend <dwal...@eecs.tufts.edu>
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 -->
    <tstamp/>
  </target>

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

  <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"/>
    </javac>
  </target>

  <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" 
           basedir="${build}">
      <include name="**" />
    </jar>
  </target>

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

-------------------

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
patch.

Thanks,

Dave



Mime
View raw message