On Sat, 22 Jul 2000, David Walend wrote:
> <project name="foo" default="dist" basedir=".">
>
> <target name="init">
> <!-- Create the time stamp, set properties and filters -->
> <tstamp/>
> <property name="src" value="." />
> <property name="build" value="build" />
> <property name="dist" value="dist" />
> <filter token="version" value="1.0.3" />
> <filter token="year" value="2000" />
> </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}" includes="*.java"
> filtering="on"/>
> </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}"
> includes="**"/>
> </target>
>
> <target name="clean" depends="init">
> <!-- Delete the ${build} and ${dist} directory trees -->
> <deltree dir="${build}" />
> <deltree dir="${dist}" />
> </target>
>
> </project>
>
> I know this is an easy one, but I'd love to get some feedback before
> figuring out how to submit it to the index.html page. Specifically, I'd
> like to hear if you love or hate the comments, and if it works in other
> places. Also, I couldn't find any guidelines on XML format for
> apache/jakarta, so I winged it.
Some comments,
- add a comment to the filter tags (like "see User Guide#Token
Filters). Because people are going to be cut-n-pasting they
probably should consider removing them if they dont use
the filtering options. I know you have a comment in the
compile target but they aren't linked explicitly enough for
a newbie.
- I would use 4 spaces as indentation but that's personal
preference. As an aside does anyone know of a decent XML
mode for emacs that I can turn of XML validation for and
will auto-indent my code?
- Is it possible to add 'bgcolor="white"' to the body tag of
the user guide? I hate grey backgrounds :)
Barrie
--
Barrie Treloar
____________________________________________________________________
Barrie Treloar Phone: +61 8 8303 3300
Senior Analyst/Programmer Fax: +61 8 8303 4403
Electronic Commerce Division Email: [EMAIL PROTECTED]
Camtech (SA) Pty Ltd http://www.camtech.com.au
--- Level 8, 10 Pulteney Street, Adelaide SA 5000, Australia. ---
____________________________________________________________________