conor 00/07/27 20:34:14
Modified: docs index.html
Log:
Update example in documentation
Submitted by: David Walend <[EMAIL PROTECTED]>
Revision Changes Path
1.57 +38 -30 jakarta-ant/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/index.html,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- index.html 2000/07/26 10:51:18 1.56
+++ index.html 2000/07/28 03:34:14 1.57
@@ -21,9 +21,10 @@
<li>Conor MacNeill (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
<li>Stefano Mazzocchi (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
<li>Sam Ruby (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
+ <li>Dave Walend (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
</ul>
-<p>Version 1.2 - 2000/07/26</p>
+<p>Version 1.2 - 2000/07/27</p>
<hr>
<h2>Table of Contents</h2>
@@ -350,52 +351,59 @@
<p>If there is a property called "builddir" with the value
"build", then this could be used in an attribute like this:
"${builddir}/classes".
This is resolved as "build/classes".</p>
-<h3>Token Filters</h3>
-<p>A project can have a set of tokens that might be automatically expanded if
-found when a file is copied, when the filtering-copy behavior is selected in
the
-tasks that support this. These might be set in the buildfile
-by the <a href="#filter">filter task</a>. </p>
-<p>Since this can be a very harmful behavior, the tokens in the files
<b>must</b>
-be of the form<i> @token@</i> where <i>token</i> is the token name that is
set
-in the filter task. This token syntax matches the syntax of other build
systems
-that perform such filtering and remains sufficiently orthogonal to most
-programming and scripting languages, as well with documentation systems.</p>
-<p>Note: in case a token with the format @token@ if found in a file but no
-filter is associated with that token, no changes take place. So, no escaping
-method is present, but as long as you choose appropriate names for your
tokens,
-this should not cause problems.</p>
-<h3>Examples</h3>
+<h3>Example</h3>
<blockquote>
- <pre><project name="foo" default="dist"
basedir=".">
- <target name="init">
- <tstamp/>
- <property name="build" value="build" />
- <property name="dist" value="dist" />
- <filter token="version" value="1.0.3" />
- <filter token="year" value="2000" />
- </target>
+ <pre>
+<project name="MyProject" 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="prepare" depends="init">
+ <target name="prepare">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="compile" depends="prepare">
- <javac srcdir="${src}" destdir="${build}"
filtering="on"/>
+ <!-- Compile the java code from ${src} into ${build} -->
+ <javac srcdir="${src}" destdir="${build}" />
</target>
<target name="dist" depends="compile">
+ <!-- Create the ${dist}/lib directory -->
<mkdir dir="${dist}/lib" />
- <jar jarfile="${dist}/lib/foo${DSTAMP}.jar"
- basedir="${build}" items="com"/>
+
+ <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file
-->
+ <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
basedir="${build}" />
</target>
- <target name="clean" depends="init">
+ <target name="clean">
+ <!-- Delete the ${build} and ${dist} directory trees -->
<deltree dir="${build}" />
<deltree dir="${dist}" />
</target>
</project>
-</pre>
+ </pre>
</blockquote>
+
+<h3>Token Filters</h3>
+<p>A project can have a set of tokens that might be automatically expanded if
+found when a file is copied, when the filtering-copy behavior is selected in
the
+tasks that support this. These might be set in the buildfile
+by the <a href="#filter">filter task</a>. </p>
+<p>Since this can be a very harmful behavior, the tokens in the files
<b>must</b>
+be of the form<i> @token@</i> where <i>token</i> is the token name that is
set
+in the filter task. This token syntax matches the syntax of other build
systems
+that perform such filtering and remains sufficiently orthogonal to most
+programming and scripting languages, as well with documentation systems.</p>
+<p>Note: in case a token with the format @token@ if found in a file but no
+filter is associated with that token, no changes take place. So, no escaping
+method is present, but as long as you choose appropriate names for your
tokens,
+this should not cause problems.</p>
<h3><a name="path">PATH like structures</a></h3>
<p>You can specify PATH and CLASSPATH variables using both