stevel 02/02/20 22:25:16
Modified: docs/manual using.html
Log:
little bit of extra detail on the example.
Revision Changes Path
1.15 +25 -5 jakarta-ant/docs/manual/using.html
Index: using.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/using.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- using.html 4 Feb 2002 20:57:49 -0000 1.14
+++ using.html 21 Feb 2002 06:25:16 -0000 1.15
@@ -223,9 +223,11 @@
<a name="example"><h3>Example Buildfile</h3></a>
<pre>
<project name="MyProject" default="dist"
basedir=".">
-
+ <description>
+ simple example build file
+ </description>
<!-- set global properties for this build -->
- <property name="src" value="."/>
+ <property name="src" value="src"/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
@@ -236,12 +238,14 @@
<mkdir dir="${build}"/>
</target>
- <target name="compile" depends="init">
+ <target name="compile" depends="init"
+ description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
- <target name="dist" depends="compile">
+ <target name="dist" depends="compile"
+ description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
@@ -249,13 +253,29 @@
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
basedir="${build}"/>
</target>
- <target name="clean">
+ <target name="clean"
+ description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>
</pre>
+
+Notice that we are declaring properties outside any target. The
+<tt><property></tt>,<tt><path></tt> and <tt><taskdef></tt>
+tasks are special in that they can be declared outside any target. When you
+do this they are evaluated before any targets are executed. No other tasks
+can be declared outside targets.
+
+<p>
+We have given some targets descriptions; this causes the <tt>projecthelp</tt>
+invocation option to list them as public targets with the descriptions; the
+other target is internal and not listed.
+<p>
+Finally, for this target to work the source in the <tt>src</tt> subdirectory
+should be stored in a directory tree which matches the package names. Check
the
+<tt><javac></tt> task for details.
<a name="filters"><h3>Token Filters</h3></a>
<p>A project can have a set of tokens that might be automatically expanded if
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>