Browse Source

Bz 21192: description should precede code examples

master
Gintas Grigelionis 7 years ago
parent
commit
332330b278
100 changed files with 1021 additions and 962 deletions
  1. +5
    -4
      manual/Tasks/ant.html
  2. +2
    -3
      manual/Tasks/antcall.html
  3. +2
    -2
      manual/Tasks/antlr.html
  4. +5
    -5
      manual/Tasks/antstructure.html
  5. +7
    -7
      manual/Tasks/antversion.html
  6. +28
    -25
      manual/Tasks/apply.html
  7. +5
    -8
      manual/Tasks/attrib.html
  8. +4
    -2
      manual/Tasks/augment.html
  9. +16
    -13
      manual/Tasks/available.html
  10. +8
    -6
      manual/Tasks/basename.html
  11. +2
    -4
      manual/Tasks/buildnumber.html
  12. +12
    -10
      manual/Tasks/cab.html
  13. +12
    -18
      manual/Tasks/ccm.html
  14. +15
    -21
      manual/Tasks/changelog.html
  15. +19
    -18
      manual/Tasks/checksum.html
  16. +12
    -16
      manual/Tasks/chgrp.html
  17. +13
    -11
      manual/Tasks/chmod.html
  18. +10
    -9
      manual/Tasks/chown.html
  19. +35
    -48
      manual/Tasks/clearcase.html
  20. +3
    -3
      manual/Tasks/componentdef.html
  21. +9
    -13
      manual/Tasks/concat.html
  22. +7
    -6
      manual/Tasks/condition.html
  23. +17
    -12
      manual/Tasks/copy.html
  24. +9
    -7
      manual/Tasks/copydir.html
  25. +15
    -14
      manual/Tasks/cvs.html
  26. +1
    -1
      manual/Tasks/cvspass.html
  27. +24
    -22
      manual/Tasks/cvstagdiff.html
  28. +3
    -2
      manual/Tasks/cvsversion.html
  29. +13
    -12
      manual/Tasks/delete.html
  30. +4
    -2
      manual/Tasks/deltree.html
  31. +8
    -10
      manual/Tasks/depend.html
  32. +11
    -11
      manual/Tasks/dependset.html
  33. +1
    -1
      manual/Tasks/diagnostics.html
  34. +3
    -2
      manual/Tasks/dirname.html
  35. +1
    -1
      manual/Tasks/ear.html
  36. +12
    -8
      manual/Tasks/echo.html
  37. +16
    -10
      manual/Tasks/echoproperties.html
  38. +2
    -1
      manual/Tasks/echoxml.html
  39. +10
    -10
      manual/Tasks/exec.html
  40. +10
    -11
      manual/Tasks/fail.html
  41. +7
    -5
      manual/Tasks/filter.html
  42. +20
    -16
      manual/Tasks/fixcrlf.html
  43. +64
    -54
      manual/Tasks/ftp.html
  44. +1
    -2
      manual/Tasks/genkey.html
  45. +11
    -10
      manual/Tasks/get.html
  46. +4
    -5
      manual/Tasks/hostinfo.html
  47. +7
    -6
      manual/Tasks/image.html
  48. +17
    -13
      manual/Tasks/input.html
  49. +21
    -21
      manual/Tasks/jar.html
  50. +6
    -5
      manual/Tasks/jarlib-available.html
  51. +2
    -2
      manual/Tasks/jarlib-display.html
  52. +2
    -3
      manual/Tasks/jarlib-manifest.html
  53. +10
    -11
      manual/Tasks/jarlib-resolve.html
  54. +16
    -17
      manual/Tasks/java.html
  55. +37
    -54
      manual/Tasks/javac.html
  56. +3
    -3
      manual/Tasks/javacc.html
  57. +13
    -10
      manual/Tasks/javah.html
  58. +7
    -10
      manual/Tasks/jdepend.html
  59. +3
    -3
      manual/Tasks/jjdoc.html
  60. +8
    -9
      manual/Tasks/jjtree.html
  61. +1
    -1
      manual/Tasks/jlink.html
  62. +8
    -6
      manual/Tasks/jspc.html
  63. +41
    -44
      manual/Tasks/junit.html
  64. +20
    -19
      manual/Tasks/junitlauncher.html
  65. +7
    -7
      manual/Tasks/junitreport.html
  66. +6
    -6
      manual/Tasks/length.html
  67. +10
    -8
      manual/Tasks/loadfile.html
  68. +6
    -5
      manual/Tasks/loadproperties.html
  69. +3
    -2
      manual/Tasks/loadresource.html
  70. +11
    -11
      manual/Tasks/mail.html
  71. +7
    -4
      manual/Tasks/makeurl.html
  72. +7
    -7
      manual/Tasks/manifest.html
  73. +6
    -4
      manual/Tasks/manifestclasspath.html
  74. +3
    -2
      manual/Tasks/mimemail.html
  75. +5
    -2
      manual/Tasks/mkdir.html
  76. +11
    -7
      manual/Tasks/move.html
  77. +5
    -7
      manual/Tasks/native2ascii.html
  78. +8
    -4
      manual/Tasks/nice.html
  79. +3
    -2
      manual/Tasks/pack.html
  80. +24
    -23
      manual/Tasks/parallel.html
  81. +7
    -5
      manual/Tasks/patch.html
  82. +8
    -6
      manual/Tasks/pathconvert.html
  83. +18
    -19
      manual/Tasks/property.html
  84. +3
    -2
      manual/Tasks/rename.html
  85. +4
    -4
      manual/Tasks/replace.html
  86. +10
    -12
      manual/Tasks/replaceregexp.html
  87. +5
    -4
      manual/Tasks/resourcecount.html
  88. +2
    -2
      manual/Tasks/retry.html
  89. +6
    -4
      manual/Tasks/rmic.html
  90. +10
    -8
      manual/Tasks/schemavalidate.html
  91. +12
    -9
      manual/Tasks/scp.html
  92. +10
    -12
      manual/Tasks/script.html
  93. +2
    -2
      manual/Tasks/scriptdef.html
  94. +3
    -2
      manual/Tasks/sequential.html
  95. +6
    -3
      manual/Tasks/setpermissions.html
  96. +21
    -8
      manual/Tasks/setproxy.html
  97. +16
    -11
      manual/Tasks/signjar.html
  98. +7
    -4
      manual/Tasks/sleep.html
  99. +23
    -21
      manual/Tasks/sos.html
  100. +6
    -5
      manual/Tasks/sound.html

+ 5
- 4
manual/Tasks/ant.html View File

@@ -293,6 +293,7 @@ will be set to the specified value of the property element unless the correspond
the <var>dir</var> attribute explicitly.</p>

<h3>Examples</h3>
<p>These are different ways of using the task:</p>
<pre>
&lt;ant antfile=&quot;subproject/subbuild.xml&quot; target=&quot;compile&quot;/&gt;

@@ -325,12 +326,12 @@ this:</p>
&lt;/path&gt;</pre>

<p>and the called build file (<samp>subbuild.xml</samp>) also defines a <code>&lt;path&gt;</code>
with the <var>id</var> <samp>path1</samp>, but <samp>path2</samp> is not defined:</p>
with the <var>id</var> <samp>path1</samp>, but <samp>path2</samp> is not defined; then</p>

<pre>&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;true&quot;/&gt;</pre>

<p>will not override <samp>subbuild</samp>'s definition of <samp>path1</samp>, but make the parent's
definition of <samp>path2</samp> available in the <samp>subbuild</samp>.</p>
definition of <samp>path2</samp> available in the <samp>subbuild</samp>, whereas</p>

<pre>&lt;ant antfile=&quot;subbuild.xml&quot;/&gt;</pre>

@@ -338,14 +339,14 @@ definition of <samp>path2</samp> available in the <samp>subbuild</samp>.</p>

<pre>&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;/&gt;</pre>

<p>will neither override <samp>path1</samp> nor copy <samp>path2</samp>.</p>
<p>will neither override <samp>path1</samp> nor copy <samp>path2</samp>, while</p>

<pre>
&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;&gt;
&lt;reference refid=&quot;path1&quot;/&gt;
&lt;/ant&gt;</pre>

<p>will override <samp>subbuild</samp>'s definition of <samp>path1</samp>.</p>
<p>will override <samp>subbuild</samp>'s definition of <samp>path1</samp>, and</p>

<pre>
&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;&gt;


+ 2
- 3
manual/Tasks/antcall.html View File

@@ -154,6 +154,7 @@ single target whose dependencies are the targets so specified, in the order spec
</table>

<h3>Examples</h3>
<p>The following</p>
<pre>
&lt;target name=&quot;default&quot;&gt;
&lt;antcall target=&quot;doSomethingElse&quot;&gt;
@@ -164,13 +165,11 @@ single target whose dependencies are the targets so specified, in the order spec
&lt;target name=&quot;doSomethingElse&quot;&gt;
&lt;echo message=&quot;param1=${param1}&quot;/&gt;
&lt;/target&gt;</pre>
<p>Will run the target <var>doSomethingElse</var> and echo <code>param1=value</code>.</p>

<p>will run the target <var>doSomethingElse</var> and echo <code>param1=value</code>, whereas</p>
<pre>
&lt;antcall ... &gt;
&lt;reference refid=&quot;path1&quot; torefid=&quot;path2&quot;/&gt;
&lt;/antcall&gt;</pre>

<p>will copy the parent's definition of <samp>path1</samp> into the new project using
the <var>id</var> <samp>path2</samp>.</p>



+ 2
- 2
manual/Tasks/antlr.html View File

@@ -137,12 +137,12 @@ nested <code>&lt;jvmarg&gt;</code> attributes, for example:</p>
in <a href="../using.html#arg">Command line arguments</a>.</p>

<h3>Example</h3>
<p>Invoke ANTLR on grammar file <samp>etc/java.g</samp>, writing the generated files
to <samp>build/src</samp>:</p>
<pre>
&lt;antlr
target=&quot;etc/java.g&quot;
outputdirectory=&quot;build/src&quot;/&gt;</pre>
<p>This invokes ANTLR on grammar file <samp>etc/java.g</samp>, writing the generated files
to <samp>build/src</samp>.</p>

</body>
</html>

+ 5
- 5
manual/Tasks/antstructure.html View File

@@ -64,11 +64,11 @@ task&mdash;see the example below.
</tr>
</table>
<h3>Examples</h3>
<pre>&lt;antstructure output=&quot;project.dtd&quot;/&gt;</pre>
<p>Basic usage</p>

<p><strong>Emitting your own structure instead of a DTD</strong></p>
<pre>&lt;antstructure output=&quot;project.dtd&quot;/&gt;</pre>

<p>First you need to implement the interface</p>
<p>Emit your own structure instead of a DTD: first you need to implement the interface</p>

<pre>
package org.example;
@@ -85,8 +85,8 @@ public class MyPrinter implements AntStructure.StructurePrinter {
&lt;myprinter/&gt;
&lt;/antstructure&gt;</pre>

<p>Your own StructurePrinter can accept attributes and nested elements just like any other Ant type
or task.</p>
<p>Your own <code class="code">StructurePrinter</code> can accept attributes and nested elements
just like any other Ant type or task.</p>

</body>
</html>

+ 7
- 7
manual/Tasks/antversion.html View File

@@ -62,17 +62,19 @@ as condition).</p>

<h3>Examples</h3>

<p>Store the current Ant version in the property <code>antversion</code>.</p>
<pre>&lt;antversion property=&quot;antversion&quot;/&gt;</pre>
<p>Stores the current Ant version in the property <code>antversion</code>.</p>

<p>Store the Ant version in the property <code>antversion</code> if the current Ant version is 1.6.0
or higher. Otherwise the property remains unset.</p>
<pre>&lt;antversion property=&quot;antversion&quot; atleast=&quot;1.6&quot;/&gt;</pre>
<p>Stores the Ant version in the property <code>antversion</code> if the current Ant version is
1.6.0 or higher. Otherwise the property remains unset.</p>

<pre>&lt;antversion property=&quot;ant-is-exact-7&quot; exactly=&quot;1.7.0&quot;/&gt;</pre>
<p>Sets the property <code>ant-is-exact-7</code> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.1
<p>Set the property <code>ant-is-exact-7</code> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.1
would match.</p>
<pre>&lt;antversion property=&quot;ant-is-exact-7&quot; exactly=&quot;1.7.0&quot;/&gt;</pre>

<p>Set <code>Ant17isOnline</code> if Ant 1.7.0 is running and can get a non-error-response from the
Ant homepage.</p>
<pre>
&lt;condition property=&quot;Ant17isOnline&quot;&gt;
&lt;and&gt;
@@ -80,8 +82,6 @@ would match.</p>
&lt;http url=&quot;http://ant.apache.org&quot;/&gt;
&lt;/and&gt;
&lt;/condition&gt;</pre>
<p>Sets <code>Ant17isOnline</code> if Ant 1.7.0 is running and can get a non-error-response from the
Ant homepage.</p>

</body>
</html>

+ 28
- 25
manual/Tasks/apply.html View File

@@ -350,6 +350,9 @@ files for each sourcefile.</p>
(with <var>maxparallel</var> &gt; 0) and null will be used a source file just like it is in the case
of <code>exec</code>.</p>
<h3>Examples</h3>
<p>Invoke <kbd>ls -l</kbd>, adding the absolute filenames of all files below <samp>/tmp</samp> not
ending in <samp>.txt</samp> and all files of the FileSet with <var>id</var> <samp>other.files</samp>
to the command line.</p>
<pre>
&lt;apply executable=&quot;ls&quot;&gt;
&lt;arg value=&quot;-l&quot;/&gt;
@@ -360,9 +363,11 @@ of <code>exec</code>.</p>
&lt;/fileset&gt;
&lt;fileset refid=&quot;other.files&quot;/&gt;
&lt;/apply&gt;</pre>
<p>invokes <kbd>ls -l</kbd>, adding the absolute filenames of all files below <samp>/tmp</samp> not
ending in <samp>.txt</samp> and all files of the FileSet with <var>id</var> <samp>other.files</samp>
to the command line.</p>

<p>Invoke <kbd>somecommand arg1 SOURCEFILENAME arg2</kbd> for each file in <samp>/tmp</samp>
replacing <code>SOURCEFILENAME</code> with the absolute filename of each file in
turn. If <var>parallel</var> had been set to <q>true</q>, <code>SOURCEFILENAME</code> would be
replaced with the absolute filenames of all files separated by spaces.</p>
<pre>
&lt;apply executable=&quot;somecommand&quot; parallel=&quot;false&quot;&gt;
&lt;arg value=&quot;arg1&quot;/&gt;
@@ -371,10 +376,11 @@ to the command line.</p>
&lt;fileset dir=&quot;/tmp&quot;/&gt;
&lt;/apply&gt;
</pre>
<p>invokes <code>somecommand arg1 SOURCEFILENAME arg2</code> for each file in <samp>/tmp</samp>
replacing <code>SOURCEFILENAME</code> with the absolute filename of each file in
turn. If <var>parallel</var> had been set to true, <code>SOURCEFILENAME</code> would be replaced
with the absolute filenames of all files separated by spaces.</p>

<p>Invoke <kbd>cc -c -o TARGETFILE SOURCEFILE</kbd> for each <samp>.c</samp> file that is newer than
the corresponding <samp>.o</samp>, replacing <code>TARGETFILE</code> with the absolute filename of
the <samp>.o</samp> and <code>SOURCEFILE</code> with the absolute name of the <samp>.c</samp>
file.</p>
<pre>
&lt;apply executable=&quot;cc&quot; dest=&quot;src/C&quot; parallel=&quot;false&quot;&gt;
&lt;arg value=&quot;-c&quot;/&gt;
@@ -384,10 +390,15 @@ with the absolute filenames of all files separated by spaces.</p>
&lt;fileset dir=&quot;src/C&quot; includes=&quot;*.c&quot;/&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*.c&quot; to=&quot;*.o&quot;/&gt;
&lt;/apply&gt;</pre>
<p>invokes <kbd>cc -c -o TARGETFILE SOURCEFILE</kbd> for each <samp>.c</samp> file that is newer
than the corresponding <samp>.o</samp>, replacing <code>TARGETFILE</code> with the absolute filename
of the <samp>.o</samp> and <code>SOURCEFILE</code> with the absolute name of the <samp>.c</samp>
file.</p>

<p>Apply the fictitious <kbd>processfile</kbd> executable to all files matching <samp>*.file</samp>
in the <samp>src</samp> directory. The <samp>out</samp> <code>&lt;mapper&gt;</code> has been set up
to map <samp>*.file</samp> to <samp>*.out</samp>, then this <code>&lt;mapper&gt;</code> is used to
specify <code>targetfile</code>s for this <code>&lt;apply&gt;</code> task. A reference
to <samp>out</samp> is then used as an <code>&lt;outputmapper&gt;</code> nested in
a <code>&lt;redirector&gt;</code>, which in turn is nested beneath this <code>&lt;apply&gt;</code>
instance. This allows us to perform dependency checking against output files&mdash;the target files
in this case.</p>
<pre>
&lt;mapper id=&quot;out&quot; type=&quot;glob&quot;
from=&quot;src${file.separator}*.file&quot;
@@ -400,15 +411,9 @@ file.</p>
&lt;outputmapper refid=&quot;out&quot;/&gt;
&lt;/redirector&gt;
&lt;/apply&gt;</pre>
<p>Applies the fictitious <kbd>processfile</kbd> executable to all files
matching <samp>*.file</samp> in the <samp>src</samp> directory.
The <samp>out</samp> <code>&lt;mapper&gt;</code> has been set up to map <samp>*.file</samp>
to <samp>*.out</samp>, then this <code>&lt;mapper&gt;</code> is used to
specify <code>targetfile</code>s for this <code>&lt;apply&gt;</code> task. A reference
to <samp>out</samp> is then used as an <code>&lt;outputmapper&gt;</code> nested in
a <code>&lt;redirector&gt;</code>, which in turn is nested beneath this <code>&lt;apply&gt;</code>
instance. This allows us to perform dependency checking against output files&mdash;the target files
in this case.</p>

<p>Apply the <kbd>ls</kbd> executable to all directories in the <code>PATH</code>, effectively
listing all executables that are available on the <code>PATH</code>.</p>
<pre>
&lt;apply executable="ls" parallel="true"
force="true" dest="${basedir}" append="true" type="both"&gt;
@@ -417,9 +422,10 @@ in this case.</p>
&lt;/path&gt;
&lt;identitymapper/&gt;
&lt;/apply&gt;</pre>
<p>Applies the <kbd>ls</kbd> executable to all directories in the <code>PATH</code>, effectively
listing all executables that are available on the <code>PATH</code>.</p>

<p>Convert all JavaScript files in the <samp>src</samp> directory using the command <kbd>jsmin &lt;
src/a.js &gt; dest/a.js</kbd>. Because the filename itself should not be passed to
the <code>jsmin</code> program, the <var>addsourcefile</var> is set to <q>false</q>.</p>
<pre>
&lt;apply executable="jsmin" addsourcefile="false"&gt;
&lt;!-- Collect the JS-files --&gt;
@@ -432,9 +438,6 @@ listing all executables that are available on the <code>PATH</code>.</p>
&lt;outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/&gt;
&lt;/redirector&gt;
&lt;/apply&gt;</pre>
<p>Conversion of the command <kbd>jsmin &lt; src/a.js &gt; dest/a.js</kbd> but for all files in
the <samp>src</samp> directory. Because the filename itself should not be passed to
the <code>jsmin</code> program, the <var>addsourcefile</var> is set to <q>false</q>.</p>

</body>
</html>

+ 5
- 8
manual/Tasks/attrib.html View File

@@ -129,16 +129,17 @@ alternative.</p>

<h3>Examples</h3>

<p>Make the <code>run.bat</code> file read-only and hidden.</p>
<pre>&lt;attrib file=&quot;${dist}/run.bat&quot; readonly=&quot;true&quot; hidden=&quot;true&quot;/&gt;</pre>

<p>makes the <code>run.bat</code> file read-only and hidden.</p>

<p>Make all <samp>.xml</samp> files below <samp>${meta.inf}</samp> readable.</p>
<pre>&lt;attrib readonly=&quot;false&quot;&gt;
&lt;fileset dir=&quot;${meta.inf}&quot; includes=&quot;**/*.xml&quot;/&gt;
&lt;/attrib&gt;</pre>

<p>makes all <samp>.xml</samp> files below <samp>${meta.inf}</samp> readable.</p>

<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) read-only and archived. In addition all files belonging to a FileSet
with <var>id</var> <samp>other.shared.sources</samp> get the same attributes.</p>
<pre>
&lt;attrib readonly=&quot;true&quot; archive=&quot;true&quot;&gt;
&lt;fileset dir=&quot;shared/sources1&quot;&gt;
@@ -147,9 +148,5 @@ alternative.</p>
&lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
&lt;/attrib&gt;</pre>

<p>makes all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) read-only and archived. In addition all files belonging to a FileSet
with <var>id</var> <samp>other.shared.sources</samp> get the same attributes.</p>

</body>
</html>

+ 4
- 2
manual/Tasks/augment.html View File

@@ -58,16 +58,18 @@ declared <code>augment</code> element as though it were the original element.</p

<pre>&lt;fileset id="input-fs" dir="${basedir}"/&gt;</pre>

<p>invocation</p>

<pre>&lt;augment id="input-fs" excludes="foo"/&gt;</pre>

<p>modifies the <var>excludes</var> attribute of <samp>input-fs</samp>.</p>
<p>modifies the <var>excludes</var> attribute of <samp>input-fs</samp>, whereas</p>

<pre>
&lt;augment id="input-fs"&gt;
&lt;filename name="bar"/&gt;
&lt;/augment&gt;</pre>

<p>Adds a <code>filename</code> selector to <samp>input-fs</samp>.</p>
<p>adds a <code>filename</code> selector to <samp>input-fs</samp>.</p>

</body>
</html>

+ 16
- 13
manual/Tasks/available.html View File

@@ -110,20 +110,27 @@ a <a href="../using.html#path">path-like structure</a> and can also be set via a
<p><code>Available</code>'s <var>filepath</var> attribute is
a <a href="../using.html#path">path-like structure</a> and can also be set via a
nested <code>&lt;filepath&gt;</code> element.</p>

<h3>Examples</h3>
<pre>&lt;available classname=&quot;org.whatever.Myclass&quot; property=&quot;Myclass.present&quot;/&gt;</pre>
<p>sets the <code>Myclass.present</code> property to the value <q>true</q> if the
<p>Set the <code>Myclass.present</code> property to the value <q>true</q> if the
class <code>org.whatever.Myclass</code> is found in Ant's classpath.</p>
<pre>&lt;available classname=&quot;org.whatever.Myclass&quot; property=&quot;Myclass.present&quot;/&gt;</pre>

<p>Set the <code>jaxp.jar.present</code> property to the value <q>true</q> if the
file <samp>./lib/jaxp11/jaxp.jar</samp> is found.</p>
<pre>
&lt;property name=&quot;jaxp.jar&quot; value=&quot;./lib/jaxp11/jaxp.jar&quot;/&gt;
&lt;available file=&quot;${jaxp.jar}&quot; property=&quot;jaxp.jar.present&quot;/&gt;</pre>
<p>sets the <code>jaxp.jar.present</code> property to the value <q>true</q> if the
file <samp>./lib/jaxp11/jaxp.jar</samp> is found.</p>

<p>Set the <code>local.lib.present</code> property to the value <q>true</q> if the
directory <samp>/usr/local/lib</samp> is found.</p>
<pre>
&lt;available file=&quot;/usr/local/lib&quot; type=&quot;dir&quot;
property=&quot;local.lib.present&quot;/&gt;</pre>
<p>sets the <code>local.lib.present</code> property to the value <q>true</q> if the
directory <samp>/usr/local/lib</samp> is found.</p>

<p>Set the <code>jaxp11.present</code> property to the value <q>true</q> if the
class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced
by <samp>jaxp</samp> (in this case, <samp>./lib/jaxp11/jaxp.jar</samp>).</p>
<pre>
...in project ...
&lt;property name=&quot;jaxp.jar&quot; value=&quot;./lib/jaxp11/jaxp.jar&quot;/&gt;
@@ -131,19 +138,15 @@ directory <samp>/usr/local/lib</samp> is found.</p>
...in target ...
&lt;available classname=&quot;javax.xml.transform.Transformer&quot;
classpathref=&quot;jaxp&quot; property=&quot;jaxp11.present&quot;/&gt;</pre>
<p>sets the <code>jaxp11.present</code> property to the value <q>true</q> if the
class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced
by <samp>jaxp</samp> (in this case, <samp>./lib/jaxp11/jaxp.jar</samp>).
</p>

<p>Set the <code>have.extras</code> property to the value <q>true</q> if the resource
file <samp>extratasks.properties</samp> is found.</p>
<pre>
&lt;available property=&quot;have.extras&quot; resource=&quot;extratasks.properties&quot;&gt;
&lt;classpath&gt;
&lt;pathelement location=&quot;/usr/local/ant/extra.jar&quot;/&gt;
&lt;/classpath&gt;
&lt;/available&gt;</pre>
<p>sets the <code>have.extras</code> property to the value <q>true</q> if the resource
file <samp>extratasks.properties</samp> is found.
</p>

</body>
</html>

+ 8
- 6
manual/Tasks/basename.html View File

@@ -59,20 +59,22 @@ the simple file name, without any directory elements.</p>
</table>

<h3>Examples</h3>
<pre>&lt;basename property=&quot;jar.filename&quot; file=&quot;${lib.jarfile}&quot;/&gt;</pre>
<p>will set <code>jar.filename</code> to <samp>myjar.jar</samp>, if <code>lib.jarfile</code> is
defined as either a full-path filename (eg., <samp>/usr/local/lib/myjar.jar</samp>), a relative-path
<p>Set <code>jar.filename</code> to <samp>myjar.jar</samp>, if <code>lib.jarfile</code> is defined
as either a full-path filename (eg., <samp>/usr/local/lib/myjar.jar</samp>), a relative-path
filename (eg., <samp>lib/myjar.jar</samp>), or a simple filename (eg., <samp>myjar.jar</samp>).</p>
<pre>&lt;basename property=&quot;jar.filename&quot; file=&quot;${lib.jarfile}&quot;/&gt;</pre>

<p>Set <code>cmdname</code> to <samp>foo</samp>.</p>
<pre>
&lt;basename property=&quot;cmdname&quot; file=&quot;D:/usr/local/foo.exe&quot;
suffix=&quot;.exe&quot;/&gt;</pre>
<p>will set <code>cmdname</code> to <samp>foo</samp>.</p>

<p>Set <code>temp.dirname</code> to the last directory element of the path defined for
the <code>TEMP</code> environment variable.</p>
<pre>
&lt;property environment=&quot;env&quot;/&gt;
&lt;basename property=&quot;temp.dirname&quot; file=&quot;${env.TEMP}&quot;/&gt;
</pre>
<p>will set <code>temp.dirname</code> to the last directory element of the path defined for
the <code>TEMP</code> environment variable.</p>

</body>
</html>

+ 2
- 4
manual/Tasks/buildnumber.html View File

@@ -48,13 +48,11 @@ need finer control over things such as the property name or the number format.)<
</table>

<h3>Examples</h3>
<pre>&lt;buildnumber/&gt;</pre>

<p>Read, increment, and write a build number to the default file, <samp>build.number</samp>.</p>

<pre>&lt;buildnumber file=&quot;mybuild.number&quot;/&gt;</pre>
<pre>&lt;buildnumber/&gt;</pre>

<p>Read, increment, and write a build number to the file <samp>mybuild.number</samp>.</p>
<pre>&lt;buildnumber file=&quot;mybuild.number&quot;/&gt;</pre>

</body>
</html>

+ 12
- 10
manual/Tasks/cab.html View File

@@ -106,29 +106,32 @@ element to specify the files to be included in the archive. If this is specifie
the <var>basedir</var> attribute cannot be used.</p>

<h3>Examples</h3>
<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory.</p>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot;/&gt;</pre>
<p>cabs all files in the <samp>htdocs/manual</samp> directory into a file
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory.</p>

<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Files in the
directory <samp>mydocs</samp>, or files with the name <samp>todo.html</samp> are excluded.</p>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot;
excludes=&quot;mydocs/**, **/todo.html&quot;/&gt;</pre>
<p>cabs all files in the <samp>htdocs/manual</samp> directory into a file
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Files in the
directory <samp>mydocs</samp>, or files with the name <samp>todo.html</samp> are excluded.</p>

<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Only <samp>.html</samp> files
under the directory <samp>api</samp> are archived, and files with the name <samp>todo.html</samp>
are excluded. Output from the <kbd>cabarc</kbd> tool is displayed in the build output.</p>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot;
includes=&quot;api/**/*.html&quot;
excludes=&quot;**/todo.html&quot;
verbose=&quot;yes&quot;/&gt;</pre>
<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Only <samp>.html</samp> files
under the directory <samp>api</samp> are archived, and files with the name <samp>todo.html</samp>
are excluded. Output from the <code>cabarc</code> tool is displayed in the build output.</p>

<p>The following is equivalent to the example above.</p>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot;
verbose=&quot;yes&quot;&gt;
@@ -137,7 +140,6 @@ are excluded. Output from the <code>cabarc</code> tool is displayed in the build
includes=&quot;api/**/*.html&quot;
excludes=&quot;**/todo.html&quot;/&gt;
&lt;/cab&gt;</pre>
<p>is equivalent to the example above.</p>

</body>
</html>

+ 12
- 18
manual/Tasks/ccm.html View File

@@ -74,13 +74,12 @@ other platforms with <kbd>ccm</kbd> installed.</p>
</table>
<h3>Examples</h3>

<p>Check in the file <samp>c:/wa/com/foo/MyFile.java</samp>. Text <samp>mycomment</samp> is added
as a comment. The task used is the one set as the default.</p>
<pre>
&lt;ccmcheckin file=&quot;c:/wa/com/foo/MyFile.java&quot;
comment=&quot;mycomment&quot;/&gt;</pre>

<p>Checks in the file <samp>c:/wa/com/foo/MyFile.java</samp>. Text <samp>mycomment</samp> is added
as a comment. The task used is the one set as the default.</p>

<hr/>

<h2 id="ccmcheckout">CCMCheckout</h2>
@@ -121,14 +120,16 @@ as a comment. The task used is the one set as the default.</p>
</table>
<h3>Examples</h3>

<p>Check out the file <samp>c:/wa/com/foo/MyFile.java</samp>. Comment
attribute <samp>mycomment</samp> is added as a task comment. The task used is the one set as the
default.</p>
<pre>
&lt;ccmcheckout file=&quot;c:/wa/com/foo/MyFile.java&quot;
comment=&quot;mycomment&quot;/&gt;</pre>

<p>Check out the file <samp>c:/wa/com/foo/MyFile.java</samp>. Comment
attribute <samp>mycomment</samp> is added as a task comment The used task is the one set as the
default.</p>

<p>Check out all the files in the <samp>lib</samp> directory having the <samp>.jar</samp>
extension. Comment attribute <samp>mycomment</samp> is added as a task comment The used task is the
one set as the default.</p>
<pre>
&lt;ccmcheckout comment=&quot;mycomment&quot;&gt;
&lt;fileset dir=&quot;lib&quot; &gt;
@@ -136,10 +137,6 @@ default.</p>
&lt;/fileset&gt;
&lt;/ccmcheckout &gt;</pre>

<p>Check out all the files in the <samp>lib</samp> directory having the <samp>.jar</samp> extension.
Comment attribute <samp>mycomment</samp> is added as a task comment The used task is the one set as
the default.</p>

<hr/>

<h2 id="ccmcheckintask">CCMCheckinTask</h2>
@@ -171,10 +168,9 @@ the default.</p>
</table>
<h3>Examples</h3>

<p>Perform a Checkin default task on all the checked out files in the current task.</p>
<pre>&lt;ccmcheckintask comment=&quot;blahblah/&gt;</pre>

<p>Does a Checkin default task on all the checked out files in the current task.</p>

<hr/>

<h2 id="ccmreconfigure">CCMReconfigure</h2>
@@ -211,12 +207,11 @@ the default.</p>
</table>
<h3>Examples</h3>

<p>Perform a Continuus <code>reconfigure</code> on the project <samp>ANTCCM_TEST#BMO_1</samp>.</p>
<pre>
&lt;ccmreconfigure ccmproject=&quot;ANTCCM_TEST#BMO_1&quot;
verbose=&quot;true&quot;/&gt;</pre>

<p>Does a Continuus <code>reconfigure</code> on the project <samp>ANTCCM_TEST#BMO_1</samp>.</p>

<hr/>

<h2 id="ccmcreatetask">CCMCreateTask</h2>
@@ -268,12 +263,11 @@ the default.</p>
</table>
<h3>Examples</h3>

<p>Create a task for the release <samp>ANTCCM_TEST</samp> with the current user as the resolver for
this task.</p>
<pre>
&lt;ccmcreatetask resolver=&quot;${user.name}&quot;
release=&quot;ANTCCM_TEST&quot; comment=&quot;blahblah&quot;/&gt;</pre>

<p>Creates a task for the release <samp>ANTCCM_TEST</samp> with the current user as the resolver for
this task.</p>

</body>
</html>

+ 15
- 21
manual/Tasks/changelog.html View File

@@ -184,59 +184,53 @@ attribute can contain spaces in their name.</p>
</table>

<h3>Examples</h3>
<p>Generate a change log report for all the changes that have been made under
the <samp>dve/network</samp> directory. Write these changes into the
file <samp>changelog.xml</samp>.</p>
<pre>
&lt;cvschangelog dir=&quot;dve/network&quot;
destfile=&quot;changelog.xml&quot;/&gt;</pre>

<p>Generates a change log report for all the changes that have been made under
the <samp>dve/network</samp> directory. It writes these changes into the
file <samp>changelog.xml</samp>.</p>

<p>Generate a change log report for any changes that were made under the <samp>dve/network</samp>
directory in the past 10 days. Write these changes into the file <samp>changelog.xml</samp>.</p>
<pre>
&lt;cvschangelog dir=&quot;dve/network&quot;
destfile=&quot;changelog.xml&quot;
daysinpast=&quot;10&quot;/&gt;</pre>

<p>Generates a change log report for any changes that were made under the <samp>dve/network</samp>
directory in the past 10 days. It writes these changes into the
<p>Generate a change log report for any changes that were made between February 20, 2002 and March
20, 2002 under the <samp>dve/network</samp> directory. Write these changes into the
file <samp>changelog.xml</samp>.</p>

<pre>
&lt;cvschangelog dir=&quot;dve/network&quot;
destfile=&quot;changelog.xml&quot;
start=&quot;20 Feb 2002&quot;
end=&quot;20 Mar 2002&quot;/&gt;</pre>

<p>Generates a change log report for any changes that were made between February 20, 2002 and March
20, 2002 under the <samp>dve/network</samp> directory. It writes these changes into the
<p>Generate a change log report for any changes that were made after February 20, 2002 under
the <samp>dve/network</samp> directory. Write these changes into the
file <samp>changelog.xml</samp>.</p>

<pre>
&lt;cvschangelog dir=&quot;dve/network&quot;
destfile=&quot;changelog.xml&quot;
start=&quot;20 Feb 2002&quot;/&gt;</pre>

<p>Generates a change log report for any changes that were made after February 20, 2002 under
the <samp>dve/network</samp> directory. It writes these changes into the
file <samp>changelog.xml</samp>.</p>
<p>Generate a change log report for all the changes that were made under
the <code>dve/network</code> directory, substituting the name <samp>Peter Donald</samp> in
the <code>&lt;author&gt;</code> tags anytime a change made by the user ID <samp>donaldp</samp> is
encountered. Write these changes into the file <samp>changelog.xml</samp>.</p>
<pre>
&lt;cvschangelog dir=&quot;dve/network&quot;
destfile=&quot;changelog.xml&quot;&gt;
&lt;user displayname=&quot;Peter Donald&quot; userid=&quot;donaldp&quot;/&gt;
&lt;/cvschangelog&gt;</pre>

<p>Generates a change log report for all the changes that were made under
the <code>dve/network</code> directory, substituting the name <samp>Peter Donald</samp> in
the <code>&lt;author&gt;</code> tags anytime it encounters a change made by the user
ID <samp>donaldp</samp>. It writes these changes into the file <samp>changelog.xml</samp>.</p>

<p>Generates a change log report on the <code>ANT_16_BRANCH</code>.</p>
<p>Generate a change log report on the <code>ANT_16_BRANCH</code>.</p>
<pre>
&lt;cvschangelog dir=&quot;c:/dev/asf/ant.head&quot; passfile=&quot;c:/home/myself/.cvspass&quot;
destfile=&quot;changelogant.xml&quot; tag=&quot;ANT_16_BRANCH&quot;/&gt;</pre>
<h4>Generate Report</h4>
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the XML
output. The following example illustrates how to generate a HTML report from the XML report.</p>

<pre>


+ 19
- 18
manual/Tasks/checksum.html View File

@@ -173,50 +173,54 @@ target="_top">Cryptography Architecture Standard Algorithm Name Documentation</a
for which checksums should be generated.</p>

<h3>Examples</h3>

<p><strong>Example 1</strong></p>
<pre>&lt;checksum file=&quot;foo.bar&quot;/&gt;</pre>
<p>Generates a MD5 checksum for <samp>foo.bar</samp> and stores the checksum in the destination
<p>Generate a MD5 checksum for <samp>foo.bar</samp> and store the checksum in the destination
file <samp>foo.bar.MD5</samp>. <samp>foo.bar.MD5</samp> is overwritten only if <samp>foo.bar</samp>
is newer than itself.</p>
<pre>&lt;checksum file=&quot;foo.bar&quot;/&gt;</pre>

<p><strong>Example 2</strong></p>
<pre>&lt;checksum file=&quot;foo.bar&quot; forceOverwrite=&quot;yes&quot;/&gt;</pre>
<p>Generates a MD5 checksum for <samp>foo.bar</samp> and stores the checksum
<p>Generate a MD5 checksum for <samp>foo.bar</samp> and store the checksum
in <samp>foo.bar.MD5</samp>. If <samp>foo.bar.MD5</samp> already exists, it is overwritten.</p>
<pre>&lt;checksum file=&quot;foo.bar&quot; forceOverwrite=&quot;yes&quot;/&gt;</pre>

<p><strong>Example 3</strong></p>
<pre>&lt;checksum file=&quot;foo.bar&quot; property=&quot;foobarMD5&quot;/&gt;</pre>
<p>Generates a MD5 checksum for <samp>foo.bar</samp> and stores it in the project
<p>Generate a MD5 checksum for <samp>foo.bar</samp> and store it in the project
property <code>foobarMD5</code>.</p>
<pre>&lt;checksum file=&quot;foo.bar&quot; property=&quot;foobarMD5&quot;/&gt;</pre>

<p><strong>Example 4</strong></p>
<p>Generate a MD5 checksum for <samp>foo.bar</samp>, compare it against <samp>foo.bar.MD5</samp> and
set <code>isMD5ok</code> to either <q>true</q> or <q>false</q>, depending upon the result.</p>
<pre>&lt;checksum file=&quot;foo.bar&quot; verifyProperty=&quot;isMD5ok&quot;/&gt;</pre>
<p>Generates a MD5 checksum for <samp>foo.bar</samp>, compares it against <samp>foo.bar.MD5</samp>
and sets <code>isMD5ok</code> to either <q>true</q> or <q>false</q>, depending upon the result.</p>

<p><strong>Example 5</strong></p>
<pre>&lt;checksum file=&quot;foo.bar&quot; algorithm=&quot;SHA-512&quot; fileext=&quot;asc&quot;/&gt;</pre>
<p>Generates a SHA-512 checksum for <samp>foo.bar</samp> and stores the checksum in the destination
<p>Generate a SHA-512 checksum for <samp>foo.bar</samp> and store the checksum in the destination
file <samp>foo.bar.asc</samp>. <samp>foo.bar.asc</samp> is overwritten only if <samp>foo.bar</samp>
is newer than itself.</p>
<pre>&lt;checksum file=&quot;foo.bar&quot; algorithm=&quot;SHA-512&quot; fileext=&quot;asc&quot;/&gt;</pre>

<p><strong>Example 6</strong></p>
<pre>&lt;checksum file=&quot;foo.bar&quot; property=&quot;${md5}&quot; verifyProperty=&quot;isEqual&quot;/&gt;</pre>
<p>Generates a MD5 checksum for <samp>foo.bar</samp>, compares it against the value of the
property <code>md5</code>, and sets <code>isEqual</code> to either <q>true</q> or <q>false</q>,
<p>Generate a MD5 checksum for <samp>foo.bar</samp>, compare it against the value of the
property <code>md5</code>, and set <code>isEqual</code> to either <q>true</q> or <q>false</q>,
depending upon the result.</p>
<pre>&lt;checksum file=&quot;foo.bar&quot; property=&quot;${md5}&quot; verifyProperty=&quot;isEqual&quot;/&gt;</pre>

<p><strong>Example 7</strong></p>
<p>Just like Example 1, but generates a <samp>.MD5</samp> file for every file that begins with the
name <samp>foo</samp>.</p>
<pre>
&lt;checksum&gt;
&lt;fileset dir=&quot;.&quot;&gt;
&lt;include name=&quot;foo*&quot;/&gt;
&lt;/fileset&gt;
&lt;/checksum&gt;</pre>
<p>Works just like Example 1, but generates a <samp>.MD5</samp> file for every file that begins with
the name <samp>foo</samp>.</p>

<p><strong>Example 8</strong></p>
<p>Just like Example 4, but only sets <code>isChecksumEqual</code> to <q>true</q>, if the checksum
matches&mdash;it will never be set to <q>false</q>. This example demonstrates use with
the <code>condition</code> task.</p>
<pre>
&lt;condition property=&quot;isChecksumEqual&quot;&gt;
&lt;checksum&gt;
@@ -225,9 +229,6 @@ the name <samp>foo</samp>.</p>
&lt;/fileset&gt;
&lt;/checksum&gt;
&lt;/condition&gt;</pre>
<p>Works like Example 4, but only sets <code>isChecksumEqual</code> to <q>true</q>, if the checksum
matches&mdash;it will never be set to <q>false</q>. This example demonstrates use with
the <code>condition</code> task.</p>

<h3>Note</h3>
<p>When working with more than one file, if condition and/or <var>verifyproperty</var> is used, the


+ 12
- 16
manual/Tasks/chgrp.html View File

@@ -110,19 +110,21 @@ set its value to your current OS.</p>
</tr>
</table>
<h3>Examples</h3>
<pre>&lt;chgrp file=&quot;${dist}/start.sh&quot; group=&quot;coders&quot;/&gt;</pre>

<p>makes the <samp>start.sh</samp> file belong to the <samp>coders</samp> group on a UNIX
system.</p>
<p>Make the <samp>start.sh</samp> file belong to the <samp>coders</samp> group on a UNIX system.</p>
<pre>&lt;chgrp file=&quot;${dist}/start.sh&quot; group=&quot;coders&quot;/&gt;</pre>

<p>Make all <samp>.sh</samp> files below <samp>${dist}/bin</samp> belong to the <samp>coders</samp>
group on a UNIX system.</p>
<pre>
&lt;chgrp group=&quot;coders&quot;&gt;
&lt;fileset dir=&quot;${dist}/bin&quot; includes=&quot;**/*.sh&quot;/&gt;
&lt;/chgrp&gt;</pre>

<p>makes all <samp>.sh</samp> files below <samp>${dist}/bin</samp> belong to the <samp>coders</samp>
group on a UNIX system.</p>

<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) belong to the <samp>coders</samp> group on a UNIX system. In addition, all
files belonging to a FileSet with <var>id</var>=<samp>other.shared.sources</samp> get the same
group.</p>
<pre>
&lt;chgrp group=&quot;coders&quot;&gt;
&lt;fileset dir=&quot;shared/sources1&quot;&gt;
@@ -132,11 +134,10 @@ group on a UNIX system.</p>
&lt;/chgrp&gt;
</pre>

<p>makes all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) belong to the <samp>coders</samp> group on a UNIX system. In addition all
files belonging to a FileSet with <var>id</var> <samp>other.shared.sources</samp> get the same
group.</p>

<p>Make all <samp>.test.jsp</samp>, and <samp>.new</samp> files belong to
group <samp>webdev</samp>. Directories with names beginning with <samp>test_</samp> also will belong
to <samp>webdev</samp>, but if there is a directory name that ends in <samp>.new</samp> or a file
name that begins with <samp>test_</samp> it will be unaffected.</p>
<pre>
&lt;chgrp group=&quot;webdev&quot; type=&quot;file&quot;&gt;
&lt;fileset dir=&quot;/web&quot;&gt;
@@ -148,10 +149,5 @@ group.</p>
&lt;/dirset&gt;
&lt;/chmod&gt;</pre>

<p>makes all <samp>.test.jsp</samp>, and <samp>.new</samp> files belong to
group <samp>webdev</samp>. Directories with names beginning with <samp>test_</samp> also will belong
to <samp>webdev</samp>, but if there is a directory name that ends in <samp>.new</samp> or a file
name that begins with <samp>test_</samp> it will be unaffected.</p>

</body>
</html>

+ 13
- 11
manual/Tasks/chmod.html View File

@@ -138,19 +138,24 @@ alternative.</p>
</tr>
</table>
<h3>Examples</h3>

<p>Make the <samp>start.sh</samp> file readable and executable for anyone on a UNIX system.</p>
<pre>&lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;ugo+rx&quot;/&gt;</pre>
<p>makes the <samp>start.sh</samp> file readable and executable for anyone on a UNIX system.</p>

<pre>&lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;700&quot;/&gt;</pre>
<p>makes the <samp>start.sh</samp> file readable, writable and executable only for the owner on a
<p>Make the <samp>start.sh</samp> file readable, writable and executable only for the owner on a
UNIX system.</p>
<pre>&lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;700&quot;/&gt;</pre>

<p>Make all <samp>.sh</samp> files below <samp>${dist}/bin</samp> readable and executable for anyone
on a UNIX system.</p>
<pre>
&lt;chmod dir=&quot;${dist}/bin&quot; perm=&quot;ugo+rx&quot;
includes=&quot;**/*.sh&quot;/&gt;</pre>
<p>makes all <samp>.sh</samp> files below <samp>${dist}/bin</samp> readable and executable for
anyone on a UNIX system.</p>

<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) writable for members of the same group on a UNIX system. In addition, all
files belonging to a FileSet with <var>id</var> <samp>other.shared.sources</samp> get the same
permissions.</p>
<pre>
&lt;chmod perm=&quot;g+w&quot;&gt;
&lt;fileset dir=&quot;shared/sources1&quot;&gt;
@@ -158,10 +163,10 @@ anyone on a UNIX system.</p>
&lt;/fileset&gt;
&lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
&lt;/chmod&gt;</pre>
<p>makes all files below <samp>shared/sources1</samp> (except those below any directory named trial)
writable for members of the same group on a UNIX system. In addition all files belonging to a
FileSet with <var>id</var> <samp>other.shared.sources</samp> get the same permissions.</p>

<p>Keep non-owners from touching <code>cgi</code> scripts, files with a <samp>.old</samp> extension
or directories beginning with <samp>private_</samp>. A directory ending in <samp>.old</samp> or a
file beginning with <samp>private_</samp> would remain unaffected.</p>
<pre>
&lt;chmod perm=&quot;go-rwx&quot; type=&quot;file&quot;&gt;
&lt;fileset dir=&quot;/web&quot;&gt;
@@ -172,9 +177,6 @@ FileSet with <var>id</var> <samp>other.shared.sources</samp> get the same permis
&lt;include name=&quot;**/private_*&quot;/&gt;
&lt;/dirset&gt;
&lt;/chmod&gt;</pre>
<p>keeps non-owners from touching cgi scripts, files with a <samp>.old</samp> extension or
directories beginning with <samp>private_</samp>. A directory ending in <samp>.old</samp> or a file
beginning with <samp>private_</samp> would remain unaffected.</p>

<h3>Note on <var>maxparallel</var> attribute</h3>
<p>Some shells have a limit of the number of characters that a command line may contain. This


+ 10
- 9
manual/Tasks/chown.html View File

@@ -111,16 +111,20 @@ value to your current OS.</p>
</tr>
</table>
<h3>Examples</h3>

<p>Make the <samp>start.sh</samp> file belong to <samp>coderjoe</samp> on a UNIX system.</p>
<pre>&lt;chown file="${dist}/start.sh" owner="coderjoe"/&gt;</pre>
<p>makes the <samp>start.sh</samp> file belong to <samp>coderjoe</samp> on a UNIX system.</p>

<p>Make all <samp>.sh</samp> files below <samp>${dist}/bin</samp> belong to <samp>coderjoe</samp> on
a UNIX system.</p>
<pre>
&lt;chown owner="coderjoe"&gt;
&lt;fileset dir="${dist}/bin" includes="**/*.sh"/&gt;
&lt;/chown&gt;</pre>
<p>makes all <samp>.sh</samp> files below <samp>${dist}/bin</samp> belong to <samp>coderjoe</samp>
on a UNIX system.</p>

<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) belong to <samp>coderjoe</samp> on a UNIX system. In addition, all files
belonging to a FileSet with <var>id</var>=<code>other.shared.sources</code> get the same owner.</p>
<pre>
&lt;chown owner="coderjoe"&gt;
&lt;fileset dir="shared/sources1"&gt;
@@ -128,10 +132,10 @@ on a UNIX system.</p>
&lt;/fileset&gt;
&lt;fileset refid="other.shared.sources"/&gt;
&lt;/chown&gt;</pre>
<p>makes all files below <samp>shared/sources1</samp> (except those below any directory
named <samp>trial</samp>) belong to <samp>coderjoe</samp> on a UNIX system. In addition all files
belonging to a FileSet with <var>id</var> <code>other.shared.sources</code> get the same owner.</p>

<p>Make <samp>cgi</samp> scripts, files with a <samp>.old</samp> extension or directories beginning
with <samp>private_</samp> belong to the user named <samp>webadmin</samp>. A directory ending
in <samp>.old</samp> or a file beginning with <samp>private_</samp> would remain unaffected.</p>
<pre>
&lt;chown owner="webadmin" type="file"&gt;
&lt;fileset dir="/web"&gt;
@@ -142,9 +146,6 @@ belonging to a FileSet with <var>id</var> <code>other.shared.sources</code> get
&lt;include name="**/private_*"/&gt;
&lt;/dirset&gt;
&lt;/chmod&gt;</pre>
<p>makes <samp>cgi</samp> scripts, files with a <samp>.old</samp> extension or directories beginning
with <samp>private_</samp> belong to the user named <samp>webadmin</samp>. A directory ending
in <samp>.old</samp> or a file beginning with <samp>private_</samp> would remain unaffected.</p>

</body>
</html>

+ 35
- 48
manual/Tasks/clearcase.html View File

@@ -118,17 +118,16 @@ problem.</p>
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>checkin</code> on the file <samp>c:/views/viewdir/afile</samp>. Comment
text from the file <samp>acomment.txt</samp> is added to ClearCase as a comment. All warning
messages are suppressed. The file is checked in even if it is <em>identical</em> to the
original.</p>
<pre>
&lt;cccheckin viewpath="c:/views/viewdir/afile"
commentfile="acomment.txt"
nowarn="true"
identical="true"/&gt;</pre>

<p>Does a ClearCase <code>checkin</code> on the file <samp>c:/views/viewdir/afile</samp>. Comment
text from the file <samp>acomment.txt</samp> is added to ClearCase as a comment. All warning
messages are suppressed. The file is checked in even if it is <em>identical</em> to the
original.</p>

<hr/>

<h2 id="cccheckout">CCCheckout</h2>
@@ -200,6 +199,9 @@ original.</p>
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>checkout</code> on the file <samp>c:/views/viewdir/afile</samp>. It is
checked out as <em>reserved</em> on branch called <samp>abranch</samp>. All warning messages are
suppressed. A &quot;<samp>Some comment text</samp>&quot; is added to ClearCase as a comment.</p>
<pre>
&lt;cccheckout viewpath="c:/views/viewdir/afile"
reserved="true"
@@ -207,10 +209,6 @@ original.</p>
nowarn="true"
comment="Some comment text"/&gt;</pre>

<p>Does a ClearCase <code>checkout</code> on the file <samp>c:/views/viewdir/afile</samp>. It is
checked out as <em>reserved</em> on branch called <samp>abranch</samp>. All warning messages are
suppressed. A &quot;<samp>Some comment text</samp>&quot; is added to ClearCase as a comment.</p>

<hr/>

<h2 id="ccuncheckout">CCUnCheckout</h2>
@@ -241,11 +239,10 @@ suppressed. A &quot;<samp>Some comment text</samp>&quot; is added to ClearCase a
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>uncheckout</code> on the file <samp>c:/views/viewdir/afile</samp>. A
copy of the file named <samp>c:/views/viewdir/afile.keep</samp> is kept.</p>
<pre>&lt;ccuncheckout viewpath="c:/views/viewdir/afile" keepcopy="true"/&gt;</pre>

<p>Does a ClearCase <code>uncheckout</code> on the file <samp>c:/views/viewdir/afile</samp>. A copy
of the file called <samp>c:/views/viewdir/afile.keep</samp> is kept.</p>

<hr/>

<h2 id="ccupdate">CCUpdate</h2>
@@ -303,6 +300,10 @@ of the file called <samp>c:/views/viewdir/afile.keep</samp> is kept.</p>
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>update</code> on the snapshot view
directory <samp>c:/views/viewdir</samp>. A graphical dialog will be displayed. The output will be
logged to <samp>log.log</samp> and it will overwrite any hijacked files. The modified time will be
set to the current time.</p>
<pre>
&lt;ccupdate viewpath="c:/views/viewdir"
graphical="false"
@@ -311,11 +312,6 @@ of the file called <samp>c:/views/viewdir/afile.keep</samp> is kept.</p>
currenttime="true"
rename="false"/&gt;</pre>

<p>Does a ClearCase <code>update</code> on the snapshot view
directory <samp>c:/views/viewdir</samp>. A graphical dialog will be displayed. The output will be
logged to <samp>log.log</samp> and it will overwrite any hijacked files. The modified time will be
set to the current time.</p>

<hr/>

<h2 id="ccmklbtype">CCMklbtype</h2>
@@ -382,15 +378,14 @@ set to the current time.</p>

<h3>Examples</h3>

<p>Perform a ClearCase <code>mklbtype</code> to create a label type named <samp>VERSION_1</samp>. It
is created as <em>ordinary</em> so it is available only to the current VOB. The text <q>Development
version 1</q> is added as a comment.</p>
<pre>
&lt;ccmklbtype typename="VERSION_1"
ordinary="true"
comment="Development version 1"/&gt;</pre>

<p>Does a ClearCase <code>mklbtype</code> to create a label type named <samp>VERSION_1</samp>. It
is created as <em>ordinary</em> so it is available only to the current VOB. The text <q>Development
version 1</q> is added as a comment.</p>

<hr/>

<h2 id="ccmklabel">CCMklabel</h2>
@@ -451,6 +446,9 @@ version 1</q> is added as a comment.</p>

<h3>Examples</h3>

<p>Perform a ClearCase <code>mklabel</code> on the file <samp>c:/views/viewdir/afile</samp> under
the <samp>main</samp> branch for version 2 (<samp>\main\2</samp>). Text &quot;<samp>Some comment
text</samp>&quot; is added as a comment. It will <em>recurse</em> all subdirectories.</p>
<pre>
&lt;ccmklabel viewpath="c:/views/viewdir/afile"
comment="Some comment text"
@@ -459,10 +457,6 @@ version 1</q> is added as a comment.</p>
typename="VERSION_1"/&gt;
</pre>

<p>Does a ClearCase <code>mklabel</code> on the file <samp>c:/views/viewdir/afile</samp> under the
main branch for version 2 (<samp>\main\2</samp>). Text &quot;<samp>Some comment text</samp>&quot; is
added as a comment. It will <em>recurse</em> all subdirectories.</p>

<hr/>

<h2 id="ccrmtype">CCRmtype</h2>
@@ -544,16 +538,15 @@ added as a comment. It will <em>recurse</em> all subdirectories.</p>

<h3>Examples</h3>

<p>Perform a ClearCase <code>rmtype</code> to remove a label type (<q>lbtype</q>)
named <samp>VERSION_1</samp>. Comment text from the file <samp>acomment.txt</samp> is added as a
comment. All instances of the type are removed, including the type object itself.</p>
<pre>
&lt;ccrmtype typekind="lbtype"
typename="VERSION_1"
commentfile="acomment.txt"
rmall="true"/&gt;</pre>

<p>Does a ClearCase <code>rmtype</code> to remove a label type (<q>lbtype</q>)
named <samp>VERSION_1</samp>. Comment text from the file <samp>acomment.txt</samp> is added as a
comment. All instances of the type are removed, including the type object itself.</p>

<hr/>

<h2 id="cclock">CCLock</h2>
@@ -609,10 +602,9 @@ comment. All instances of the type are removed, including the type object itself
</table>
<h3>Examples</h3>

<pre>&lt;cclock objsel="stream:Application_Integration@\MyProject_PVOB"/&gt;</pre>

<p>Does a ClearCase <code>lock</code> on the
<p>Perform a ClearCase <code>lock</code> on the
object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p>
<pre>&lt;cclock objsel="stream:Application_Integration@\MyProject_PVOB"/&gt;</pre>

<hr/>

@@ -654,10 +646,9 @@ object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p>
</table>
<h3>Examples</h3>

<pre>&lt;ccunlock objsel="stream:Application_Integration@\MyProject_PVOB"/&gt;</pre>

<p>Does a ClearCase <code>unlock</code> on the
<p>Perform a ClearCase <code>unlock</code> on the
object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p>
<pre>&lt;ccunlock objsel="stream:Application_Integration@\MyProject_PVOB"/&gt;</pre>

<hr/>

@@ -713,16 +704,15 @@ object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p>
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>mkbl</code> on the Integration view at <samp>v:\ApplicationCC</samp>
even if it is <em>identical</em> to a previous baseline. The new baseline with be incremental and
named <samp>Application_Baseline_AUTO</samp>.</p>
<pre>
&lt;ccmkbl baselinerootname="Application_Baseline_AUTO"
identical="yes"
full="no"
viewpath="v:\ApplicationCC"/&gt;</pre>

<p>Does a ClearCase <code>mkbl</code> on the Integration view at <samp>v:\ApplicationCC</samp> even
if it is <em>identical</em> to a previous baseline. The new baseline with be incremental and
named <samp>Application_Baseline_AUTO</samp>.</p>

<hr/>

<h2 id="ccmkattr">CCMkattr</h2>
@@ -783,15 +773,14 @@ named <samp>Application_Baseline_AUTO</samp>.</p>
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>mkattr</code> on the file <samp>c:/views/viewdir/afile</samp> and
attach the attribute <samp>BugFix</samp> with a value of <samp>34445</samp> to it.</p>
<pre>
&lt;ccmkattr viewpath=&quot;c:/views/viewdir/afile&quot;
typename=&quot;BugFix&quot;
typevalue=&quot;34445&quot;/&gt;
</pre>

<p>Does a ClearCase <code>mkattr</code> on the file <samp>c:/views/viewdir/afile</samp> and attaches
the attribute <samp>BugFix</samp> with a value of <samp>34445</samp> to it.</p>

<hr/>

<h2 id="ccmkdir">CCMkdir</h2>
@@ -832,14 +821,13 @@ the attribute <samp>BugFix</samp> with a value of <samp>34445</samp> to it.</p>
</table>
<h3>Examples</h3>

<p>Perform a ClearCase <code>mkdir</code> on the dir <samp>c:/views/viewdir/adir</samp> and do not
automatically check it out.</p>
<pre>
&lt;ccmkdir viewpath=&quot;c:/views/viewdir/adir&quot;
nocheckout=&quot;true&quot;
comment=&quot;Some comment text&quot;/&gt;</pre>

<p>Does a ClearCase <code>mkdir</code> on the dir <samp>c:/views/viewdir/adir</samp> and does not
automatically check it out.</p>

<hr/>

<h2 id="ccmkelem">CCMkelem</h2>
@@ -905,14 +893,13 @@ automatically check it out.</p>
</table>
<h3>Examples</h3>

<p>Perform ClearCase <code>mkelem</code> on the file <samp>c:/views/viewdir/afile</samp> with
element type <samp>text_file</samp>, check in the file after creation.</p>
<pre>
&lt;ccmkelem viewpath=&quot;c:/views/viewdir/afile&quot;
eltype=&quot;text_file&quot;
checkin=&quot;true&quot;
comment=&quot;Some comment text&quot;/&gt;</pre>

<p>Does a ClearCase <code>mkelem</code> on the file <samp>c:/views/viewdir/afile</samp> with element
type <samp>text_file</samp>. It also checks in the file after creation.</p>

</body>
</html>

+ 3
- 3
manual/Tasks/componentdef.html View File

@@ -38,13 +38,13 @@ like <samp>and</samp> or <samp>or</samp>.</p>

<h3>Examples</h3>

<p>Define two components with the same name <samp>or</samp>; one is a
condition (see <a href="conditions.html">conditions</a>) and one is a
selector (see <a href="../Types/selectors.html">selectors</a>).</p>
<pre>
&lt;componentdef name="or" onerror="ignore"
classname="com.apache.tools.ant.taskdefs.conditions.Or"/&gt;
&lt;componentdef name="or" onerror="ignore"
classname="com.apache.tools.ant.types.resources.selectors.Or"/&gt;</pre>
<p>defines two components with the same name <samp>or</samp>; one is a condition
(see <a href="conditions.html">conditions</a>) and one is a selector
(see <a href="../Types/selectors.html">selectors</a>).</p>
</body>
</html>

+ 9
- 13
manual/Tasks/concat.html View File

@@ -185,27 +185,23 @@

<h3>Examples</h3>

<p><strong>Concatenate a string to a file:</strong></p>

<p>Concatenate a string to a file:</p>
<pre>&lt;concat destfile=&quot;README&quot;&gt;Hello, World!&lt;/concat&gt;</pre>

<p><strong>Concatenate a series of files to the console:</strong></p>

<p>Concatenate a series of files to the console:</p>
<pre>
&lt;concat&gt;
&lt;fileset dir=&quot;messages&quot; includes=&quot;*important*&quot;/&gt;
&lt;/concat&gt;</pre>

<p><strong>Concatenate a single file, appending if the destination file exists:</strong></p>

<p>Concatenate a single file, appending if the destination file exists:</p>
<pre>
&lt;concat destfile=&quot;NOTES&quot; append=&quot;true&quot;&gt;
&lt;filelist dir=&quot;notes&quot; files=&quot;note.txt&quot;/&gt;
&lt;/concat&gt;</pre>

<p><strong>Concatenate a series of files, update the destination file only if is older that all
the source files:</strong></p>

<p>Concatenate a series of files, update the destination file only if is older that all the
source files:</p>
<pre>
&lt;concat destfile=&quot;${docbook.dir}/all-sections.xml&quot;
force=&quot;no&quot;&gt;
@@ -216,7 +212,7 @@
excludes=&quot;introduction.xml,overview.xml&quot;/&gt;
&lt;/concat&gt;</pre>

<p><strong>Concatenate a series of files, expanding Ant properties</strong></p>
<p>Concatenate a series of files, expanding Ant properties.</p>
<pre>
&lt;concat destfile="${build.dir}/subs"&gt;
&lt;path&gt;
@@ -228,8 +224,8 @@
&lt;/filterchain&gt;
&lt;/concat&gt;</pre>

<p><strong>Filter the lines containing project from build.xml and output them to report.output,
prepending with a header</strong></p>
<p>Filter the lines containing project from <samp>build.xml</samp> and output them
to <samp>report.output</samp>, prepending with a header.</p>
<pre>
&lt;concat destfile="${build.dir}/report.output"&gt;
&lt;header filtering="no" trimleading="yes"&gt;
@@ -244,7 +240,7 @@
&lt;/filterchain&gt;
&lt;/concat&gt;</pre>

<p><strong>Concatenate a number of binary files.</strong></p>
<p>Concatenate a number of binary files.</p>
<pre>
&lt;concat destfile="${build.dir}/dist.bin" binary="yes"&gt;
&lt;fileset file="${src.dir}/scripts/dist.sh"/&gt;


+ 7
- 6
manual/Tasks/condition.html View File

@@ -63,6 +63,9 @@ condition.</p>
see <a href="conditions.html">here</a>.</p>

<h3>Examples</h3>

<p>Set the property <code>javamail.complete</code> if both the JavaBeans Activation Framework and
JavaMail are available in the classpath.</p>
<pre>
&lt;condition property=&quot;javamail.complete&quot;&gt;
&lt;and&gt;
@@ -70,9 +73,9 @@ see <a href="conditions.html">here</a>.</p>
&lt;available classname=&quot;javax.mail.Transport&quot;/&gt;
&lt;/and&gt;
&lt;/condition&gt;</pre>
<p>sets the property <code>javamail.complete</code> if both the JavaBeans Activation Framework and
JavaMail are available in the classpath.</p>

<p>Set the property <code>isMacOsButNotMacOsX</code> if the current operating system is MacOS, but
not MacOS X/macOS&mdash;which Ant considers to be in the Unix family as well.</p>
<pre>
&lt;condition property=&quot;isMacOsButNotMacOsX&quot;&gt;
&lt;and&gt;
@@ -82,15 +85,13 @@ JavaMail are available in the classpath.</p>
&lt;/not&gt;
&lt;/and&gt;
&lt;/condition&gt;</pre>
<p>sets the property <code>isMacOsButNotMacOsX</code> if the current operating system is MacOS, but
not MacOS X/macOS&mdash;which Ant considers to be in the Unix family as well.</p>

<p>Set the property <code>isSunOSonSparc</code> if the current operating system is SunOS and if it
is running on a SPARC architecture.</p>
<pre>
&lt;condition property=&quot;isSunOSonSparc&quot;&gt;
&lt;os name=&quot;SunOS&quot; arch=&quot;sparc&quot;/&gt;
&lt;/condition&gt;</pre>
<p>sets the property <code>isSunOSonSparc</code> if the current operating system is SunOS and if it
is running on a SPARC architecture.</p>

</body>
</html>

+ 17
- 12
manual/Tasks/copy.html View File

@@ -183,17 +183,21 @@ the same <code>&lt;copy&gt;</code> task, all <code>&lt;filterchain&gt;</code> el
first followed by <code>&lt;filterset&gt;</code> elements.</p>

<h3>Examples</h3>
<p><strong>Copy a single file</strong></p>

<p>Copy a single file</p>
<pre>&lt;copy file=&quot;myfile.txt&quot; tofile=&quot;mycopy.txt&quot;/&gt;</pre>
<p><strong>Copy a single file to a directory</strong></p>

<p>Copy a single file to a directory</p>
<pre>&lt;copy file=&quot;myfile.txt&quot; todir=&quot;../some/other/dir&quot;/&gt;</pre>
<p><strong>Copy a directory to another directory</strong></p>

<p>Copy a directory to another directory</p>
<pre>
&lt;copy todir=&quot;../new/dir&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot;/&gt;
&lt;/copy&gt;
</pre>
<p><strong>Copy a set of files to a directory</strong></p>

<p>Copy a set of files to a directory</p>
<pre>
&lt;copy todir=&quot;../dest/dir&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot;&gt;
@@ -204,16 +208,17 @@ first followed by <code>&lt;filterset&gt;</code> elements.</p>
&lt;copy todir=&quot;../dest/dir&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot; excludes=&quot;**/*.java&quot;/&gt;
&lt;/copy&gt;</pre>
<p><strong>Copy a set of files to a directory, appending <samp>.bak</samp> to the file name on the
fly</strong></p>

<p>Copy a set of files to a directory, appending <samp>.bak</samp> to the file name on the
fly</p>
<pre>
&lt;copy todir=&quot;../backup/dir&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot;/&gt;
&lt;globmapper from=&quot;*&quot; to=&quot;*.bak&quot;/&gt;
&lt;/copy&gt;</pre>

<p><strong>Copy a set of files to a directory, replacing <code>@TITLE@</code> with <samp>Foo
Bar</samp> in all files.</strong></p>
<p>Copy a set of files to a directory, replacing <code>@TITLE@</code> with <samp>Foo
Bar</samp> in all files.</p>
<pre>
&lt;copy todir=&quot;../backup/dir&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot;/&gt;
@@ -222,8 +227,8 @@ Bar</samp> in all files.</strong></p>
&lt;/filterset&gt;
&lt;/copy&gt;</pre>

<p><strong>Collect all items from the current <code>CLASSPATH</code> setting into a destination
directory, flattening the directory structure.</strong></p>
<p>Collect all items from the current <code>CLASSPATH</code> setting into a destination
directory, flattening the directory structure.</p>
<pre>
&lt;copy todir=&quot;dest&quot; flatten=&quot;true&quot;&gt;
&lt;path&gt;
@@ -231,7 +236,7 @@ directory, flattening the directory structure.</strong></p>
&lt;/path&gt;
&lt;/copy&gt;</pre>

<p><strong>Copies some resources to a given directory.</strong></p>
<p>Copies some resources to a given directory.</p>
<pre>
&lt;copy todir=&quot;dest&quot; flatten=&quot;true&quot;&gt;
&lt;resources&gt;
@@ -245,7 +250,7 @@ resource would have returned its full path as source and target name and would n
at all. In general it is a good practice to use an explicit mapper together with resources that use
an absolute path as their names.</p>

<p><strong>Copies the two newest resources into a destination directory.</strong></p>
<p>Copies the two newest resources into a destination directory.</p>
<pre>
&lt;copy todir=&quot;dest&quot; flatten=&quot;true&quot;&gt;
&lt;first count=&quot;2&quot;&gt;


+ 9
- 7
manual/Tasks/copydir.html View File

@@ -102,26 +102,28 @@ and <code>&lt;patternset&gt;</code> elements.</p>
</tr>
</table>
<h3>Examples</h3>
<p>Copy the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>.</p>
<pre>
&lt;copydir src=&quot;${src}/resources&quot;
dest=&quot;${dist}&quot;/&gt;</pre>
<p>copies the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>.</p>

<p>Copy the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>
recursively. All <samp>.java</samp> files are copied, except for files with the
name <samp>Test.java</samp>.</p>
<pre>
&lt;copydir src=&quot;${src}/resources&quot;
dest=&quot;${dist}&quot;
includes=&quot;**/*.java&quot;
excludes=&quot;**/Test.java&quot;/&gt;</pre>
<p>copies the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>
recursively. All <samp>.java</samp> files are copied, except for files with the
name <samp>Test.java</samp>.</p>

<p>Copy the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>
recursively. All <samp>.java</samp> files are copied, except for the files under
the <samp>mypackage/test</samp> directory.</p>
<pre>
&lt;copydir src=&quot;${src}/resources&quot;
dest=&quot;${dist}&quot;
includes=&quot;**/*.java&quot;
excludes=&quot;mypackage/test/**&quot;/&gt;</pre>
<p>copies the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>
recursively. All <samp>.java</samp> files are copied, except for the files under
the <samp>mypackage/test</samp> directory.</p>

</body>
</html>

+ 15
- 14
manual/Tasks/cvs.html View File

@@ -169,22 +169,23 @@ attribute can contain spaces in their name.</p>
</table>

<h3>Examples</h3>

<p>Check out the package/module <samp>ant</samp> from the CVS repository pointed to by
the <var>cvsRoot</var> attribute, and store the files in <samp>${ws.dir}</samp>.</p>
<pre>
&lt;cvs cvsRoot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot;
package=&quot;ant&quot;
dest=&quot;${ws.dir}&quot;/&gt;</pre>
<p>checks out the package/module <samp>ant</samp> from the CVS repository pointed to by
the <var>cvsRoot</var> attribute, and stores the files in <samp>${ws.dir}</samp>.</p>

<p>Update the package/module that has previously been checked out into <samp>${ws.dir}</samp>.</p>
<pre>&lt;cvs dest=&quot;${ws.dir}&quot; command=&quot;update&quot;/&gt;</pre>
<p>updates the package/module that has previously been checked out into <samp>${ws.dir}</samp>.</p>

<p>Silently (<kbd>-q</kbd>) create a file called <samp>patch.txt</samp> containing a unified
(<kbd>-u</kbd>) diff which includes new files added via <kbd>cvs add</kbd> (<kbd>-N</kbd>) and can
be used as input to <kbd>patch</kbd>.</p>
<pre>&lt;cvs command=&quot;-q diff -u -N&quot; output=&quot;patch.txt&quot;/&gt;</pre>

<p>silently (<kbd>-q</kbd>) creates a file called <samp>patch.txt</samp> which contains a unified
(<kbd>-u</kbd>) diff which includes new files added via <kbd>cvs add</kbd> (<kbd>-N</kbd>) and
can be used as input to <kbd>patch</kbd>. The equivalent, using <code>&lt;commandline&gt;</code>
elements, is:</p>
<p>The equivalent, using <code>&lt;commandline&gt;</code> elements, is:</p>
<pre>
&lt;cvs output=&quot;patch&quot;&gt;
&lt;commandline&gt;
@@ -205,15 +206,15 @@ elements, is:</p>
the <var>failonerror</var>, <var>compression</var>, and other &quot;global&quot; parameters from
the <code>&lt;cvs&gt;</code> element.</p>

<pre> &lt;cvs command=&quot;update -A -d&quot;/&gt;</pre>
<p>Updates from the head of repository ignoring sticky bits (<kbd>-A</kbd>) and creating any new
<p>Update from the head of repository ignoring sticky bits (<kbd>-A</kbd>) and creating any new
directories as necessary (<kbd>-d</kbd>).</p>
<p>Note: the text of the command is passed to <kbd>cvs</kbd> &quot;as-is&quot; so any cvs options
should appear before the command, and any command options should appear after the command as in the
diff example above. See <a href="http://cvsbook.red-bean.com/cvsbook.html" target="_top">the CVS
book</a> for details, specifically
<pre>&lt;cvs command=&quot;update -A -d&quot;/&gt;</pre>
<p>Note: the text of the command is passed to <kbd>cvs</kbd> &quot;as-is&quot; so any <kbd>cvs</kbd>
options should appear before the command, and any command options should appear after the command as
in the <code>diff</code> example above. See <a href="http://cvsbook.red-bean.com/cvsbook.html"
target="_top">the CVS book</a> for details, specifically
the <a href="http://cvsbook.red-bean.com/cvsbook.html#Commands%20And%20Options" target="_top">Guide
to CVS commands</a></p>
to CVS commands</a>.</p>

</body>
</html>

+ 1
- 1
manual/Tasks/cvspass.html View File

@@ -59,10 +59,10 @@ target="_top">bugzilla report 21657</a> for recommended workarounds.</p>
</tr>
</table>
<h3>Examples</h3>
<p>Add an entry into the <samp>~/.cvspass</samp> password file.</p>
<pre>
&lt;cvspass cvsroot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot;
password=&quot;anoncvs&quot;/&gt;</pre>
<p>Adds an entry into the <samp>~/.cvspass</samp> password file.</p>

</body>
</html>

+ 24
- 22
manual/Tasks/cvstagdiff.html View File

@@ -147,6 +147,9 @@ attribute can contain spaces in their name.</p>
</table>

<h3>Examples</h3>
<p>Generate a <code>tagdiff</code> report for all the changes that have been made in
the <code>ant</code> module between the tags <samp>ANT_14</samp>
and <samp>ANT_141</samp>. Write these changes into the file <samp>tagdiff.xml</samp>.</p>
<pre>
&lt;cvstagdiff cvsRoot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot;
destfile=&quot;tagdiff.xml&quot;
@@ -154,36 +157,31 @@ attribute can contain spaces in their name.</p>
startTag=&quot;ANT_14&quot;
endTag=&quot;ANT_141&quot;/&gt;</pre>

<p>Generates a <code>tagdiff</code> report for all the changes that have been made in
the <code>ant</code> module between the tags <samp>ANT_14</samp> and <samp>ANT_141</samp>. It
writes these changes into the file <samp>tagdiff.xml</samp>.</p>

<p>Generate a <code>tagdiff</code> report for all the changes that have been made in
the <samp>ant</samp> module in January 2002. Write the changes into the
file <samp>tagdiff.xml</samp>. In this example, <var>cvsRoot</var> has not been
set. The current <var>cvsRoot</var> will be used (assuming the build is started from a folder stored
in CVS.</p>
<pre>
&lt;cvstagdiff destfile=&quot;tagdiff.xml&quot;
package=&quot;ant&quot;
startDate=&quot;2002-01-01&quot;
endDate=&quot;2002-31-01&quot;/&gt;</pre>

<p>Generates a <code>tagdiff</code> report for all the changes that have been made in
the <samp>ant</samp> module in January 2002. In this example <var>cvsRoot</var> has not been
set. The current <var>cvsRoot</var> will be used (assuming the build is started from a folder stored
in <samp>cvs</samp>. It writes these changes into the file <samp>tagdiff.xml</samp>.</p>
<p>Generate a <code>tagdiff</code> report for all the changes that have been made in
the <samp>ant</samp> and <samp>jakarta-gump</samp> modules in January 2003. Write the changes into
the file <samp>tagdiff.xml</samp>. In this
example, <var>cvsRoot</var> has not been set. The current <var>cvsRoot</var> will be used (assuming
the build is started from a folder stored in CVS.</p>
<pre>
&lt;cvstagdiff destfile=&quot;tagdiff.xml&quot;
package=&quot;ant jakarta-gump&quot;
startDate=&quot;2003-01-01&quot;
endDate=&quot;2003-31-01&quot;/&gt;</pre>

<p>Generates a <code>tagdiff</code> report for all the changes that have been made in
the <samp>ant</samp> and <samp>jakarta-gump</samp> modules in January 2003. In this
example <var>cvsRoot</var> has not been set. The current <var>cvsRoot</var> will be used (assuming
the build is started from a folder stored in <samp>cvs</samp>. It writes these changes into the
file <samp>tagdiff.xml</samp>.</p>

<h4>Generate Report</h4>
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml
output. The following example illustrates how to generate a HTML report from the XML report.</p>
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the XML
output. The following example illustrates how to generate an HTML report from the XML report.</p>

<pre>
&lt;style in="tagdiff.xml"
@@ -195,27 +193,31 @@ output. The following example illustrates how to generate a HTML report from the
&lt;/style&gt;</pre>

<h4>Output</h4>
<p>The <var>cvsroot</var> and <var>package</var> attributes of the <code>tagdiff</code> element are
new in Ant 1.6.<br/> Notes on <code>entry</code> attributes:</p>
<p>The <var>cvsroot</var> and <var>package</var> attributes of the <code>&lt;tagdiff&gt;</code> element are
added <em>since Ant 1.6</em>.</p>

<p>Description of <code>&lt;entry&gt;</code> attributes:</p>
<table>
<tr>
<th>Attribute</th>
<th>Comment</th>
</tr>
<tr>
<td>name</td>
<td><var>name</var></td>
<td>when reporting on one package, the package name is removed from the output</td>
</tr>
<tr>
<td>revision</td>
<td><var>revision</var></td>
<td>supplied for files which exist at the end of the reporting period</td>
</tr>
<tr>
<td>prevrevision</td>
<td><var>prevrevision</var></td>
<td>supplied for files which exist at the beginning of the reporting period.<br/>Old CVS servers
do not supply it for deleted files. CVS 1.12.2 supplies it.</td>
</tr>
</table>

<p>Example:</p>
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;tagdiff startTag=&quot;ANT_14&quot; endTag=&quot;ANT_141&quot;


+ 3
- 2
manual/Tasks/cvsversion.html View File

@@ -89,13 +89,14 @@
</tr>
</table>
<h3>Examples</h3>

<p>Find out the CVS client and server versions and store the versions in the properties
called <code>apachecvsversion</code> and <code>localcvsversion</code></p>
<pre>
&lt;cvsversion cvsRoot=&quot;:pserver:anoncvs@cvs.apache.org:/home/cvspublic&quot;
passfile=&quot;/home/myself/.cvspass&quot;
serverversionproperty=&quot;apachecvsversion&quot;
clientversionproperty=&quot;localcvsversion&quot;/&gt;</pre>
<p>finds out the CVS client and server versions and stores the versions in the properties
called <code>apachecvsversion</code> and <code>localcvsversion</code></p>

</body>
</html>

+ 13
- 12
manual/Tasks/delete.html View File

@@ -153,45 +153,46 @@ nested <code>&lt;fileset&gt;</code>.</p>
</table>

<h3>Examples</h3>

<p>Delete the file <samp>/lib/ant.jar</samp>.</p>
<pre>&lt;delete file=&quot;/lib/ant.jar&quot;/&gt;</pre>
<p>deletes the file <samp>/lib/ant.jar</samp>.</p>

<pre>&lt;delete dir=&quot;lib&quot;/&gt;</pre>
<p>deletes the <samp>lib</samp> directory, including all files and subdirectories
<p>Delete the <samp>lib</samp> directory, including all files and subdirectories
of <samp>lib</samp>.</p>
<pre>&lt;delete dir=&quot;lib&quot;/&gt;</pre>

<p>Delete all files with the extension <samp>.bak</samp> from the current directory and any
subdirectories.</p>
<pre>
&lt;delete&gt;
&lt;fileset dir=&quot;.&quot; includes=&quot;**/*.bak&quot;/&gt;
&lt;/delete&gt;
</pre>
<p>deletes all files with the extension <samp>.bak</samp> from the current directory and any
subdirectories.</p>

<p>Delete all files and subdirectories of <samp>build</samp>, including <samp>build</samp>
itself.</p>
<pre>
&lt;delete includeEmptyDirs=&quot;true&quot;&gt;
&lt;fileset dir=&quot;build&quot;/&gt;
&lt;/delete&gt;
</pre>
<p>deletes all files and subdirectories of <samp>build</samp>, including <samp>build</samp>
itself.</p>

<p>Delete all files and subdirectories of <samp>build</samp>, without <samp>build</samp> itself.</p>
<pre>
&lt;delete includeemptydirs=&quot;true&quot;&gt;
&lt;fileset dir=&quot;build&quot; includes=&quot;**/*&quot;/&gt;
&lt;/delete&gt;
</pre>
<p>deletes all files and subdirectories of <samp>build</samp>, without <samp>build</samp>
itself.</p>

<p>Delete the Subversion metadata directories under <samp>src</samp>. Because <samp>.svn</samp> is
on of the <a href="../dirtasks.html#defaultexcludes">default excludes</a> you have to use
the <var>defaultexcludes</var> flag, otherwise Ant won't delete these directories and the files in
it.</p>
<pre>
&lt;delete includeemptydirs=&quot;true&quot;&gt;
&lt;fileset dir=&quot;src&quot; includes=&quot;**/.svn/&quot; defaultexcludes=&quot;false&quot;/&gt;
&lt;/delete&gt;
</pre>
<p>deletes the subversion metadata directories under <samp>src</samp>. Because <samp>.svn</samp> is
on of the <a href="../dirtasks.html#defaultexcludes">default excludes</a> you have to use the
<var>defaultexcludes</var> flag, otherwise Ant won't delete these directories and the files in it.</p>

</body>
</html>

+ 4
- 2
manual/Tasks/deltree.html View File

@@ -43,10 +43,12 @@
</tr>
</table>
<h3>Examples</h3>

<p>Delete the directory <samp>dist</samp>, including its files and subdirectories.</p>
<pre>&lt;deltree dir=&quot;dist&quot;/&gt;</pre>
<p>deletes the directory <samp>dist</samp>, including its files and subdirectories.</p>

<p>Delete the directory <samp>${dist}</samp>, including its files and subdirectories.</p>
<pre>&lt;deltree dir=&quot;${dist}&quot;/&gt;</pre>
<p>deletes the directory <samp>${dist}</samp>, including its files and subdirectories.</p>

</body>
</html>

+ 8
- 10
manual/Tasks/depend.html View File

@@ -83,7 +83,6 @@ relationship complexity and how many class files are out of date. The decision a
cheaper to just recompile all classes or to use the <code>depend</code> task will depend on the size
of your project and how interrelated your classes are.</p>


<h3>Limitations</h3>

<p>There are some source dependencies which <code>depend</code> will not detect.</p>
@@ -170,18 +169,20 @@ as well as the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
and <code>&lt;patternset&gt;</code> elements.</p>

<h3>Examples</h3>
<pre>
&lt;depend srcdir=&quot;${java.dir}&quot;
destdir=&quot;${build.classes}&quot;
cache=&quot;depcache&quot;
closure=&quot;yes&quot;/&gt;</pre>

<p>removes any classes in the <samp>${build.classes}</samp> directory that depend on out-of-date
<p>Remove any classes in the <samp>${build.classes}</samp> directory that depend on out-of-date
classes. Classes are considered out-of-date with respect to the source in
the <samp>${java.dir}</samp> directory, using the same mechanism as the <code>&lt;javac&gt;</code>
task. In this example, the <code>&lt;depend&gt;</code> task caches its dependency information in
the <samp>depcache</samp> directory.</p>
<pre>
&lt;depend srcdir=&quot;${java.dir}&quot;
destdir=&quot;${build.classes}&quot;
cache=&quot;depcache&quot;
closure=&quot;yes&quot;/&gt;</pre>

<p>Do the same as the previous example, but explicitly include all <samp>.java</samp> files, except
those that match the list given in <samp>${java.dir}/build_excludes</samp>.</p>
<pre>
&lt;depend srcdir=&quot;${java.dir}&quot; destdir=&quot;${build.classes}&quot;
cache=&quot;depcache&quot; closure=&quot;yes&quot;&gt;
@@ -189,8 +190,5 @@ the <samp>depcache</samp> directory.</p>
&lt;excludesfile name=&quot;${java.dir}/build_excludes&quot;/&gt;
&lt;/depend&gt;</pre>

<p>does the same as the previous example, but explicitly includes all <samp>.java</samp> files,
except those that match the list given in <samp>${java.dir}/build_excludes</samp>.</p>

</body>
</html>

+ 11
- 11
manual/Tasks/dependset.html View File

@@ -110,6 +110,15 @@ and <code>&lt;sourcefilelist&gt;</code> filelists, and if any are older, they ar
Multiple <code>&lt;targetfilelist&gt;</code> filelists may be specified.</p>

<h3>Examples</h3>

<p>Remove derived HTML files in the ${output.dir} directory if they are out-of-date with respect
to:</p>
<ol>
<li>the DTD of their source XML files</li>
<li>a common DTD (imported by the main DTD)</li>
<li>a subordinate XSLT stylesheet (imported by the main stylesheet), or</li>
<li>the buildfile</li>
</ol>
<pre>
&lt;dependset&gt;
&lt;srcfilelist
@@ -126,17 +135,8 @@ Multiple <code>&lt;targetfilelist&gt;</code> filelists may be specified.</p>
includes = &quot;**/*.html&quot;/&gt;
&lt;/dependset&gt;</pre>

<p>In this example derived HTML files in the ${output.dir} directory will be removed if any are
out-of-date with respect to:</p>
<ol>
<li>the DTD of their source XML files</li>
<li>a common DTD (imported by the main DTD)</li>
<li>a subordinate XSLT stylesheet (imported by the main stylesheet), or</li>
<li>the buildfile</li>
</ol>

<p>If any of the sources in the above example does not exist, all target files will also be removed.
To ignore missing sources instead, use filesets instead of filelists for the sources.</p>
<p>If any of the sources in the above example does not exist, all target files will also be
removed. To ignore missing sources instead, use filesets instead of filelists for the sources.</p>

</body>
</html>

+ 1
- 1
manual/Tasks/diagnostics.html View File

@@ -32,11 +32,11 @@ Ant's configuration under an IDE.</p>

<h3>Examples</h3>

<p>Print out the current diagnostics dump.</p>
<pre>
&lt;target name="diagnostics" description="diagnostics"&gt;
&lt;diagnostics/&gt;
&lt;/target&gt;</pre>
<p>Prints out the current diagnostics dump.</p>

</body>
</html>

+ 3
- 2
manual/Tasks/dirname.html View File

@@ -54,11 +54,12 @@ full directory path of the specified file.</p>
</table>

<h3>Examples</h3>

<p>Set <code>antfile.dir</code> to the directory path for <samp>${ant.file}</samp>.</p>
<pre>&lt;dirname property=&quot;antfile.dir&quot; file=&quot;${ant.file}&quot;/&gt;</pre>
<p>will set <code>antfile.dir</code> to the directory path for <samp>${ant.file}</samp>.</p>

<p>Set <code>foo.dirname</code> to the project's <var>basedir</var>.</p>
<pre>&lt;dirname property=&quot;foo.dirname&quot; file=&quot;foo.txt&quot;/&gt;</pre>
<p>will set <code>foo.dirname</code> to the project's <var>basedir</var>.</p>

</body>
</html>

+ 1
- 1
manual/Tasks/ear.html View File

@@ -257,7 +257,7 @@ named <samp>MANIFEST.MF</samp>, the file is ignored and you will get a warning.<
<h4>manifest, indexjars, service</h4>
<p>These are inherited from <a href="jar.html">&lt;jar&gt;</a></p>

<h2>Example</h2>
<h3>Example</h3>
<pre>
&lt;ear destfile=&quot;${build.dir}/myapp.ear&quot; appxml=&quot;${src.dir}/metadata/application.xml&quot;&gt;
&lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;*.jar,*.war&quot;/&gt;


+ 12
- 8
manual/Tasks/echo.html View File

@@ -84,34 +84,38 @@ file is available, and the <var>level</var> option is ignored</p>
</table>

<h3>Examples</h3>

<p>Basic use:</p>
<pre>&lt;echo message=&quot;Hello, world&quot;/&gt;</pre>
<pre>&lt;echo message=&quot;Embed a line break:${line.separator}&quot;/&gt;</pre>
<pre>&lt;echo&gt;Embed another:${line.separator}&lt;/echo&gt;</pre>
<pre>&lt;echo&gt;This is a longer message stretching over
two lines.
&lt;/echo&gt;</pre>

<p>The newline immediately following the <code>&lt;echo&gt;</code> tag is part of the
output. Newlines in character data within the content of an element are not discarded by XML
parsers.<br/>See <a href="https://www.w3.org/TR/xml/#sec-line-ends" target="_top">W3C Recommendation
26 November 2008 / End of Line handling</a> for more details.</p>
<pre>&lt;echo&gt;
This is a longer message stretching over
three lines; the first line is a blank
&lt;/echo&gt;</pre>
<p>The newline immediately following the <code>&lt;echo&gt;</code> tag will be part of the
output. Newlines in character data within the content of an element are not discarded by XML
parsers.<br/>See <a href="https://www.w3.org/TR/xml/#sec-line-ends" target="_top">W3C Recommendation
26 November 2008 / End of Line handling</a> for more details.</p>

<pre>&lt;echo message=&quot;Deleting drive C:&quot; level=&quot;debug&quot;/&gt;</pre>
<p>A message which only appears in <kbd>-debug</kbd> mode.</p>
<pre>&lt;echo message=&quot;Deleting drive C:&quot; level=&quot;debug&quot;/&gt;</pre>

<p>A message which appears even in <kbd>-quiet</kbd> mode.</p>
<pre>&lt;echo level=&quot;error&quot;&gt;
Imminent failure in the antimatter containment facility.
Please withdraw to safe location at least 50km away.
&lt;/echo&gt;</pre>
<p>A message which appears even in <kbd>-quiet</kbd> mode.</p>

<p>Generate a shell script by echoing to a file. Note the use of a double <q>$</q> symbol to stop
Ant filtering out the single <q>$</q> during variable expansion.</p>
<pre>&lt;echo file="runner.csh" append="false"&gt;#\!/bin/tcsh
java-1.3.1 -mx1024m ${project.entrypoint} $$*
&lt;/echo&gt;</pre>
<p>Generate a shell script by echoing to a file. Note the use of a double <q>$</q> symbol to stop
Ant filtering out the single <q>$</q> during variable expansion.</p>

<p>Depending on the log level Ant runs at, messages are print out or silently ignored:</p>
<table>


+ 16
- 10
manual/Tasks/echoproperties.html View File

@@ -86,27 +86,33 @@ more control on which properties will be picked up. The attributes <var>prefix</
and <var>regex</var> are just shortcuts that use <code>propertyset</code>s internally.</p>

<h3>Examples</h3>
<pre>&lt;echoproperties/&gt;</pre>
<p>Report the current properties to the log.</p>
<pre>&lt;echoproperties/&gt;</pre>

<p>Report the current properties to the file <samp>my.properties</samp>, and fail the build if the
file could not be created or written to.</p>
<pre>&lt;echoproperties destfile="my.properties"/&gt;</pre>
<p>Report the current properties to the file <samp>my.properties</samp>, and will fail the build if
the file could not be created or written to.</p>

<p>Report the current properties to the file <samp>my.properties</samp>, and log a message if the
file could not be created or written to, but still allow the build to continue.</p>
<pre>&lt;echoproperties destfile="my.properties" failonerror="false"/&gt;</pre>
<p>Report the current properties to the file <samp>my.properties</samp>, and will log a message if
the file could not be created or written to, but will still allow the build to continue.</p>
<pre>&lt;echoproperties prefix="java."/&gt;</pre>

<p>List all properties beginning with <samp>java.</samp></p>
<pre>&lt;echoproperties prefix="java."/&gt;</pre>

<p>Lists all properties beginning with <samp>java.</samp> using a
nested <code>&lt;propertyset/&gt;</code> which is an equivalent but longer way.</p>
<pre>
&lt;echoproperties&gt;
&lt;propertyset&gt;
&lt;propertyref prefix="java."/&gt;
&lt;/propertyset&gt;
&lt;/echoproperties&gt;</pre>
<p>This again lists all properties beginning with <samp>java.</samp> using a
nested <code>&lt;propertyset/&gt;</code> which is an equivalent but longer way.</p>
<p>Lists all properties that contain <samp>ant</samp> in their names.</p>
<pre>&lt;echoproperties regex=".*ant.*"/&gt;</pre>
<p>Lists all properties that contain <samp>ant</samp> in their names. The equivalent snippet
with <code>&lt;propertyset/&gt;</code> is:</p>
<p>The equivalent snippet with <code>&lt;propertyset/&gt;</code> is:</p>
<pre>
&lt;echoproperties&gt;
&lt;propertyset&gt;


+ 2
- 1
manual/Tasks/echoxml.html View File

@@ -57,6 +57,8 @@
<p>Nested XML content is required.</p>

<h3>Examples</h3>

<p>Create an Ant buildfile, <samp>subbuild.xml</samp>.</p>
<pre>&lt;echoxml file=&quot;subbuild.xml&quot;&gt;
&lt;project default=&quot;foo&quot;&gt;
&lt;target name=&quot;foo&quot;&gt;
@@ -64,7 +66,6 @@
&lt;/target&gt;
&lt;/project&gt;
&lt;/echoxml&gt;</pre>
<p>Creates an Ant buildfile, <samp>subbuild.xml</samp>.</p>

</body>
</html>

+ 10
- 10
manual/Tasks/exec.html View File

@@ -330,21 +330,24 @@ means it is not on the path. Any time you see such an error from any Ant task, i
Ant bug, but some configuration problem on your machine.</p>

<h3>Examples</h3>

<p>Start <kbd>emacs</kbd> on display 1 of the X Window System.</p>
<pre>
&lt;exec executable=&quot;emacs&quot;&gt;
&lt;env key=&quot;DISPLAY&quot; value=&quot;:1.0&quot;/&gt;
&lt;/exec&gt;
</pre>
<p>starts <code>emacs</code> on display 1 of the X Window System.</p>

<p>Add <samp>${basedir}/bin</samp> to the <code>PATH</code> of the system command.</p>
<pre>
&lt;property environment=&quot;env&quot;/&gt;
&lt;exec ... &gt;
&lt;env key=&quot;PATH&quot; path=&quot;${env.PATH}:${basedir}/bin&quot;/&gt;
&lt;/exec&gt;
</pre>
<p>adds <samp>${basedir}/bin</samp> to the <code>PATH</code> of the system command.</p>

<p>Start the <samp>${browser}</samp> with the specified <samp>${file}</samp> and end the Ant
process. The browser will remain.</p>
<pre>
&lt;property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/&gt;
&lt;property name="file" location="ant/docs/manual/index.html"/&gt;
@@ -353,9 +356,12 @@ Ant bug, but some configuration problem on your machine.</p>
&lt;arg value="${file}"/&gt;
&lt;/exec&gt;
</pre>
<p>Starts the <samp>${browser}</samp> with the specified <samp>${file}</samp> and end the Ant
process. The browser will remain.</p>

<p>Send the string <q>blah before blah</q> to the <kbd>cat</kbd> executable, using
an <a href="../Types/filterchain.html">&lt;inputfilterchain&gt;</a> to replace <q>before</q>
with <q>after</q> on the way in. Output is sent to the file <samp>redirector.out</samp> and stored
in a property of the same name. Similarly, error output is sent to a file and a property, both
named <samp>redirector.err</samp>.</p>
<pre>
&lt;exec executable=&quot;cat&quot;&gt;
&lt;redirector outputproperty=&quot;redirector.out&quot;
@@ -370,12 +376,6 @@ process. The browser will remain.</p>
&lt;/exec&gt;
</pre>

<p>Sends the string <q>blah before blah</q> to the <kbd>cat</kbd> executable, using
an <a href="../Types/filterchain.html">&lt;inputfilterchain&gt;</a> to replace <q>before</q>
with <q>after</q> on the way in. Output is sent to the file <samp>redirector.out</samp> and stored
in a property of the same name. Similarly, error output is sent to a file and a property, both
named <samp>redirector.err</samp>.</p>

<p><strong>Note</strong>: do not try to specify arguments using a simple <code>arg</code>-element
and separate them by spaces. This results in only a single argument containing the entire
string.</p>


+ 10
- 11
manual/Tasks/fail.html View File

@@ -73,34 +73,34 @@ see <a href="conditions.html">here</a>.<br/><em>Since Ant 1.6.2</em>

<h3>Examples</h3>

<p>Exit the current build with no further information given.</p>
<pre>&lt;fail/&gt;</pre>
<p>will exit the current build with no further information given.</p>
<pre class="output">
BUILD FAILED

build.xml:4: No message</pre>

<p>Exit the current build and print a message to wherever your output goes:</p>
<pre>&lt;fail message=&quot;Something wrong here.&quot;/&gt;</pre>
<p>will exit the current build and print something like the following to wherever your output
goes:</p>

<pre class="output">
BUILD FAILED

build.xml:4: Something wrong here.</pre>

<p>A different way to achieve the same result as above.</p>
<pre>&lt;fail&gt;Something wrong here.&lt;/fail&gt;</pre>
<p>will give the same result as above.</p>

<p>Exit the current build and print an explanation to wherever your output goes:</p>
<pre>&lt;fail unless=&quot;thisdoesnotexist&quot;/&gt;</pre>
<p>will exit the current build and print something like the following to wherever your output
goes:</p>

<pre class="output">
BUILD FAILED

build.xml:2: unless=thisdoesnotexist</pre>

Using a condition to achieve the same effect:

<p>Use a condition to achieve the same effect:</p>
<pre>
&lt;fail&gt;
&lt;condition&gt;
@@ -110,12 +110,13 @@ Using a condition to achieve the same effect:
&lt;/condition&gt;
&lt;/fail&gt;</pre>

<p>Output:</p>
<pre class="output">
BUILD FAILED

build.xml:2: condition satisfied</pre>

<p>Check that both files <samp>one.txt</samp> and <samp>two.txt</samp> are present otherwise the
build will fail.</p>
<pre>
&lt;fail message=&quot;Files are missing.&quot;&gt;
&lt;condition&gt;
@@ -126,8 +127,6 @@ build.xml:2: condition satisfied</pre>
&lt;/not&gt;
&lt;/condition&gt;
&lt;/fail&gt;</pre>
<p>Will check that both files <samp>one.txt</samp> and <samp>two.txt</samp> are present otherwise
the build will fail.</p>

</body>
</html>

+ 7
- 5
manual/Tasks/filter.html View File

@@ -57,17 +57,19 @@ incorrect tokens are ignored.</p>
</tr>
</table>
<h3>Examples</h3>

<p>Copy recursively all the files from the <samp>src.dir</samp> directory into
the <samp>dest.dir</samp> directory replacing all the occurrences of the string <code>@year@</code>
with <q>2000</q>.</p>
<pre>
&lt;filter token=&quot;year&quot; value=&quot;2000&quot;/&gt;
&lt;copy todir=&quot;${dest.dir}&quot; filtering=&quot;true&quot;&gt;
&lt;fileset dir=&quot;${src.dir}&quot;/&gt;
&lt;/copy&gt;</pre>
<p>will copy recursively all the files from the <samp>src.dir</samp> directory into
the <samp>dest.dir</samp> directory replacing all the occurrences of the string <code>@year@</code>
with <q>2000</q>.</p>
<pre>&lt;filter filtersfile=&quot;deploy_env.properties&quot;/&gt;</pre>
<p>will read all property entries from the <samp>deploy_env.properties</samp> file and set these as

<p>Read all property entries from the <samp>deploy_env.properties</samp> file and set these as
filters.</p>
<pre>&lt;filter filtersfile=&quot;deploy_env.properties&quot;/&gt;</pre>

</body>
</html>

+ 20
- 16
manual/Tasks/fixcrlf.html View File

@@ -208,38 +208,42 @@
</tr>
</table>
<h3>Examples</h3>
<p>Replace EOLs with LF characters and remove EOF characters from the shell scripts. Tabs and spaces
are left as is.</p>
<pre>
&lt;fixcrlf srcdir=&quot;${src}&quot; includes=&quot;**/*.sh&quot;
eol=&quot;lf&quot; eof=&quot;remove&quot;/&gt;</pre>
<p>Replaces EOLs with LF characters and removes eof characters from the shell scripts. Tabs and
spaces are left as is.</p>

<p>Replace all EOLs with cr-lf pairs in the batch files. Tabs and spaces are left as is. EOF
characters are left alone if run on DOS systems, and are removed if run on Unix systems.</p>
<pre>
&lt;fixcrlf srcdir=&quot;${src}&quot;
includes=&quot;**/*.bat&quot; eol=&quot;crlf&quot;/&gt;</pre>
<p>Replaces all EOLs with cr-lf pairs in the batch files. Tabs and spaces are left as is. EOF
characters are left alone if run on DOS systems, and are removed if run on Unix systems.</p>

<p>Set EOLs according to local OS conventions, and convert sequences of spaces and tabs into the
minimal set of spaces and tabs which will preserve spacing within the line. Tabs are set at 8
character intervals. EOF characters are left alone if run on DOS systems, and are removed if run on
Unix systems. Many versions of make require tabs prior to commands.</p>
<pre>
&lt;fixcrlf srcdir=&quot;${src}&quot;
includes=&quot;**/Makefile&quot; tab=&quot;add&quot;/&gt;</pre>
<p>Sets EOLs according to local OS conventions, and converts sequences of spaces and tabs to the
minimal set of spaces and tabs which will maintain spacing within the line. Tabs are set at 8
character intervals. EOF characters are left alone if run on DOS systems, and are removed if run on
Unix systems. Many versions of make require tabs prior to commands.</p>

<p>Convert all EOLs in the included Java source files to a single LF. Replace all tab characters
except those in string or character constants with spaces, assuming a tab width of 3. If run on a
Unix system, any CTRL-Z EOF characters at the end of the file are removed. On DOS/Windows, any such
EOF characters will be left untouched.
</p>
<pre>
&lt;fixcrlf srcdir=&quot;${src}&quot; includes=&quot;**/*.java&quot;
tab=&quot;remove&quot; tablength=&quot;3&quot;
eol=&quot;lf&quot; javafiles=&quot;yes&quot;/&gt;</pre>
<p>Converts all EOLs in the included Java source files to a single LF. Replace all TAB characters
except those in string or character constants with spaces, assuming a tab width of 3. If run on a
Unix system, any CTRL-Z EOF characters at the end of the file are removed. On DOS/Windows, any such
EOF characters will be left untouched.
</p>

<p>Set EOLs according to local OS conventions, and convert all tabs to spaces, assuming a tab width
of 8. EOF characters are left alone if run on DOS systems, and are removed if run on Unix
systems. You never know what editor a user will use to browse READMEs.</p>
<pre>
&lt;fixcrlf srcdir=&quot;${src}&quot;
includes=&quot;**/README*&quot; tab=&quot;remove&quot;/&gt;</pre>
<p>Sets EOLs according to local OS conventions, and converts all tabs to spaces, assuming a tab
width of 8. EOF characters are left alone if run on DOS systems, and are removed if run on Unix
systems. You never know what editor a user will use to browse READMEs.</p>

</body>
</html>

+ 64
- 54
manual/Tasks/ftp.html View File

@@ -394,15 +394,19 @@ to <q>false</q>.</em> On remote filesets hidden files are not checked for being
Hidden files are currently assumed to not be symbolic links.</p>

<h3>Sending files</h3>
<p>The easiest way to describe how to send files is with a couple of examples:</p>
<p>The easiest way to describe how to send files is with a couple of examples.</p>
<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and upload all files in
the <samp>htdocs/manual</samp> directory to the default directory for that user.</p>
<pre>
&lt;ftp server="ftp.apache.org"
userid="anonymous"
password="me@myorg.com"&gt;
&lt;fileset dir="htdocs/manual"/&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and uploads all files in
the <samp>htdocs/manual</samp> directory to the default directory for that user.</p>

<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and upload all new or changed
files in the <samp>htdocs/manual</samp> directory to the <samp>incoming</samp> directory relative to
the default directory for <samp>anonymous</samp>.</p>
<pre>
&lt;ftp server="ftp.apache.org"
remotedir="incoming"
@@ -411,9 +415,12 @@ the <samp>htdocs/manual</samp> directory to the default directory for that user.
depends="yes"&gt;
&lt;fileset dir="htdocs/manual"/&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and uploads all new or changed
files in the <samp>htdocs/manual</samp> directory to the <samp>incoming</samp> directory relative to
the default directory for <samp>anonymous</samp>.</p>

<p>Log in to <samp>ftp.apache.org</samp> at port <samp>2121</samp> as <samp>coder</samp> with
password <samp>java1</samp> and upload all new or changed HTML files in
the <samp>htdocs/manual</samp> directory to the <samp>/pub/incoming</samp> directory. The files are
transferred in text mode. Passive mode has been switched on to send files from behind a
firewall.</p>
<pre>
&lt;ftp server="ftp.apache.org"
port="2121"
@@ -427,11 +434,11 @@ the default directory for <samp>anonymous</samp>.</p>
&lt;include name="**/*.html"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to <samp>ftp.apache.org</samp> at port <samp>2121</samp> as <samp>coder</samp> with
password <samp>java1</samp> and uploads all new or changed HTML files in
the <samp>htdocs/manual</samp> directory to the <samp>/pub/incoming</samp> directory. The files are
transferred in text mode. Passive mode has been switched on to send files from behind a
firewall.</p>
<p>Log in to a Windows server at <samp>ftp.hypothetical.india.org</samp> at port <samp>2121</samp>
as <samp>coder</samp> with password <samp>java1</samp> and upload all new or changed (accounting for
timezone differences) HTML files in the <samp>htdocs/manual</samp> directory to
the <samp>/pub/incoming</samp> directory. The files are transferred in text mode.</p>
<pre>
&lt;ftp server="ftp.hypothetical.india.org"
port="2121"
@@ -446,10 +453,10 @@ firewall.</p>
&lt;include name="**/*.html"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to a Windows server at <samp>ftp.hypothetical.india.org</samp> at port <samp>2121</samp>
as <samp>coder</samp> with password <samp>java1</samp> and uploads all new or changed (accounting
for timezone differences) HTML files in the <samp>htdocs/manual</samp> directory to
the <samp>/pub/incoming</samp> directory. The files are transferred in text mode.</p>
<p>Log in to the Windows-based <samp>ftp.nt.org</samp> as <samp>coder</samp> with
password <samp>java1</samp> and upload all HTML files in the <samp>htdocs/manual</samp> directory to
the <samp>c:\uploads</samp> directory. Progress messages are displayed as each file is uploaded.</p>
<pre>
&lt;ftp server="ftp.nt.org"
remotedir="c:\uploads"
@@ -461,15 +468,16 @@ the <samp>/pub/incoming</samp> directory. The files are transferred in text mode
&lt;include name="**/*.html"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to the Windows-based <samp>ftp.nt.org</samp> as <samp>coder</samp> with
password <samp>java1</samp> and uploads all HTML files in the <samp>htdocs/manual</samp> directory
to the <samp>c:\uploads</samp> directory. Progress messages are displayed as each file is
uploaded.</p>

<h3>Getting files</h3>
<p>Getting files from an FTP server works pretty much the same way as sending them does. The only
<p>Getting files from an FTP server works pretty much the same way as sending them does. The only
difference is that the nested filesets use the <var>remotedir</var> attribute as the base directory
for the files on the FTP server, and the <var>dir</var> attribute as the local directory to put the
files into. The file structure from the FTP site is preserved on the local machine.</p>
files into. The file structure from the FTP site is preserved on the local machine.</p>

<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and recursively download
all <samp>.html</samp> files from default directory for that user into
the <samp>htdocs/manual</samp> directory on the local machine.</p>
<pre>
&lt;ftp action="get"
server="ftp.apache.org"
@@ -479,9 +487,12 @@ files into. The file structure from the FTP site is preserved on the local mach
&lt;include name="**/*.html"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and recursively downloads
all <samp>.html</samp> files from default directory for that user into
the <samp>htdocs/manual</samp> directory on the local machine.</p>

<p>If <samp>apache.org</samp> ever switches to a Unix FTP server that uses the new all-numeric
format for timestamps, this version would become necessary. It would accomplish the same
functionality as the previous example but would successfully handle the numeric
timestamps. The <var>systemTypeKey</var> is not necessary here but helps clarify what is going
on.</p>
<pre>
&lt;ftp action="get"
server="ftp.apache.org"
@@ -493,10 +504,11 @@ the <samp>htdocs/manual</samp> directory on the local machine.</p>
&lt;include name="**/*.html"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>If <samp>apache.org</samp> ever switches to a Unix FTP server that uses the new all-numeric
format for timestamps, this version would become necessary. It would accomplish the same
functionality as the previous example but would successfully handle the numeric timestamps.
The <var>systemTypeKey</var> is not necessary here but helps clarify what is going on.</p>

<p>Log into a UNIX FTP server at <samp>ftp.hypothetical.fr</samp> which displays dates with French
names in Standard European format, as <samp>anonymous</samp>, and recursively download
all <samp>.html</samp> files from default directory for that user into
the <samp>htdocs/manual</samp> directory on the local machine.</p>
<pre>
&lt;ftp action="get"
server="ftp.hypthetical.fr"
@@ -509,16 +521,15 @@ The <var>systemTypeKey</var> is not necessary here but helps clarify what is goi
&lt;include name="**/*.html"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs into a UNIX FTP server at <samp>ftp.hypothetical.fr</samp> which displays dates with French
names in Standard European format, as <samp>anonymous</samp>, and recursively downloads
all <samp>.html</samp> files from default directory for that user into
the <samp>htdocs/manual</samp> directory on the local machine.</p>

<h3>Deleting files</h3>
<p>As you've probably guessed by now, you use nested fileset elements to select the files to delete
from the remote FTP server. Again, the filesets are relative to the remote directory, not a local
directory. In fact, the <var>dir</var> attribute of the fileset is ignored completely.</p>

<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and try to delete
all <samp>*.tmp</samp> files from the default directory for that user. If you don't have permission
to delete a file, a <code>BuildException</code> is thrown.</p>
<pre>
&lt;ftp action="del"
server="ftp.apache.org"
@@ -528,10 +539,11 @@ directory. In fact, the <var>dir</var> attribute of the fileset is ignored comp
&lt;include name="**/*.tmp"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and tries to delete
all <samp>*.tmp</samp> files from the default directory for that user. If you don't have permission
to delete a file, a <code>BuildException</code> is thrown.</p>

<h3>Listing Files</h3>
<p>Get a file listing in <samp>data/ftp.listing</samp> of all the files on the FTP server relative
to the default directory of the <samp>anonymous</samp> user. The listing is in whatever format the
FTP server normally lists files.</p>
<pre>
&lt;ftp action="list"
server="ftp.apache.org"
@@ -542,30 +554,34 @@ to delete a file, a <code>BuildException</code> is thrown.</p>
&lt;include name="**"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>This provides a file listing in <samp>data/ftp.listing</samp> of all the files on the FTP server
relative to the default directory of the <samp>anonymous</samp> user. The listing is in whatever
format the FTP server normally lists files.</p>

<h3>Creating directories</h3>
<p>Note that with the <q>mkdir</q> action, the directory to create is specified using
the <var>remotedir</var> attribute.</p>
<p>Create the directory <samp>some/remote/dir</samp> beneath the default root directory. As with all
other actions, the directory separator character must be correct according to the desires of the FTP
server.</p>
<pre>
&lt;ftp action="mkdir"
server="ftp.apache.org"
userid="anonymous"
password="me@myorg.com"
remotedir="some/remote/dir"/&gt;</pre>
<p>This creates the directory <samp>some/remote/dir</samp> beneath the default root directory. As
with all other actions, the directory separator character must be correct according to the desires
of the FTP server.</p>

<h3>Removing directories</h3>
<p>This action uses nested fileset elements to select the directories to remove from the remote FTP
server. The filesets are relative to the remote directory, not a local directory.
The <var>dir</var> attribute of the fileset is ignored completely. The directories to be removed
must be empty, or contain only other directories that have been also selected to be removed by the
filesets patterns, otherwise a <code>BuildException</code> will be thrown. Also, if you don't have
permission to remove a directory, a <code>BuildException</code> is thrown.</p>
server. The filesets are relative to the remote directory, not a local directory. The <var>dir</var>
attribute of the fileset is ignored completely. The directories to be removed must be empty, or
contain only other directories that have been also selected to be removed by the filesets patterns,
otherwise a <code>BuildException</code> will be thrown. Also, if you don't have permission to remove
a directory, a <code>BuildException</code> is thrown.</p>

<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and try to
remove <samp>/somedir/dira</samp> directory and all the directory tree starting at, and
including, <samp>/somedir/dirb</samp>. When removing the <samp>/somedir/dirb</samp> tree, the task
starts at the leaves moving up to the root, so that when it tries to remove a directory it is sure
all the directories under it are already removed. Obviously all the files in the tree must have
been already deleted.</p>
<pre>
&lt;ftp action="rmdir"
server="ftp.apache.org"
@@ -577,14 +593,8 @@ permission to remove a directory, a <code>BuildException</code> is thrown.</p>
&lt;include name="dirb/**"/&gt;
&lt;/fileset&gt;
&lt;/ftp&gt;</pre>
<p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and tries to
remove <samp>/somedir/dira</samp> directory and all the directories tree starting at, and
including, <samp>/somedir/dirb</samp>. When removing the <samp>/somedir/dirb</samp> tree, it will
start at the leaves moving up to the root, so that when it tries to remove a directory it is sure
all the directories under it are already removed. Obviously all the files in the tree must have
been already deleted.</p>
<p>As an example suppose you want to delete everything contained into <samp>/somedir</samp>, so
invoke first the <code>&lt;ftp&gt;</code> task with <var>action</var>=<q>delete</q>, then
<p>As an example suppose you want to delete everything contained in <samp>/somedir</samp>, so invoke
first the <code>&lt;ftp&gt;</code> task with <var>action</var>=<q>delete</q>, then
with <var>action</var>=<q>rmdir</q> specifying in both cases <var>remotedir</var>=<q>/somedir</q>
and</p>
<pre>


+ 1
- 2
manual/Tasks/genkey.html View File

@@ -97,9 +97,8 @@ sub-element and populating it with <code>&lt;param&gt;</code> elements that have
and a <var>value</var>. When using the subelement, it is automatically encoded properly and commas
(<q>,</q>) are replaced with <q>\,</q>.</p>

<p>The following two examples are identical:</p>

<h3>Examples</h3>
<p>The following two examples are identical:</p>
<pre>
&lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot;
dname=&quot;CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US&quot;/&gt;</pre>


+ 11
- 10
manual/Tasks/get.html View File

@@ -174,27 +174,28 @@ nested <code>&lt;header/&gt;</code> node are as follows:</p>
</table>

<h3>Examples</h3>
<pre>&lt;get src=&quot;http://ant.apache.org/&quot; dest=&quot;help/index.html&quot;/&gt;</pre>
<p>Gets the index page of <samp>http://ant.apache.org/</samp>, and stores it in the
<p>Get the index page of <samp>http://ant.apache.org/</samp>, and store it in the
file <samp>help/index.html</samp>.</p>
<pre>&lt;get src=&quot;http://ant.apache.org/&quot; dest=&quot;help/index.html&quot;/&gt;</pre>

<p>Get the PGP keys of Ant's (current and past) release managers, if the local copy is missing or
out of date. Use the <var>verbose</var> option for progress information.</p>
<pre>
&lt;get src=&quot;http://www.apache.org/dist/ant/KEYS&quot;
dest=&quot;KEYS&quot;
verbose=&quot;true&quot;
usetimestamp=&quot;true&quot;/&gt;</pre>
<p>Gets the PGP keys of Ant's (current and past) release managers, if the local copy is missing or
out of date. Uses the verbose option for progress information.</p>

<p>Fetch some file from a server with access control. Because HTTPS is being used, the fact that
basic auth sends passwords in plaintext is moot if you ignore the fact that it is part of your build
file which may be readable by third parties. If you need more security, consider using
the <a href="input.html">input</a> task to query for a password.</p>
<pre>
&lt;get src=&quot;https://insecure-bank.org/statement/user=1214&quot;
dest=&quot;statement.html&quot;
username=&quot;1214&quot;
password=&quot;secret&quot;/&gt;</pre>
<p>Fetches some file from a server with access control. Because https is being used the fact that
basic auth sends passwords in plaintext is moot if you ignore the fact that it is part of your build
file which may be readable by third parties. If you need more security, consider using
the <a href="input.html">input task</a> to query for a password.</p>

<p>Using a macro like the following</p>

@@ -233,7 +234,7 @@ naming convention for the checksum file, of course) and validate the checksum on
&lt;url url=&quot;http://ant.apache.org/faq.html&quot;/&gt;
&lt;/get&gt;</pre>

<p>With custom HTTP headers</p>
<p>Using custom HTTP headers</p>

<pre>
&lt;get src=&quot;http://ant.apache.org/index.html&quot; dest=&quot;downloads&quot;&gt;
@@ -242,7 +243,7 @@ naming convention for the checksum file, of course) and validate the checksum on
&lt;header name=&quot;header3&quot; value=&quot;headerValue3&quot;/&gt;
&lt;/get&gt;</pre>

<p>Gets the index and FAQ pages of <samp>http://ant.apache.org/</samp>, and stores them in the
<p>get the index and FAQ pages of <samp>http://ant.apache.org/</samp>, and store them in the
directory <samp>downloads</samp> which will be created if necessary.</p>
</body>
</html>

+ 4
- 5
manual/Tasks/hostinfo.html View File

@@ -68,17 +68,16 @@ build was performed on. The best place for this task is probably in an initiali

<h3>Examples</h3>

<pre>&lt;hostinfo/&gt;</pre>

<p>Sets the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code> for
<p>Set the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code> for
the local host, using the most &quot;global&quot; address available.</p>
<pre>&lt;hostinfo/&gt;</pre>

<pre>&lt;hostinfo prefix=&quot;remotehost&quot; host=&quot;www.apache.org&quot;/&gt;</pre>
<p>Sets the properties <code>remotehost.NAME</code>
<p>Set the properties <code>remotehost.NAME</code>
to <samp>eos</samp>, <code>remotehost.DOMAIN</code>
to <samp>apache.org</samp>, <code>remotehost.ADDR4</code> to <samp>140.211.11.130</samp>
and <code>remotehost.ADDR6</code> to <samp>::</samp> for the host with the
name <samp>www.apache.org</samp> (provided the canonical name and IP addresses do not change).</p>
<pre>&lt;hostinfo prefix=&quot;remotehost&quot; host=&quot;www.apache.org&quot;/&gt;</pre>

</body>
</html>

+ 7
- 6
manual/Tasks/image.html View File

@@ -209,6 +209,8 @@ element.</p>

<h3>Examples</h3>

<p>Create thumbnails of my images and make sure they all fit within the 160x160 size whether the
image is portrait or landscape.</p>
<pre>
&lt;image destdir="samples/low" overwrite="yes"&gt;
&lt;fileset dir="samples/full"&gt;
@@ -216,28 +218,27 @@ element.</p>
&lt;/fileset&gt;
&lt;scale width="160" height="160" proportions="fit"/&gt;
&lt;/image&gt;</pre>
<p>Create thumbnails of my images and make sure they all fit within the 160x160 size whether the
image is portrait or landscape.</p>

<p>Create a thumbnail for all PNG files in <samp>src</samp> of the size of 40 pixel keeping the
proportions and store the <samp>src</samp>.</p>
<pre>
&lt;image srcdir="src" includes="*.png"&gt;
&lt;scale proportions="width" width="40"/&gt;
&lt;/image&gt;</pre>
<p>Creates a thumbnail for all PNG files in <samp>src</samp> of the size of 40 pixel keeping the
proportions and stores the <samp>src</samp>.</p>

<p>Same as above but store the result in <samp>dest</samp>.</p>
<pre>
&lt;image srcdir="src" destdir="dest" includes="*.png"&gt;
&lt;scale proportions="width" width="40"/&gt;
&lt;/image&gt;</pre>
<p>Same as above but stores the result in <samp>dest</samp>.</p>

<p>Same as above but store the result to files with original names prefixed
by <samp>scaled-</samp>.</p>
<pre>
&lt;image srcdir="src" destdir="dest" includes="*.png"&gt;
&lt;scale proportions="width" width="40"/&gt;
&lt;globmapper from="*" to="scaled-*"/&gt;
&lt;/image&gt;</pre>
<p>Same as above but stores the resulting file names will be prefixed by <samp>scaled-</samp>.</p>

</body>
</html>

+ 17
- 13
manual/Tasks/input.html View File

@@ -137,16 +137,22 @@ different <code>Input</code> tasks.</p>
elements.</p>

<h3>Examples</h3>
<pre>&lt;input/&gt;</pre>
<p>Will pause the build run until return key is pressed when using
<p>Pause the build run until return key is pressed when using
the <a href="../inputhandler.html#defaulthandler">default InputHandler</a>, the concrete behavior is
defined by the <code>InputHandler</code> implementation you use.</p>
<pre>&lt;input/&gt;</pre>

<p>Display the message <q>Press Return key to continue...</q> and pause the build run until return
key is pressed (again, the concrete behavior is implementation dependent).</p>
<pre>&lt;input&gt;Press Return key to continue...&lt;/input&gt;</pre>
<p>Will display the message <q>Press Return key to continue...</q> and pause the build run until
return key is pressed (again, the concrete behavior is implementation dependent).</p>

<p>Display the message <q>Press Return key to continue...</q> and pause the build run until return
key is pressed (see above).</p>
<pre>&lt;input message=&quot;Press Return key to continue...&quot;/&gt;</pre>
<p>Will display the message <q>Press Return key to continue...</q> and pause the build run until
return key is pressed (see above).</p>

<p>Display the message <q>All data is going to be deleted from DB continue (y/n)?</q> and
require <q>y</q> to continue build or <q>n</q> to exit build with following message <q>Build aborted
by user.</q>.</p>
<pre>
&lt;input message=&quot;All data is going to be deleted from DB continue (y/n)?&quot;
validargs=&quot;y,n&quot;
@@ -156,21 +162,19 @@ return key is pressed (see above).</p>
&lt;/condition&gt;
&lt;fail if=&quot;do.abort&quot;&gt;Build aborted by user.&lt;/fail&gt;
</pre>
<p>Will display the message <q>All data is going to be deleted from DB continue (y/n)?</q> and
require <q>y</q> to continue build or <q>n</q> to exit build with following message <q>Build aborted
by user.</q>.</p>
<p>Display the message <q>Please enter db-username:</q> and set the property <code>db.user</code> to
the value entered by the user.</p>
<pre>
&lt;input message=&quot;Please enter db-username:&quot;
addproperty=&quot;db.user&quot;/&gt;</pre>
<p>Will display the message <q>Please enter db-username:</q> and set the
property <code>db.user</code> to the value entered by the user.</p>

<p>Same as above, but set <code>db.user</code> to the value <q>Scott-Tiger</q> if the user enters no
value (simply presses <q>return</q>).</p>
<pre>
&lt;input message=&quot;Please enter db-username:&quot;
addproperty=&quot;db.user&quot;
defaultvalue=&quot;Scott-Tiger&quot;/&gt;</pre>
<p>Same as above, but will set <code>db.user</code> to the value <q>Scott-Tiger</q> if the user
enters no value (simply presses <q>return</q>).</p>

</body>
</html>

+ 21
- 21
manual/Tasks/jar.html View File

@@ -388,45 +388,47 @@ nested <code>&lt;provider&gt;</code> elements may be used.</p>
<h3>Examples</h3>

<h4>Simple</h4>
<pre>&lt;jar destfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>
<p>jars all files in the <samp>${build}/classes</samp> directory into a file
<p>Jar all files in the <samp>${build}/classes</samp> directory into a file
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory.</p>
<pre>&lt;jar destfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>

<h4>With filters</h4>

<p>Jar all files in the <samp>${build}/classes</samp> directory into a file
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Files with the
name <samp>Test.class</samp> are excluded.</p>
<pre>&lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
basedir=&quot;${build}/classes&quot;
excludes=&quot;**/Test.class&quot;/&gt;</pre>
<p>jars all files in the <samp>${build}/classes</samp> directory into a file
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Files with the
name <samp>Test.class</samp> are excluded.</p>

<p>Jar all files in the <samp>${build}/classes</samp> directory into a file
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Only files under the
directory <samp>mypackage/test</samp> are used, and files with the name <samp>Test.class</samp> are
excluded.</p>
<pre>
&lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
basedir=&quot;${build}/classes&quot;
includes=&quot;mypackage/test/**&quot;
excludes=&quot;**/Test.class&quot;/&gt;</pre>
<p>jars all files in the <samp>${build}/classes</samp> directory into a file
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Only files under the
directory <samp>mypackage/test</samp> are used, and files with the name <samp>Test.class</samp> are
excluded.</p>

<h4>Multiple filesets</h4>
<p>Jar all files in the <samp>${build}/classes</samp> directory and also in
the <samp>${src}/resources</samp> directory together into a file called <samp>app.jar</samp> in
the <samp>${dist}/lib</samp> directory. Files with the name <samp>Test.class</samp> are excluded. If
there are files such as <samp>${build}/classes/mypackage/MyClass.class</samp>
and <samp>${src}/resources/mypackage/image.gif</samp>, they will appear in the same directory in the
jar (and thus be considered in the same package by Java).</p>
<pre>
&lt;jar destfile=&quot;${dist}/lib/app.jar&quot;&gt;
&lt;fileset dir=&quot;${build}/classes&quot;
excludes=&quot;**/Test.class&quot;/&gt;
&lt;fileset dir=&quot;${src}/resources&quot;/&gt;
&lt;/jar&gt;</pre>
<p>jars all files in the <samp>${build}/classes</samp> directory and also in
the <samp>${src}/resources</samp> directory together into a file called <samp>app.jar</samp> in
the <samp>${dist}/lib</samp> directory. Files with the name <samp>Test.class</samp> are excluded.
If there are files such as <samp>${build}/classes/mypackage/MyClass.class</samp>
and <samp>${src}/resources/mypackage/image.gif</samp>, they will appear in the same directory in the
JAR (and thus be considered in the same package by Java).</p>

<h4>Merging archives</h4>

<p>Create an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and embed
all the classes from the jar <samp>lib/main/some.jar</samp>.</p>
<pre>
&lt;jar destfile="build/main/checksites.jar"&gt;
&lt;fileset dir="build/main/classes"/&gt;
@@ -436,9 +438,9 @@ JAR (and thus be considered in the same package by Java).</p>
value="com.acme.checksites.Main"/&gt;
&lt;/manifest&gt;
&lt;/jar&gt;</pre>
<p>Creates an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and
embeds all the classes from the jar <samp>lib/main/some.jar</samp>.</p>

<p>Create an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and embed
all the classes from all the jars in <samp>lib/main</samp>.</p>
<pre>
&lt;jar destfile="build/main/checksites.jar"&gt;
&lt;fileset dir="build/main/classes"/&gt;
@@ -455,8 +457,6 @@ embeds all the classes from the jar <samp>lib/main/some.jar</samp>.</p>
value="com.acme.checksites.Main"/&gt;
&lt;/manifest&gt;
&lt;/jar&gt;</pre>
<p>Creates an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and
embeds all the classes from all the jars in <samp>lib/main</samp>.</p>

<h4>Inline manifest</h4>
<pre>
@@ -521,9 +521,9 @@ JDK 6 scripting interface:</p>

<h4 id="jep238-example">JEP 238 example: a Multi-Release JAR Files</h4>
<p>Here we want to create a <em>Multi-Release JAR File</em> according the
specification <a href="http://openjdk.java.net/jeps/238" target="_top">JEP 238</a>. It defines on
specification <a href="http://openjdk.java.net/jeps/238" target="_top">JEP 238</a>. It defines on
top of a JAR the possibility to place additional or overwriting classes in a jar, which are
available according to the Java version you run.<br/> Basically it says, that you have to set the
available according to the Java version you run.<br/>Basically it says, that you have to set the
manifest entry <code>Multi-Release: true</code> and place all additional or overwriting classes
in <samp>META-INF/versions/<i>number</i>/package-structure</samp>,
e.g. <samp>META-INF/versions/9/org/apache/ant/MyClass.class</samp></p>


+ 6
- 5
manual/Tasks/jarlib-available.html View File

@@ -69,7 +69,7 @@ extension.</p>
extension in.</p>

<h3>Examples</h3>
<p><strong>Search for extension in single file</strong></p>
<p>Search for extension in single file</p>
<pre>
&lt;jarlib-available property=&quot;myext.present&quot; file=&quot;myfile.jar&quot;&gt;
&lt;extension extensionName=&quot;org.apache.tools.ant&quot;
@@ -78,7 +78,7 @@ extension in.</p>
&lt;/jarlib-available&gt;
</pre>

<p><strong>Search for extension in single file referencing external Extension</strong></p>
<p>Search for extension in single file referencing external Extension</p>
<pre>
&lt;extension id=&quot;myext&quot;
extensionName=&quot;org.apache.tools.ant&quot;
@@ -88,7 +88,8 @@ extension in.</p>
&lt;jarlib-available property=&quot;myext.present&quot; file=&quot;myfile.jar&quot;&gt;
&lt;extension refid=&quot;myext&quot;/&gt;
&lt;/jarlib-available&gt;</pre>
<p><strong>Search for extension in fileset</strong></p>

<p>Search for extension in fileset</p>
<pre>
&lt;extension id=&quot;myext&quot;
extensionName=&quot;org.apache.tools.ant&quot;
@@ -101,7 +102,8 @@ extension in.</p>
&lt;include name="*.jar"/&gt;
&lt;/fileset&gt;
&lt;/jarlib-available&gt;</pre>
<p><strong>Search for extension in extensionSet</strong></p>

<p>Search for extension in extensionSet</p>
<pre>
&lt;extension id=&quot;myext&quot;
extensionName=&quot;org.apache.tools.ant&quot;
@@ -121,4 +123,3 @@ extension in.</p>

</body>
</html>


+ 2
- 2
manual/Tasks/jarlib-display.html View File

@@ -56,10 +56,10 @@ target="_top">Extension and ExtensionSet documentation</a> for further details.<
information about.</p>

<h3>Examples</h3>
<p><strong>Display Extension info for a single file</strong></p>
<p>Display Extension info for a single file</p>
<pre>&lt;jarlib-display file=&quot;myfile.jar&quot;&gt;</pre>

<p><strong>Display Extension info for a fileset</strong></p>
<p>Display Extension info for a fileset</p>
<pre>
&lt;jarlib-display&gt;
&lt;fileset dir="lib"&gt;


+ 2
- 3
manual/Tasks/jarlib-manifest.html View File

@@ -63,7 +63,7 @@ target="_top">Extension and ExtensionSet documentation</a> for further details.<
jar. (Optional dependencies will be used if present else they will be ignored)</p>

<h3>Examples</h3>
<p><strong>Basic Manifest generated for single Extension</strong></p>
<p>Basic Manifest generated for single Extension</p>
<pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;
@@ -78,8 +78,7 @@ jar. (Optional dependencies will be used if present else they will be ignored)</
&lt;extension refid=&quot;e1&quot;/&gt;
&lt;/jarlib-manifest&gt;</pre>

<p><strong>Search for extension in fileset</strong></p>
<p><strong>A large example with required and optional dependencies</strong></p>
<p>Search for extension in fileset: a large example with required and optional dependencies</p>
<pre>
&lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot;


+ 10
- 11
manual/Tasks/jarlib-resolve.html View File

@@ -135,8 +135,8 @@ library.</p>
</table>

<h3>Examples</h3>
<p><strong>Resolve Extension to file.</strong> If file does not exist or file does not implement
extension then throw an exception.</p>
<p>Resolve Extension to file. If file does not exist or file does not implement extension then throw
an exception.</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
@@ -148,8 +148,8 @@ extension then throw an exception.</p>
&lt;location location="/opt/jars/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;</pre>

<p><strong>Resolve Extension to URL.</strong> If URL does not exist or can not write
to <var>destfile</var> or file does not implement extension then throw an exception.</p>
<p>Resolve Extension to URL. If URL does not exist or can not write to <var>destfile</var> or file
does not implement extension then throw an exception.</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
@@ -161,9 +161,9 @@ to <var>destfile</var> or file does not implement extension then throw an except
&lt;url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;</pre>

<p><strong>Resolve Extension to file produce by Ant build.</strong> If file does not get produced or
Ant file is missing or build fails then throw an exception. (<strong>Note</strong>: does not check
that library implements extension.)</p>
<p>Resolve Extension to file produce by Ant build. If file does not get produced or Ant file is
missing or build fails then throw an exception. (<strong>Note</strong>: does not check that library
implements extension.)</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;
@@ -175,10 +175,9 @@ that library implements extension.)</p>
&lt;ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/&gt;
&lt;/jarlib-resolve&gt;</pre>

<p><strong>Resolve Extension via multiple methods.</strong> First check local file to see if it
implements extension. If it does not then try to build it from source in parallel directory. If that
fails then finally try to download it from a website. If all steps fail then throw a build
exception.</p>
<p>Resolve Extension via multiple methods. First check local file to see if it implements
extension. If it does not then try to build it from source in parallel directory. If that fails then
finally try to download it from a website. If all steps fail then throw a build exception.</p>
<pre>
&lt;extension id=&quot;dve.ext&quot;
extensionName=&quot;org.realityforge.dve&quot;


+ 16
- 17
manual/Tasks/java.html View File

@@ -315,6 +315,7 @@ to <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.h
target="_top">Oracle's specification</a>.

<h3>Examples</h3>
<p>Run a class in this JVM with a new jar on the classpath</p>
<pre>
&lt;java classname=&quot;test.Main&quot;&gt;
&lt;arg value=&quot;-h&quot;/&gt;
@@ -323,8 +324,10 @@ target="_top">Oracle's specification</a>.
&lt;pathelement path=&quot;${java.class.path}&quot;/&gt;
&lt;/classpath&gt;
&lt;/java&gt;</pre>
Run a class in this JVM with a new jar on the classpath

<p>Run the JAR <samp>test.jar</samp> in this project's <samp>dist/lib</samp> directory, using the
manifest supplied entry point, forking (as required), and with a maximum memory of 128 MB. Any non
zero return code breaks the build.</p>
<pre>
&lt;java jar=&quot;dist/test.jar&quot;
fork="true"
@@ -336,10 +339,9 @@ Run a class in this JVM with a new jar on the classpath
&lt;pathelement path=&quot;${java.class.path}&quot;/&gt;
&lt;/classpath&gt;
&lt;/java&gt;</pre>
<p>Run the JAR <samp>test.jar</samp> in this project's <samp>dist/lib</samp> directory. using the
manifest supplied entry point, forking (as required), and with a maximum memory of 128 MB. Any non
zero return code breaks the build.</p>

<p>Run the JAR <samp>dist/test.jar</samp> relative to the directory <code>${exec.dir}</code>, this
being the same directory in which JVM is to start up.</p>
<pre>
&lt;java dir=&quot;${exec.dir}&quot;
jar=&quot;${exec.dir}/dist/test.jar&quot;
@@ -352,12 +354,12 @@ zero return code breaks the build.</p>
&lt;pathelement path=&quot;${java.class.path}&quot;/&gt;
&lt;/classpath&gt;
&lt;/java&gt;</pre>
<p>Run the JAR <samp>dist/test.jar</samp> relative to the directory <code>${exec.dir}</code>, this
being the same directory in which JVM is to start up.</p>

<p>Run a given class with the current classpath.</p>
<pre>&lt;java classname=&quot;test.Main&quot;/&gt;</pre>
<p>Runs a given class with the current classpath.</p>

<p>Add system properties and JVM properties to JVM as in <code>java
-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true test.Main</code>
<pre>
&lt;java classname=&quot;test.Main&quot;
fork=&quot;yes&quot; &gt;
@@ -365,31 +367,31 @@ being the same directory in which JVM is to start up.</p>
&lt;arg value=&quot;-h&quot;/&gt;
&lt;jvmarg value=&quot;-Xrunhprof:cpu=samples,file=log.txt,depth=3&quot;/&gt;
&lt;/java&gt;</pre>
<p>Add system properties and JVM properties to JVM as in <code>java
-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true test.Main</code>

<p>Use a given Java implementation (other than the one Ant is currently using) to run the class. For
documentation in the log <var>taskname</var> is used to change the <q>[java]</q> log-prefix
to <q>[java1.4]</q>.</p>
<pre>
&lt;java classname=&quot;ShowJavaVersion&quot; classpath=&quot;.&quot;
jvm=&quot;path-to-java14-home/bin/java&quot; fork=&quot;true&quot;
taskname=&quot;java1.4&quot;/&gt;</pre>
<p>Use a given Java implementation (other than the one Ant is currently using) to run the class.
For documentation in the log <var>taskname</var> is used to change the <q>[java]</q> log-prefix
to <q>[java1.4]</q>.</p>

<p><strong>Note</strong>: you can not specify the (highly deprecated) MS
JVM, <samp>jview.exe</samp>, as <var>jvm</var>, since it takes different parameters than other JVMs.
That JVM can be started from <code>&lt;exec&gt;</code> if required.</p>

<p>Run the module <samp>TestModule</samp> resolved on the modulepath <samp>lib/:dist/test.jar</samp>
with a maximum memory of 128 MB. Any non zero return code breaks the build.</p>
<pre>
&lt;java fork=&quot;true&quot;
failonerror=&quot;true&quot;
maxmemory=&quot;128m&quot;
module=&quot;TestModule&quot;
modulepath=&quot;lib:dist/test.jar&quot;/&gt;</pre>
<p>Runs the module <samp>TestModule</samp> resolved on the

<p>Run the class <samp>Main</samp> in module <samp>TestModule</samp> resolved on the
modulepath <samp>lib/:dist/test.jar</samp> with a maximum memory of 128 MB. Any non zero return code
breaks the build.</p>

<pre>
&lt;java fork=&quot;true&quot;
failonerror=&quot;true&quot;
@@ -401,8 +403,5 @@ breaks the build.</p>
&lt;pathelement location=&quot;dist/test.jar&quot;/&gt;
&lt;/modulepath&gt;
&lt;/java&gt;</pre>
<p>Runs the class <samp>Main</samp> in module <samp>TestModule</samp> resolved on the
modulepath <samp>lib/:dist/test.jar</samp> with a maximum memory of 128 MB. Any non zero return code
breaks the build.</p>
</body>
</html>

+ 37
- 54
manual/Tasks/javac.html View File

@@ -488,6 +488,10 @@ type can be used as an alternative to the <var>compiler</var> attribute.</p>

<h3>Examples</h3>

<p>Compile all <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
the <samp>.class</samp> files in the <samp>${build}</samp> directory. The classpath used
includes <samp>xyz.jar</samp>, and compiling with debug information is on. The source level
is <q>1.4</q>, so you can use <code>assert</code> statements.</p>
<pre>
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
@@ -495,11 +499,10 @@ type can be used as an alternative to the <var>compiler</var> attribute.</p>
debug=&quot;on&quot;
source=&quot;1.4&quot;/&gt;</pre>

<p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores
the <samp>.class</samp> files in the <samp>${build}</samp> directory. The classpath used
includes <samp>xyz.jar</samp>, and compiling with debug information is on. The source level
is <q>1.4</q>, so you can use <code>assert</code> statements.</p>

<p>Compile all <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
the <samp>.class</samp> files in the <samp>${build}</samp> directory. Java compiler is forked using
the default <kbd>javac</kbd> executable. The source level is <q>1.2</q> (similar to <q>1.1</q>
or <q>1.3</q>) and the class files should be runnable under JDK 1.2+ as well.</p>
<pre>
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
@@ -507,50 +510,34 @@ is <q>1.4</q>, so you can use <code>assert</code> statements.</p>
source=&quot;1.2&quot;
target=&quot;1.2&quot;/&gt;</pre>

<p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores
the <samp>.class</samp> files in the <samp>${build}</samp> directory. This will fork off the Java
compiler using the default <kbd>javac</kbd> executable. The source level is <q>1.2</q> (similar
to <q>1.1</q> or <q>1.3</q>) and the class files should be runnable under JDK 1.2+ as well.</p>

<p>Compile all <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
the <samp>.class</samp> files in the <samp>${build}</samp> directory. Java compiler is forked using
the executable named <kbd>java$javac.exe</kbd>. Note that the <q>$</q> sign needs to be escaped by a
second one. The source level is <q>1.5</q>, so you can use generics.</p>
<pre>
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
fork=&quot;java$$javac.exe&quot;
source=&quot;1.5&quot;/&gt;</pre>

<p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores
the <samp>.class</samp> files in the <samp>${build}</samp> directory. This will fork off the Java
compiler, using the executable named <kbd>java$javac.exe</kbd>. Note that the <q>$</q> sign needs
to be escaped by a second one. The source level is <q>1.5</q>, so you can use generics.</p>

<pre>
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
includes=&quot;mypackage/p1/**,mypackage/p2/**&quot;
excludes=&quot;mypackage/p1/testpackage/**&quot;
classpath=&quot;xyz.jar&quot;
debug=&quot;on&quot;/&gt;</pre>

<p>compiles <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores
the <samp>.class</samp> files in the <code>${build}</code> directory. The classpath used
includes <samp>xyz.jar</samp>, and debug information is on. Only files
<p>Compile <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
the <samp>.class</samp> files in the <code>${build}</code> directory. The classpath used
includes <samp>xyz.jar</samp>, and debug information is on. Only files
under <samp>mypackage/p1</samp> and <samp>mypackage/p2</samp> are used. All files in and below
the <samp>mypackage/p1/testpackage</samp> directory are excluded from compilation. You didn't
the <samp>mypackage/p1/testpackage</samp> directory are excluded from compilation. You didn't
specify a source or target level, so the actual values used will depend on which JDK you ran Ant
with.</p>

<pre>
&lt;javac srcdir=&quot;${src}:${src2}&quot;
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
includes=&quot;mypackage/p1/**,mypackage/p2/**&quot;
excludes=&quot;mypackage/p1/testpackage/**&quot;
classpath=&quot;xyz.jar&quot;
debug=&quot;on&quot;/&gt;</pre>

<p>is the same as the previous example, with the addition of a second source path, defined by the
property <samp>src2</samp>. This can also be represented using nested <code>&lt;src&gt;</code>
<p>This is the same as the previous example, with the addition of a second source path, defined by
the property <samp>src2</samp>. This can also be represented using nested <code>&lt;src&gt;</code>
elements as follows:</p>

<pre>
&lt;javac destdir=&quot;${build}&quot;
classpath=&quot;xyz.jar&quot;
@@ -562,11 +549,10 @@ elements as follows:</p>
&lt;exclude name=&quot;mypackage/p1/testpackage/**&quot;/&gt;
&lt;/javac&gt;</pre>

<p>If you want to run the <kbd>javac</kbd> compiler of a different JDK, you should tell Ant, where
to find the compiler and which version of JDK you will be using so it can choose the correct command
line switches. The following example executes a JDK 1.1 <kbd>javac</kbd> in a new process and
uses the correct command line switches even when Ant is running in a JVM of a different version:</p>

<p>If you want to run the <kbd>javac</kbd> compiler of a different JDK, you should tell Ant where to
find the compiler and which version of JDK you will be using so it can choose the correct command
line switches. The following example executes a JDK 1.1 <kbd>javac</kbd> in a new process and uses
the correct command line switches even when Ant is running in a JVM of a different version:</p>
<pre>
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
@@ -584,7 +570,6 @@ target="_top">Ant FAQ</a> for additional information.</p>

<p>If you wish to compile only files explicitly specified and disable <code>javac</code>'s default
searching mechanism then you can unset the <var>sourcepath</var> attribute:</p>

<pre>
&lt;javac sourcepath=&quot;&quot; srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot; &gt;
@@ -599,7 +584,6 @@ files refers to them.</p>
<p>If you wish to compile with a special JDK (another than the one Ant is currently using), set
the <var>executable</var> and <var>fork</var> attribute. Using <var>taskname</var> could show in the
log, that these settings are fix.</p>

<pre>
&lt;javac srcdir=&quot;&quot;
destdir=&quot;&quot;
@@ -613,7 +597,6 @@ with all JDKs prior to 1.2.</p>

<p>If you want to activate other compiler options like <code>lint</code> you could use
the <code>&lt;compilerarg&gt;</code> element:</p>

<pre>
&lt;javac srcdir="${src.dir}"
destdir="${classes.dir}"
@@ -641,6 +624,12 @@ the <var>compiler</var> attribute:</p>

<p>in which case your compiler adapter can support attributes and nested elements of its own.</p>

<p>The following examples demonstrate the use of Java 9+ modules.</p>

<p>Compile all <samp>.java</samp> files in a single module under the <samp>${src}</samp> directory,
and store the <samp>.class</samp> files in the <code>${build}</code> directory. The compilation uses
application modules located in <samp>modules</samp> folder. The source level is <q>9</q> to enable
modules.</p>
<pre>
&lt;javac srcdir=&quot;${src}&quot;
destdir=&quot;${build}&quot;
@@ -648,11 +637,14 @@ the <var>compiler</var> attribute:</p>
modulepath=&quot;modules&quot;
source=&quot;9&quot;/&gt;</pre>

<p>compiles all <samp>.java</samp> files in a single module under the <samp>${src}</samp> directory,
and stores the <samp>.class</samp> files in the <code>${build}</code> directory. The compilation
uses application modules located in <samp>modules</samp> folder.The source level is <q>9</q> to
enable modules.</p>

<p>Compile all <samp>.java</samp> files in <samp>gen/classes</samp>, <samp>lin32/classes</samp>
and <code>lin64/classes</code> in all source modules under the <code>${src}</code>
directory. Generate module directories in the <samp>${build}</samp> directory. Each generated module
directory under the <samp>${build}</samp> directory contains <code>.class</code> files from
corresponding source module. The <samp>*</samp> is a token representing the name of any of the
modules in the compilation module set. The <code>{ ... , ... }</code> express alternates for
expansion. The compilation uses application modules located in <code>modules</code> folder. The
source level is <q>9</q> to enable modules.</p>
<pre>
&lt;javac modulesourcepath=&quot;${src}/*/{gen,lin{32,64}}/classes&quot;
destdir=&quot;${build}&quot;
@@ -660,15 +652,6 @@ enable modules.</p>
modulepath=&quot;modules&quot;
source=&quot;9&quot;/&gt;</pre>

<p>compiles all <samp>.java</samp> files in <samp>gen/classes</samp>, <samp>lin32/classes</samp>
and <code>lin64/classes</code> in all source modules under the <code>${src}</code> directory.
Generates module directories in the <samp>${build}</samp> directory. Each generated module directory
under the <samp>${build}</samp> directory contains <code>.class</code> files from corresponding
source module. The <samp>*</samp> is a token representing the name of any of the modules in the
compilation module set. The <code>{ ... , ... }</code> express alternates for expansion. The
compilation uses application modules located in <code>modules</code> folder.The source level
is <q>9</q> to enable modules.</p>

<h3 id="jikes">Jikes notes</h3>

<p>You need Jikes 1.15 or later.</p>


+ 3
- 3
manual/Tasks/javacc.html View File

@@ -179,14 +179,14 @@ task will still work, but it will always generate the output files.</p>
</tr>
</table>
<h3>Example</h3>

<p>Invoke JavaCC on grammar file <samp>src/Parser.jj</samp>, writing the generated files
to <samp>build/src</samp>. The grammar option STATIC is set to <q>true</q> when invoking JavaCC.</p>
<pre>
&lt;javacc target=&quot;src/Parser.jj&quot;
outputdirectory=&quot;build/src&quot;
javacchome=&quot;c:/program files/JavaCC&quot;
static=&quot;true&quot;/&gt;</pre>
<p>This invokes JavaCC on grammar file <samp>src/Parser.jj</samp>, writing the generated files
to <samp>build/src</samp>. The grammar option STATIC is set to <q>true</q> when invoking
JavaCC.</p>

</body>
</html>

+ 13
- 10
manual/Tasks/javah.html View File

@@ -188,25 +188,31 @@ using one of the built-in compilers.</p>
element of that type can be used as an alternative to the <var>implementation</var> attribute.</p>

<h3>Examples</h3>
<pre>&lt;javah destdir=&quot;c&quot; class=&quot;org.foo.bar.Wibble&quot;/&gt;</pre>
<p>makes a JNI header of the named class, using the JDK 1.2 JNI model. Assuming the
<p>Make a JNI header of the named class, using the JDK 1.2 JNI model. Assuming the
directory <samp>c</samp> already exists, the file <samp>org_foo_bar_Wibble.h</samp> is created
there. If this file already exists, it is left unchanged.</p>
<pre>&lt;javah destdir=&quot;c&quot; class=&quot;org.foo.bar.Wibble&quot;/&gt;</pre>

<p>This is similar to the previous example, except the output is written to a file
called <samp>wibble.h</samp> in the current directory.</p>
<pre>
&lt;javah outputFile=&quot;wibble.h&quot;&gt;
&lt;class name=&quot;org.foo.bar.Wibble,org.foo.bar.Bobble&quot;/&gt;
&lt;/javah&gt;</pre>
<p>is similar to the previous example, except the output is written to a file
called <samp>wibble.h</samp> in the current directory.</p>

<p>Write three header files, one for each of the classes named. Because the <var>force</var> option
is set, these header files are always written when the <code>Javah</code> task is invoked, even if
they already exist.</p>
<pre>
&lt;javah destdir=&quot;c&quot; force=&quot;yes&quot;&gt;
&lt;class name=&quot;org.foo.bar.Wibble&quot;/&gt;
&lt;class name=&quot;org.foo.bar.Bobble&quot;/&gt;
&lt;class name=&quot;org.foo.bar.Tribble&quot;/&gt;
&lt;/javah&gt;</pre>
<p>writes three header files, one for each of the classes named. Because the force option is set,
these header files are always written when the <code>Javah</code> task is invoked, even if they
already exist.</p>

<p>Write the headers for the three classes using the 'old' JNI format, then write the
corresponding <samp>.c</samp> stubs. The <var>verbose</var> option will cause <code>Javah</code> to
describe its progress.</p>
<pre>
&lt;javah destdir=&quot;c&quot; verbose=&quot;yes&quot; old=&quot;yes&quot; force=&quot;yes&quot;&gt;
&lt;class name=&quot;org.foo.bar.Wibble&quot;/&gt;
@@ -218,9 +224,6 @@ already exist.</p>
&lt;class name=&quot;org.foo.bar.Bobble&quot;/&gt;
&lt;class name=&quot;org.foo.bar.Tribble&quot;/&gt;
&lt;/javah&gt;</pre>
<p>writes the headers for the three classes using the 'old' JNI format, then writes the
corresponding <samp>.c</samp> stubs. The <var>verbose</var> option will cause <code>Javah</code> to
describe its progress.</p>

<p>If you want to use a
custom <code class="code">JavahAdapter</code> <code>org.example.MyAdapter</code> you can either use


+ 7
- 10
manual/Tasks/jdepend.html View File

@@ -119,6 +119,8 @@ or above).</p>

<h3>Examples</h3>

<p>Invoke JDepend on the <samp>build</samp> directory, writing the output on the standard
output. The classpath is defined using a reference.</p>
<pre>
&lt;jdepend classpathref="base.path"&gt;
&lt;classespath&gt;
@@ -126,9 +128,9 @@ or above).</p>
&lt;/classespath&gt;
&lt;/jdepend&gt;</pre>

<p>This invokes JDepend on the <samp>build</samp> directory, writing the output on the standard
output. The classpath is defined using a classpath reference.</p>
<p>This invoke JDepend in a separate JVM on the <samp>src</samp> and <samp>testsrc</samp>
directories, writing the output to the <samp>docs/jdepend.xml</samp> file in XML format. The
classpath is defined using nested elements.</p>
<pre>
&lt;jdepend outputfile="docs/jdepend.xml" fork="yes" format="xml"&gt;
&lt;sourcespath&gt;
@@ -140,10 +142,8 @@ output. The classpath is defined using a classpath reference.</p>
&lt;/classpath&gt;
&lt;/jdepend&gt;</pre>

<p>This invokes JDepend in a separate JVM on the <samp>src</samp> and <samp>testsrc</samp>
directories, writing the output to the <samp>docs/jdepend.xml</samp> file in xml format. The
classpath is defined using nested elements.</p>

<p>Invoke JDepend with the build directory as the base for class files to analyze, and ignore all
classes in the <samp>java.*</samp> and <samp>javax.*</samp> packages.</p>
<pre>
&lt;jdepend classpathref="base.path"&gt;
&lt;exclude name="java.*&gt;
@@ -153,8 +153,5 @@ classpath is defined using nested elements.</p>
&lt;/classespath&gt;
&lt;/jdepend&gt;</pre>

<p>This invokes JDepend with the build directory as the base for class files to analyze, and will
ignore all classes in the <samp>java.*</samp> and <samp>javax.*</samp> packages.</p>

</body>
</html>

+ 3
- 3
manual/Tasks/jjdoc.html View File

@@ -87,13 +87,13 @@ documentation file.</p>

<h3>Example</h3>

<p>Invoke JJDoc on grammar file <samp>src/Parser.jj</samp>, writing the generated BNF documentation
file, <samp>ParserBNF.html</samp>, to <samp>doc</samp>.</p>

<pre>
&lt;jjdoc target="src/Parser.jj"
outputfile="doc/ParserBNF.html"
javacchome="c:/program files/JavaCC"/&gt;</pre>

<p>This invokes JJDoc on grammar file <samp>src/Parser.jj</samp>, writing the generated BNF
documentation file, <samp>ParserBNF.html</samp>, to <samp>doc</samp>.</p>

</body>
</html>

+ 8
- 9
manual/Tasks/jjtree.html View File

@@ -141,25 +141,24 @@ file as the JJTree grammar file with a suffix <samp>.jj</samp>.</p>
<td>No</td>
</tr>

<tr>
<td>maxmemory</td>
<td>Max amount of memory to allocate to the forked JVM. <em>since Ant 1.8.3</em></td>
<td>No</td>
</tr>
<tr>
<td>maxmemory</td>
<td>Max amount of memory to allocate to the forked JVM. <em>since Ant 1.8.3</em></td>
<td>No</td>
</tr>
</table>

<h3>Example</h3>

<p>Invoke JJTree on grammar file <samp>src/Parser.jjt</samp>, writing the generated grammar
file, <samp>Parser.jj</samp>, to <samp>build/src</samp>. The grammar option NODE_USES_PARSER is set
to <q>true</q> when invoking JJTree.</p>
<pre>
&lt;jjtree target="src/Parser.jjt"
outputdirectory="build/src"
javacchome="c:/program files/JavaCC"
nodeusesparser="true"/&gt;</pre>

<p>This invokes JJTree on grammar file <samp>src/Parser.jjt</samp>, writing the generated grammar
file, <samp>Parser.jj</samp>, file to <samp>build/src</samp>. The grammar option NODE_USES_PARSER is
set to <q>true</q> when invoking JJTree.</p>

<h3>Comparison of output locations between command line JJTree and different Ant <code>taskdef</code>
versions</h3>



+ 1
- 1
manual/Tasks/jlink.html View File

@@ -123,7 +123,7 @@ entries to <samp>out.jar</samp>.</p>
&lt;/jar&gt;
</pre>

<p>Suppose the file foo.jar contains two entries: <samp>bar.class</samp>
<p>Suppose the file <samp>foo.jar</samp> contains two entries: <samp>bar.class</samp>
and <samp>barnone/myClass.zip</samp>. Suppose the path for file <samp>foo.jar</samp>
is <samp>build/tempbuild/foo.jar</samp>. The following example will provide the
entry <samp>tempbuild/foo.jar</samp> in the <samp>out.jar</samp>.</p>


+ 8
- 6
manual/Tasks/jspc.html View File

@@ -213,7 +213,11 @@ checking to the compiler.</p>
<td>Yes</td>
</tr>
</table>

<h3>Example</h3>
<p>Build all <samp>.jsp</samp> files under <samp>src/war</samp> into the
destination <samp>/gensrc</samp>, in a package hierarchy beginning
with <samp>com.i3sp.jsp</samp>.</p>
<pre>
&lt;jspc srcdir="${basedir}/src/war"
destdir="${basedir}/gensrc"
@@ -222,9 +226,10 @@ checking to the compiler.</p>
verbose="9"&gt;
&lt;include name="**/*.jsp"/&gt;
&lt;/jspc&gt;</pre>
<p>Build all <samp>.jsp</samp> files under <samp>src/war</samp> into the
destination <samp>/gensrc</samp>, in a package hierarchy beginning
with <samp>com.i3sp.jsp</samp>.</p>

<p>Generate <samp>.java</samp> files from <samp>.jsp</samp> files, then <code>javac</code> them down
to bytecode. Include <samp>lib/taglibs.jar</samp> in the Java compilation. Dependency checking is
used to scrub the <samp>.java</samp> files if class dependencies indicate it is needed.</p>
<pre>
&lt;jspc destdir="interim"
verbose="1"
@@ -241,9 +246,6 @@ with <samp>com.i3sp.jsp</samp>.</p>
destdir="build"
classpath="lib/taglibs.jar"
debug="on"/&gt;</pre>
<p>Generate <samp>.java</samp> files from <samp>.jsp</samp> files then <code>javac</code> them down
to bytecodes. Include <samp>lib/taglibs.jar</samp> in the Java compilation. Dependency checking is
used to scrub the <samp>.java</samp> files if class dependencies indicate it is needed.</p>

<h4>Notes</h4>
<p>Using the <var>package</var> attribute it is possible to identify the


+ 41
- 44
manual/Tasks/junit.html View File

@@ -630,24 +630,29 @@ can ensure they will be generated even if the build file disables them.</p>

<h3>Examples</h3>

<p>Run the test defined in <code>my.test.TestCase</code> in the same VM. No output will be generated
unless the test fails.</p>
<pre>
&lt;junit&gt;
&lt;test name="my.test.TestCase"/&gt;
&lt;/junit&gt;</pre>

<p>Runs the test defined in <code>my.test.TestCase</code> in the same VM. No output will be
generated unless the test fails.</p>
<p>Run the test defined in <code>my.test.TestCase</code> in a separate JVM. At the end of the test,
a one-line summary will be printed. A detailed report of the test can be found
in <samp>TEST-my.test.TestCase.txt</samp>. The build process will be stopped if the test fails.</p>
<pre>
&lt;junit printsummary="yes" fork="yes" haltonfailure="yes"&gt;
&lt;formatter type="plain"/&gt;
&lt;test name="my.test.TestCase"/&gt;
&lt;/junit&gt;</pre>

<p>Runs the test defined in <code>my.test.TestCase</code> in a separate JVM. At the end of the
test, a one-line summary will be printed. A detailed report of the test can be found
in <samp>TEST-my.test.TestCase.txt</samp>. The build process will be stopped if the test fails.</p>

<p>Run <code>my.test.TestCase</code> in the same JVM, ignoring the given <code>CLASSPATH</code>;
only a warning is printed if this test fails. In addition to the plain text test results, for this
test a XML result will be output to <samp>result.xml</samp>. Then, for each matching file in the
directory defined for <samp>${src.tests}</samp>, a test is run in a separate JVM. If a test fails,
the build process is aborted. Results are collected in files
named <samp>TEST-</samp><var>name</var><samp>.txt</samp> and written
to <samp>${reports.tests}</samp>.</p>
<pre>
&lt;junit printsummary="yes" haltonfailure="yes"&gt;
&lt;classpath&gt;
@@ -669,14 +674,14 @@ in <samp>TEST-my.test.TestCase.txt</samp>. The build process will be stopped if
&lt;/batchtest&gt;
&lt;/junit&gt;</pre>

<p>Runs <code>my.test.TestCase</code> in the same JVM, ignoring the given <code>CLASSPATH</code>;
only a warning is printed if this test fails. In addition to the plain text test results, for this
test a XML result will be output to <samp>result.xml</samp>. Then, for each matching file in the
directory defined for <samp>${src.tests}</samp> a test is run in a separate JVM. If a test fails,
the build process is aborted. Results are collected in files
named <samp>TEST-</samp><var>name</var><samp>.txt</samp> and written
to <samp>${reports.tests}</samp>.</p>
<p>On the first run, all tests are collected via the <code>&lt;batchtest/&gt;</code>
element. Its <var>plain</var> formatter shows the output on the console. The <var>failure</var>
formatter creates a Java source file in <samp>${build.dir}/failingTests/FailedTests.java</samp>
which extends <code class="code">junit.framework.TestCase</code> and returns from
a <code class="code">suite()</code> method a test suite for the failing tests.<br/>On a second run
the collector class exists and instead of the <code>&lt;batchtest/&gt;</code> the
single <code>&lt;test/&gt;</code> will run. So only the failing test cases are re-run. The two
nested formatters are for displaying (for the user) and for updating the collector class.</p>
<pre>
&lt;target name=&quot;test&quot;&gt;
&lt;property name=&quot;collector.dir&quot; value=&quot;${build.dir}/failingTests&quot;/&gt;
@@ -708,14 +713,17 @@ to <samp>${reports.tests}</samp>.</p>
&lt;/test&gt;
&lt;/junit&gt;
&lt;/target&gt;</pre>
<p>On the first run all tests are collected via the <code>&lt;batchtest/&gt;</code>
element. Its <var>plain</var> formatter shows the output on the console. The <var>failure</var>
formatter creates a Java source file in <samp>${build.dir}/failingTests/FailedTests.java</samp>
which extends <code>junit.framework.TestCase</code> and returns from a <code>suite()</code> method a
test suite for the failing tests.<br/> On a second run the collector class exists and instead of
the <code>&lt;batchtest/&gt;</code> the single <code>&lt;test/&gt;</code> will run. So only the
failing test cases are re-run. The two nested formatters are for displaying (for the user) and for
updating the collector class.</p>

<p>Run <code>my.test.TestCase</code> as a white-box test in the forked JVM given by
the <code>platform.java</code> property. The JUnit library is a part of an unnamed module while the
tested project and required modules are on the module path. The tests do not have module-info file
and are executed in the project module given by <code>module.name</code>
property.<br/>The <kbd>--patch-module</kbd> Java option executes the tests built
into <samp>${build.test.classes}</samp> in a module given by <code>module.name</code>
property.<br/>The <kbd>--add-modules</kbd> Java option enables the tested
module.<br/>The <kbd>--add-reads</kbd> Java option makes the unnamed module containing JUnit
readable by tested module.<br/>The <kbd>--add-exports</kbd> Java option makes the non-exported test
package <code>my.test</code> accessible from the unnamed module containing JUnit.</p>
<pre>
&lt;junit fork="true"
jvm="${platform.java}"&gt;
@@ -731,18 +739,15 @@ updating the collector class.</p>
&lt;/modulepath&gt;
&lt;formatter type="plain"/&gt;
&lt;test name="my.test.TestCase"/&gt;
&lt;/junit&gt;
</pre>
<p>Runs <code>my.test.TestCase</code> as a white-box test in the forked JVM given by
the <code>platform.java</code> property. The JUnit library is a part of an unnamed module while the
tested project and required modules are on the module path. The tests do not have module-info file
and are executed in the project module given by <code>module.name</code> property.<br/>
The <kbd>--patch-module</kbd> Java option executes the tests built
into <samp>${build.test.classes}</samp> in a module given by <code>module.name</code> property.<br/>
The <kbd>--add-modules</kbd> Java option enables the tested module.<br/>
The <kbd>--add-reads</kbd> Java option makes the unnamed module containing JUnit readable by
tested module.<br/> The <kbd>--add-exports</kbd> Java option makes the non-exported test
package <code>my.test</code> accessible from the unnamed module containing JUnit.</p>
&lt;/junit&gt;</pre>

<p>Run <code>my.test.TestCase</code> as a black-box test in the forked JVM given by
the <code>platform.java</code> property. The JUnit library is used as an automatic module. The
tests' module-info requires the tested module and JUnit.<br/>The <kbd>--add-modules</kbd> Java
option enables the test module.<br/>The <kbd>--add-exports</kbd> Java option makes the non-exported
test package <code>my.test</code> accessible from the JUnit module and Ant's test runner. Another
possibility is to export the test package in the tests' module-info by <code>exports my.test</code>
directive.</p>
<pre>
&lt;junit fork="true"
jvm="${platform.java}"&gt;
@@ -753,14 +758,6 @@ package <code>my.test</code> accessible from the unnamed module containing JUnit
&lt;/modulepath&gt;
&lt;formatter type="plain"/&gt;
&lt;test name="my.test.TestCase"/&gt;
&lt;/junit&gt;
</pre>
<p>Runs <code>my.test.TestCase</code> as a black-box test in the forked JVM given by
the <code>platform.java</code> property. The JUnit library is used as an automatic module. The
tests' module-info requires the tested module and JUnit.<br/> The <kbd>--add-modules</kbd> Java
option enables the test module.<br/> The <kbd>--add-exports</kbd> Java option makes the
non-exported test package <code>my.test</code> accessible from the JUnit module and Ant's test
runner. Another possibility is to export the test package in the tests' module-info
by <code>exports my.test</code> directive.</p>
&lt;/junit&gt;</pre>
</body>
</html>

+ 20
- 19
manual/Tasks/junitlauncher.html View File

@@ -392,6 +392,10 @@

<h3>Examples</h3>

<p>
Launch the JUnit 5 platform to run the <samp>org.myapp.SimpleTest</samp> test
</p>

<pre>
&lt;path id="test.classpath"&gt;
...
@@ -403,7 +407,9 @@
&lt;/junitlauncher&gt;</pre>

<p>
Launches the JUnit 5 platform to run the <samp>org.myapp.SimpleTest</samp> test
Launch the JUnit 5 platform to run the <samp>org.myapp.SimpleTest</samp> and
the <samp>org.myapp.AnotherTest</samp> tests. The build process will be stopped if any test, in
the <samp>org.myapp.SimpleTest</samp>, fails.
</p>

<pre>
@@ -415,9 +421,8 @@
</pre>

<p>
Launches the JUnit 5 platform to run the <samp>org.myapp.SimpleTest</samp> and
the <samp>org.myapp.AnotherTest</samp> tests. The build process will be stopped if any test, in
the <samp>org.myapp.SimpleTest</samp>, fails.
Launch the JUnit 5 platform to run only the <samp>testFoo</samp> and <samp>testBar</samp>
methods of the <samp>org.myapp.SimpleTest</samp> test class.
</p>

<pre>
@@ -427,8 +432,10 @@
&lt;/junitlauncher&gt;</pre>

<p>
Launches the JUnit 5 platform to run only the <samp>testFoo</samp> and <samp>testBar</samp>
methods of the <samp>org.myapp.SimpleTest</samp> test class.
Select any <samp>.class</samp> files that match
the <samp>org/example/**/tests/**/</samp> <code>fileset</code> filter, under
the <samp>${build.classes.dir}</samp> and passes those classes to the JUnit 5 platform for
execution as tests.
</p>

<pre>
@@ -443,10 +450,14 @@
&lt;/junitlauncher&gt;</pre>

<p>
Selects any <samp>.class</samp> files that match
Select any <samp>.class</samp> files that match
the <samp>org/example/**/tests/**/</samp> <code>fileset</code> filter, under
the <samp>${build.classes.dir}</samp> and passes those classes to the JUnit 5 platform for
execution as tests.
the <samp>${build.classes.dir}</samp> and pass those classes to the JUnit 5 platform for
execution as tests. Test results will be written out to the <samp>${output.dir}</samp> by
the <q>legacy-xml</q> and <q>legacy-plain</q> formatters, in separate files. Furthermore, both
the <q>legacy-xml</q> and the <q>legacy-plain</q> listeners, above, are configured to receive
the standard output content generated by the tests. The <q>legacy-xml</q> listener is configured
to receive standard error content as well.
</p>

<pre>
@@ -461,16 +472,6 @@
&lt;listener type="legacy-plain" sendSysOut="true" /&gt;
&lt;/testclasses&gt;
&lt;/junitlauncher&gt;</pre>
<p>
Selects any <samp>.class</samp> files that match
the <samp>org/example/**/tests/**/</samp> <code>fileset</code> filter, under
the <samp>${build.classes.dir}</samp> and passes those classes to the JUnit 5 platform for
execution as tests. Test results will be written out to the <samp>${output.dir}</samp> by
the <q>legacy-xml</q> and <q>legacy-plain</q> formatters, in separate files. Furthermore, both
the <q>legacy-xml</q> and the <q>legacy-plain</q> listeners, above, are configured to receive
the standard output content generated by the tests. The <q>legacy-xml</q> listener is
configured to receive standard error content as well.
</p>

</body>
</html>

+ 7
- 7
manual/Tasks/junitreport.html View File

@@ -177,7 +177,11 @@ nested <code>&lt;classpath&gt;</code> will be used to load the processor.</p>
<p><em>Since Ant 1.9.5</em>. Like for the <a href="../Tasks/style.html#factory">XSLT task</a>, a
nested <code>&lt;factory&gt;</code> can be used to specify factory settings.</p>

<h3>Example of report</h3>
<h3>Examples</h3>

<p>Generate a <samp>TESTS-TestSuites.xml</samp> file in the directory <samp>reports</samp> and
generate the default framed report in the directory <samp>report/html</samp>.</p>

<pre>
&lt;junitreport todir=&quot;./reports&quot;&gt;
&lt;fileset dir=&quot;./reports&quot;&gt;
@@ -186,10 +190,9 @@ nested <code>&lt;factory&gt;</code> can be used to specify factory settings.</p>
&lt;report format=&quot;frames&quot; todir=&quot;./report/html&quot;/&gt;
&lt;/junitreport&gt;</pre>

<p>would generate a <samp>TESTS-TestSuites.xml</samp> file in the directory <samp>reports</samp> and
generate the default framed report in the directory <samp>report/html</samp>.</p>
<p>This example requires a file called <samp>junitreport/junit-frames.xsl</samp>. The XSL
parameters <q>key1</q> and <q>key2</q> will be passed to the XSL transformation.</p>

<h3>Example of report with XSL params</h3>
<pre>
&lt;junitreport todir="${outputdir}"&gt;
&lt;fileset dir="${jrdir}"&gt;
@@ -203,8 +206,5 @@ generate the default framed report in the directory <samp>report/html</samp>.</p
&lt;/report&gt;
&lt;/junitreport&gt;</pre>

<p>This example requires a file called <samp>junitreport/junit-frames.xsl</samp>. The XSL
parameters <q>key1</q> and <q>key2</q> will be passed to the XSL transformation.</p>

</body>
</html>

+ 6
- 6
manual/Tasks/length.html View File

@@ -100,27 +100,27 @@ collection</a>s.</p>

<h3>Examples</h3>

<p>Store the length of the string <q>foo</q> in the property named <code>length.foo</code>.</p>
<pre>&lt;length string=&quot;foo&quot; property=&quot;length.foo&quot;/&gt;</pre>
<p>Stores the length of the string <q>foo</q> in the property named <code>length.foo</code>.</p>

<p>Store the length of file <samp>bar</samp> in the property named <code>length.bar</code>.</p>
<pre>&lt;length file=&quot;bar&quot; property=&quot;length.bar&quot;/&gt;</pre>
<p>Stores the length of file <samp>bar</samp> in the property named <code>length.bar</code>.</p>

<p>Store the file paths of <samp>foo</samp> and <samp>bar</samp> and their length into the
property <code>length</code>.</p>
<pre>
&lt;length property=&quot;length&quot; mode=&quot;each&quot;&gt;
&lt;fileset dir=&quot;.&quot; includes=&quot;foo,bar&quot;/&gt;
&lt;/length&gt;
</pre>
<p>Writes the file paths of <samp>foo</samp> and <samp>bar</samp> and their length into the
property <code>length</code>.</p>

<p>Add the length of <samp>foo</samp> and <samp>bar</samp> and store the result in
property <code>length</code>.</p>
<pre>
&lt;length property=&quot;length&quot; mode=&quot;all&quot;&gt;
&lt;fileset dir=&quot;.&quot; includes=&quot;foo,bar&quot;/&gt;
&lt;/length&gt;
</pre>
<p>Adds the length of <samp>foo</samp> and <samp>bar</samp> and stores the result in
property <code>length</code>.</p>

</body>
</html>

+ 10
- 8
manual/Tasks/loadfile.html View File

@@ -71,28 +71,32 @@ is not set.</p>
<p>The LoadFile task supports nested <a href="../Types/filterchain.html">FilterChain</a>s.</p>

<h3>Examples</h3>
<p>Load file <samp>message.txt</samp> into property <code>message</code>;
an <code>&lt;echo&gt;</code> can print this.</p>
<pre>
&lt;loadfile property="message"
srcFile="message.txt"/&gt;</pre>
<p>Load file message.txt into property <code>message</code>; an <code>&lt;echo&gt;</code> can print
this. This is identical to</p>
<p>The above is identical to</p>
<pre>
&lt;loadresource property="message"&gt;
&lt;file file="message.txt"/&gt;
&lt;/loadresource&gt;</pre>

<p>Load a file using the Latin-1 encoding</p>
<pre>
&lt;loadfile property="encoded-file"
srcFile="loadfile.xml"
encoding="ISO-8859-1"/&gt;</pre>
<p>Load a file using the Latin-1 encoding</p>

<p>Load a file, don't fail if it is missing (a message is printed, though)</p>
<pre>
&lt;loadfile property="optional.value"
srcFile="optional.txt"
failonerror="false"/&gt;</pre>
<p>Load a file, don't fail if it is missing (a message is printed, though)</p>

<p>Load a property which can be used as a parameter for another task (in this
case <code>mail</code>), merging lines to ensure this happens.</p>
<pre>
&lt;loadfile property="mail.recipients"
srcFile="recipientlist.txt"&gt;
@@ -100,9 +104,9 @@ this. This is identical to</p>
&lt;<a href="../Types/filterchain.html#striplinebreaks">striplinebreaks</a>/&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;</pre>
<p>Load a property which can be used as a parameter for another task (in this
case <code>mail</code>), merging lines to ensure this happens.</p>

<p>Load an XML file into a property, expanding all properties declared in the file in the
process.</p>
<pre>
&lt;loadfile property="system.configuration.xml"
srcFile="configuration.xml"&gt;
@@ -110,8 +114,6 @@ case <code>mail</code>), merging lines to ensure this happens.</p>
&lt;<a href="../Types/filterchain.html#expandproperties">expandproperties</a>/&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;</pre>
<p>Load an XML file into a property, expanding all properties declared in the file in the
process.</p>

</body>
</html>

+ 6
- 5
manual/Tasks/loadproperties.html View File

@@ -96,14 +96,17 @@ resource collection</h4>
<p>for use with the <var>resource</var> attribute.</p>

<h3>Examples</h3>

<p>Load contents of <samp>file.properties</samp> as Ant properties.</p>
<pre>&lt;loadproperties srcFile="file.properties"/&gt;</pre>
<p>or</p>
<pre>
&lt;loadproperties&gt;
&lt;file file="file.properties"/&gt;
&lt;/loadproperties&gt;</pre>
<p>Load contents of file.properties as Ant properties.</p>

<p>Read the lines that contain the string <q>import.</q> from the file <samp>file.properties</samp>
and load them as Ant properties.</p>
<pre>
&lt;loadproperties srcFile="file.properties"&gt;
&lt;filterchain&gt;
@@ -112,17 +115,15 @@ resource collection</h4>
&lt;/linecontains&gt;
&lt;/filterchain&gt;
&lt;/loadproperties&gt;</pre>
<p>Read the lines that contain the string <q>import.</q> from the file <samp>file.properties</samp>
and load them as Ant properties.</p>

<p>Load contents of <samp>http://example.org/url.properties.gz</samp>, uncompress it on the fly and
load the contents as Ant properties.</p>
<pre>
&lt;loadproperties&gt;
&lt;<a href="../Types/resources.html#gzipresource">gzipresource</a>&gt;
&lt;<a href="../Types/resources.html#url">url</a> url="http://example.org/url.properties.gz"/&gt;
&lt;/gzipresource&gt;
&lt;/loadproperties&gt;</pre>
<p>Load contents of <samp>http://example.org/url.properties.gz</samp>, uncompress it on the fly and
load the contents as Ant properties.</p>

</body>
</html>

+ 3
- 2
manual/Tasks/loadresource.html View File

@@ -70,12 +70,13 @@ the property is not set.</p>
<p>The LoadResource task supports nested <a href="../Types/filterchain.html">FilterChain</a>s.</p>

<h3>Examples</h3>

<p>Load the entry point of Ant's homepage into property <code>homepage</code>;
an <code>&lt;echo&gt;</code> can print this.</p>
<pre>
&lt;loadresource property="homepage"&gt;
&lt;url url="http://ant.apache.org/index.html"/&gt;
&lt;/loadresource&gt;</pre>
<p>Load the entry point of Ant's homepage into property <code>homepage</code>;
an <code>&lt;echo&gt;</code> can print this.</p>

<p>For more examples see the <a href="loadfile.html">loadfile</a> task.</p>



+ 11
- 11
manual/Tasks/mail.html View File

@@ -274,14 +274,21 @@ or more nested header elements:</p>

<h3>Examples</h3>

<p>Send an email from <q>me</q> to <q>you</q> with a subject of <q>Results of nightly build</q> and
include the contents of the file <samp>build.log</samp> in the body of the message.</p>

<pre>
&lt;mail from=&quot;me&quot;
tolist=&quot;you&quot;
subject=&quot;Results of nightly build&quot;
files=&quot;build.log&quot;/&gt;</pre>

<p>Sends an email from <q>me</q> to <q>you</q> with a subject of <q>Results of nightly build</q> and
includes the contents of the file <samp>build.log</samp> in the body of the message.</p>
<p>Send an email from <q>config@myisp.com</q> to <q>all@xyz.com</q> with a subject of <q>Test
Build</q>. Replies to this email will go to <q>me@myisp.com</q>. Any zip files from
the <samp>dist</samp> directory are attached. The task will attempt to use JavaMail and fall back to
UU encoding or no encoding in that order depending on what support classes are
available. <samp>${buildname}</samp> will be replaced with the <code>buildname</code> property's
value.</p>

<pre>
&lt;mail mailhost=&quot;smtp.myisp.com&quot; mailport=&quot;1025&quot; subject=&quot;Test build&quot;&gt;
@@ -296,12 +303,8 @@ includes the contents of the file <samp>build.log</samp> in the body of the mess
&lt;/attachments&gt;
&lt;/mail&gt;</pre>

<p>Sends an eMail from <q>config@myisp.com</q> to <q>all@xyz.com</q> with a subject of <q>Test
Build</q>. Replies to this email will go to <q>me@myisp.com</q>. Any zip files from
the <samp>dist</samp> directory are attached. The task will attempt to use JavaMail and fall back to
UU encoding or no encoding in that order depending on what support classes are
available. <samp>${buildname}</samp> will be replaced with the <code>buildname</code> property's
value.</p>
<p>Send an email from <q>me@myisp.com</q> to <q>all@xyz.com</q> with a subject of <q>Test Build</q>,
the message body being coded in UTF-8.

<pre>
&lt;property name=&quot;line2&quot; value=&quot;some_international_message&quot;/&gt;
@@ -313,8 +316,5 @@ value.</p>
&lt;message&gt;some international text:${line2}&lt;/message&gt;
&lt;/mail&gt;</pre>

<p>Sends an eMail from <q>me@myisp.com</q> to <q>all@xyz.com</q> with a subject of <q>Test
Build</q>, the message body being coded in UTF-8.

</body>
</html>

+ 7
- 4
manual/Tasks/makeurl.html View File

@@ -71,14 +71,17 @@ them.</p>
<h4><strong>path</strong> (org.apache.tools.ant.types.Path)</h4>

<p>Add a path to the URL. All elements in the path will be converted to individual URL entries.</p>

<h3>Examples</h3>
<pre>&lt;makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/&gt;</pre>
<p>Sets the property <code>m2.repository.url</code> to the file: URL of the local Maven2
<p>Set the property <code>m2.repository.url</code> to the file: URL of the local Maven2
repository.</p>
<pre>&lt;makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/&gt;</pre>

<p>Set the property <code>codebase</code> to the three URLs of the files provided as nested
elements.</p>
<pre>&lt;makeurl property="codebase"&gt;
&lt;fileset dir="lib includes="*.jar"/&gt;
&lt;/makeurl&gt;</pre>
<p>Set the property <code>codebase</code> to the three URLs of the files provided as nested
elements.</p>
</body>
</html>

+ 7
- 7
manual/Tasks/manifest.html View File

@@ -131,6 +131,13 @@ sections.</p>

<h3>Examples</h3>

<p>Create or replace the file <samp>MANIFEST.MF</samp>. Note that the <code>Built-By</code>
attribute will take the value of the Ant property <code>${user.name}</code>. The same is true for
the <code>${version}</code> and <code>${TODAY}</code> properties. This example produces
a <samp>MANIFEST.MF</samp> that
contains <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp90779"
target="_top">package version identification</a> for the package <samp>common</samp>.</p>

<pre>
&lt;manifest file=&quot;MANIFEST.MF&quot;&gt;
&lt;attribute name=&quot;Built-By&quot; value=&quot;${user.name}&quot;/&gt;
@@ -147,13 +154,6 @@ sections.</p>
&lt;/section&gt;
&lt;/manifest&gt;</pre>

<p>Creates or replaces the file <samp>MANIFEST.MF</samp>. Note that the <code>Built-By</code>
attribute will take the value of the Ant property <code>${user.name}</code>. The same is true for
the <code>${version}</code> and <code>${TODAY}</code> properties. This example produces
a <samp>MANIFEST.MF</samp> that
contains <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp90779"
target="_top">package version identification</a> for the package <samp>common</samp>.</p>

<p>The manifest produced by the above would look like this:</p>

<pre>


+ 6
- 4
manual/Tasks/manifestclasspath.html View File

@@ -84,15 +84,17 @@ a path defined elsewhere using the <code>&lt;classpath refid=&quot;pathid&quot;/
This classpath must not be empty, and is required.</p>

<h3>Examples</h3>

<p>Assuming a path with <var>id</var>=<q>classpath</q> was already defined, convert this path
relatively to the <samp>build/</samp> directory that will contain <samp>acme.jar</samp>, which can
later be created with <code>&lt;jar&gt;</code> with a nested <code>&lt;manifest&gt;</code> element
that lists an <code>&lt;attribute name="Class-Path" value="${jar.classpath}"/&gt;</code>.</p>

<pre>
&lt;manifestclasspath property="jar.classpath"
jarfile="build/acme.jar"&gt;
&lt;classpath refid="classpath"/&gt;
&lt;/manifestclasspath&gt;</pre>
<p>Assuming a path with <var>id</var> <q>classpath</q> was already defined, convert this path
relatively to the <samp>build/</samp> directory that will contain <samp>acme.jar</samp>, which can
later be created with <code>&lt;jar&gt;</code> with a nested <code>&lt;manifest&gt;</code> element
that lists an <code>&lt;attribute name="Class-Path" value="${jar.classpath}"/&gt;</code>.</p>

</body>
</html>

+ 3
- 2
manual/Tasks/mimemail.html View File

@@ -92,11 +92,12 @@ Activation Framework</a> are required for this task.</p>
</tr>
</table>
<h3>Examples</h3>
<p><strong>Send a single HTML file as the body of a message</strong></p>
<p>Send a single HTML file as the body of a message</p>
<pre>
&lt;mimemail messageMimeType=&quot;text/html&quot; messageFile=&quot;overview-summary.html&quot;
tolist=&quot;you&quot; subject=&quot;JUnit Test Results: ${TODAY}&quot; from=&quot;me&quot;/&gt;</pre>
<p><strong>Sends all files in a directory as attachments</strong></p>

<p>Send all files in a directory as attachments</p>
<pre>
&lt;mimemail message=&quot;See attached files&quot; tolist=&quot;you&quot; subject=&quot;Attachments&quot; from=&quot;me&quot;&gt;
&lt;fileset dir=&quot;.&quot;&gt;


+ 5
- 2
manual/Tasks/mkdir.html View File

@@ -41,11 +41,14 @@ nothing if the directory already exist.</p>
<td>Yes</td>
</tr>
</table>

<h3>Examples</h3>

<p>Create a directory <code>${dist}</code>.</p>
<pre>&lt;mkdir dir=&quot;${dist}&quot;/&gt;</pre>
<p>creates a directory <code>${dist}</code>.</p>

<p>Create a directory <code>${dist}/lib</code>.</p>
<pre>&lt;mkdir dir=&quot;${dist}/lib&quot;/&gt;</pre>
<p>creates a directory <code>${dist}/lib</code>.</p>

</body>
</html>

+ 11
- 7
manual/Tasks/move.html View File

@@ -169,18 +169,21 @@ the same <code>&lt;move&gt;</code> task, all <code>&lt;filterchain&gt;</code> el
first followed by <code>&lt;filterset&gt;</code> elements.</p>

<h3>Examples</h3>
<p><strong>Move a single file (rename a file)</strong></p>
<p>Move a single file (rename a file)</p>
<pre>&lt;move file=&quot;file.orig&quot; tofile=&quot;file.moved&quot;/&gt;</pre>
<p><strong>Move a single file to a directory</strong></p>

<p>Move a single file to a directory</p>
<pre>&lt;move file=&quot;file.orig&quot; todir=&quot;dir/to/move/to&quot;/&gt;</pre>
<p><strong>Move a directory to a new directory</strong></p>

<p>Move a directory to a new directory</p>
<pre>
&lt;move todir=&quot;new/dir/to/move/to&quot;&gt;
&lt;fileset dir=&quot;src/dir&quot;/&gt;
&lt;/move&gt;</pre>
<p>or, <em>since Ant 1.6.3</em>:</p>
<pre>&lt;move file=&quot;src/dir&quot; tofile=&quot;new/dir/to/move/to&quot;/&gt;</pre>
<p><strong>Move a set of files to a new directory</strong></p>

<p>Move a set of files to a new directory</p>
<pre>
&lt;move todir=&quot;some/new/dir&quot;&gt;
&lt;fileset dir=&quot;my/src/dir&quot;&gt;
@@ -188,7 +191,8 @@ first followed by <code>&lt;filterset&gt;</code> elements.</p>
&lt;exclude name=&quot;**/ant.jar&quot;/&gt;
&lt;/fileset&gt;
&lt;/move&gt;</pre>
<p><strong>Move a list of files to a new directory</strong></p>

<p>Move a list of files to a new directory</p>
<pre>
&lt;move todir=&quot;some/new/dir&quot;&gt;
&lt;filelist dir=&quot;my/src/dir&quot;&gt;
@@ -196,8 +200,8 @@ first followed by <code>&lt;filterset&gt;</code> elements.</p>
&lt;file name="file2.txt"/&gt;
&lt;/filelist&gt;
&lt;/move&gt;</pre>
<p><strong>Append <code>&quot;.bak&quot;</code> to the names of all files in a
directory.</strong></p>
<p>Append <code>&quot;.bak&quot;</code> to the names of all files in a directory.</p>
<pre>
&lt;move todir=&quot;my/src/dir&quot; includeemptydirs=&quot;false&quot;&gt;
&lt;fileset dir=&quot;my/src/dir&quot;&gt;


+ 5
- 7
manual/Tasks/native2ascii.html View File

@@ -174,21 +174,19 @@ element of that type can be used as an alternative to the <var>implementation</v

<h3>Examples</h3>

<p>Convert all files in the directory <samp>srcdir</samp> ending in <samp>.eucjis</samp> from the
EUCJIS encoding to ASCII and rename them to end in <samp>.java</samp>.</p>
<pre>
&lt;native2ascii encoding=&quot;EUCJIS&quot; src=&quot;srcdir&quot; dest=&quot;srcdir&quot;
includes=&quot;**/*.eucjis&quot; ext=&quot;.java&quot;/&gt;</pre>

<p>Converts all files in the directory <samp>srcdir</samp> ending in <samp>.eucjis</samp> from the
EUCJIS encoding to ASCII and renames them to end in <samp>.java</samp>.</p>
<p>Convert all the files ending in <samp>.java</samp> in the directory <samp>native/japanese</samp>
to ASCII, placing the results in the directory <samp>src</samp>. The names of the files remain the
same.</p>
<pre>
&lt;native2ascii encoding=&quot;EUCJIS&quot; src=&quot;native/japanese&quot; dest=&quot;src&quot;
includes=&quot;**/*.java&quot;/&gt;</pre>

<p>Converts all the files ending in <samp>.java</samp> in the directory <samp>native/japanese</samp>
to ASCII, placing the results in the directory <samp>src</samp>. The names of the files remain the
same.</p>

<p>If you want to use a
custom <code class="code">Native2AsciiAdapter</code> <code>org.example.MyAdapter</code> you can
either use the implementation attribute:</p>


+ 8
- 4
manual/Tasks/nice.html View File

@@ -47,15 +47,19 @@
<td>No</td>
</tr>
</table>

<h3>Examples</h3>
<pre>&lt;nice newpriority=&quot;10&quot;/&gt;</pre>
<p>Set the Thread priority to 10 (highest).</p>
<pre>&lt;nice currentpriority=&quot;priority&quot;/&gt;</pre>
<pre>&lt;nice newpriority=&quot;10&quot;/&gt;</pre>

<p>Store the current Thread priority in the user property <code>priority</code>.</p>
<pre>&lt;nice currentpriority=&quot;currentpriority&quot; newpriority=&quot;1&quot;/&gt;</pre>
<pre>&lt;nice currentpriority=&quot;priority&quot;/&gt;</pre>

<p>Set the current Thread priority to 1 (lowest), storing the original priority in the user
property <code>currentpriority</code>. This can be used to set the priority back to its original
property <code>currentpriority</code>. This can be used to set the priority back to its original
value later.</p>
<pre>&lt;nice currentpriority=&quot;currentpriority&quot; newpriority=&quot;1&quot;/&gt;</pre>

</body>
</html>

+ 3
- 2
manual/Tasks/pack.html View File

@@ -64,12 +64,13 @@ See <a href="../install.html#librarydependencies">Library Dependencies</a> for m
<pre>&lt;gzip src=&quot;test.tar&quot; destfile=&quot;test.tar.gz&quot;/&gt;</pre>
<pre>&lt;bzip2 src=&quot;test.tar&quot; destfile=&quot;test.tar.bz2&quot;/&gt;</pre>
<pre>&lt;xz src=&quot;test.tar&quot; destfile=&quot;test.tar.xz&quot;/&gt;</pre>

<p>Download <samp>http://example.org/archive.tar</samp> and compress it
to <samp>archive.tar.gz</samp> in the project's <var>basedir</var> on the fly.</p>
<pre>
&lt;gzip destfile=&quot;archive.tar.gz&quot;&gt;
&lt;url url="http://example.org/archive.tar"/&gt;
&lt;/gzip&gt;</pre>
<p>downloads <samp>http://example.org/archive.tar</samp> and compresses it
to <samp>archive.tar.gz</samp> in the project's <var>basedir</var> on the fly.</p>

</body>
</html>

+ 24
- 23
manual/Tasks/parallel.html View File

@@ -136,6 +136,16 @@ reported.</p>
from Ant. By using <code>&lt;daemons&gt;</code> such servers do not halt the build.</p>

<h3>Examples</h3>
<p>This is a typical pattern for testing a server application. In one thread the server is started
(the <code>&lt;wlrun&gt;</code> task). The other thread consists of a three tasks which are
performed in sequence. The <code>&lt;sleep&gt;</code> task is used to give the server time to come
up. Another task which is capable of validating that the server is available could be used in place
of the <code>&lt;sleep&gt;</code> task. The <code>&lt;junit&gt;</code> test harness then runs, again
in its own JVM. Once the tests are complete, the server is stopped
(using <code>&lt;wlstop&gt;</code> in this example), allowing both threads to
complete. The <code>&lt;parallel&gt;</code> task will also complete at this time and the build will
then continue.</p>

<pre>
&lt;parallel&gt;
&lt;wlrun ... &gt;
@@ -145,15 +155,14 @@ from Ant. By using <code>&lt;daemons&gt;</code> such servers do not halt the bui
&lt;wlstop/&gt;
&lt;/sequential&gt;
&lt;/parallel&gt;</pre>
<p>This example represents a typical pattern for testing a server application. In one thread the
server is started (the <code>&lt;wlrun&gt;</code> task). The other thread consists of a three tasks
which are performed in sequence. The <code>&lt;sleep&gt;</code> task is used to give the server time
to come up. Another task which is capable of validating that the server is available could be used
in place of the <code>&lt;sleep&gt;</code> task. The <code>&lt;junit&gt;</code> test harness then
runs, again in its own JVM. Once the tests are complete, the server is stopped
(using <code>&lt;wlstop&gt;</code> in this example), allowing both threads to complete. The
<code>&lt;parallel&gt;</code> task will also complete at this time and the build will then
continue.</p>

<p>Here, two independent tasks run to achieve better resource utilization during the build. In this
instance, some servlets are being compiled in one thread and a set of JSPs is being precompiled in
another. Developers need to be careful that the two tasks are independent, both in terms of their
dependencies and in terms of their potential interactions in Ant's external environment. Here we
set <var>fork</var>=<q>true</q> for the <code>&lt;javac&gt;</code> task, so that it runs in a new
process; if the <code>&lt;wljspc&gt;</code> task used the <kbd>javac</kbd> compiler in-VM (it may),
concurrency problems may arise.</p>

<pre>
&lt;parallel&gt;
@@ -161,13 +170,12 @@ continue.</p>
&lt;wljspc ...&gt; &lt;!-- precompile JSPs --&gt;
&lt;/parallel&gt;</pre>

<p>This example shows two independent tasks being run to achieve better resource utilization during
the build. In this instance, some servlets are being compiled in one thread and a set of JSPs is
being precompiled in another. Developers need to be careful that the two tasks are independent, both
in terms of their dependencies and in terms of their potential interactions in Ant's external
environment. Here we set <var>fork</var>=<q>true</q> for the <code>&lt;javac&gt;</code> task, so
that it runs in a new process; if the <code>&lt;wljspc&gt;</code> task used the <kbd>javac</kbd>
compiler in-VM (it may), concurrency problems may arise.</p>
<p>This example represents a typical need for use of the <var>threadCount</var>
and <var>threadsPerProcessor</var> attributes. Spinning up all 40 of those tasks could cripple the
system for memory and CPU time. By limiting the number of concurrent executions you can reduce
contention for CPU, memory and disk IO, and so actually finish faster. This is also a good candidate
for use of <var>threadCount</var> (and possibly <var>threadsPerProcessor</var>) because each task is
independent (every new JVM is forked) and has no dependencies on the other tasks.</p>

<pre>
&lt;macrodef name="dbpurge"&gt;
@@ -191,12 +199,5 @@ compiler in-VM (it may), concurrency problems may arise.</p>
&lt;!-- repeated about 40 times --&gt;
&lt;/parallel&gt;</pre>

<p>This example represents a typical need for use of the <var>threadCount</var>
and <var>threadsPerProcessor</var> attributes. Spinning up all 40 of those tasks could cripple the
system for memory and CPU time. By limiting the number of concurrent executions you can reduce
contention for CPU, memory and disk IO, and so actually finish faster. This is also a good
candidate for use of <var>threadCount</var> (and possibly <var>threadsPerProcessor</var>) because
each task is independent (every new JVM is forked) and has no dependencies on the other tasks.</p>

</body>
</html>

+ 7
- 5
manual/Tasks/patch.html View File

@@ -88,16 +88,18 @@
</tr>
</table>
<h3>Examples</h3>
<pre>&lt;patch patchfile=&quot;module.1.0-1.1.patch&quot;/&gt;</pre>
<p>applies the diff included in <samp>module.1.0-1.1.patch</samp> to the files in base directory
<p>Apply the diff included in <samp>module.1.0-1.1.patch</samp> to the files in base directory
guessing the filename(s) from the diff output.</p>
<pre>&lt;patch patchfile=&quot;module.1.0-1.1.patch&quot;/&gt;</pre>

<p>Here, one leading directory part will be removed:</p>
<pre>&lt;patch patchfile=&quot;module.1.0-1.1.patch&quot; strip=&quot;1&quot;/&gt;</pre>
<p>like above but one leading directory part will be removed. i.e. if the diff output looked
like</p>
<p>i.e. if the diff output looked like</p>
<pre>
--- a/mod1.0/A Mon Jun 5 17:28:41 2000
+++ a/mod1.1/A Mon Jun 5 17:28:49 2000</pre>
the leading <samp>a/</samp> will be stripped.
<p>the leading <samp>a/</samp> will be stripped.</p>

</body>
</html>

+ 8
- 6
manual/Tasks/pathconvert.html View File

@@ -126,6 +126,7 @@ specified to perform any of various filename transformations (<em>since Ant 1.6.
value <samp>d:\weblogic</samp>, and <samp>${wl.home.unix}</samp> has the
value <samp>/weblogic</samp>.</p>
<h4>Example 1</h4>
<p>Here, the task</p>
<pre>
&lt;path id="wl.path"&gt;
&lt;pathelement location=&quot;${wl.home}/lib/weblogicaux.jar&quot;/&gt;
@@ -157,23 +158,24 @@ named <code>wl.path.unix</code>.</p>
<pre class="output">/usr/local/ant/lib/njavac.jar:/usr/local/ant/lib/xproperty.jar</pre>

<h4>Example 3</h4>
<p>Here, the names of files determined by the fileset (all files ending in <samp>.java</samp>) are
joined separated by comma, and the resulting list is placed into the
property <code>javafiles</code>. The directory separator is not specified, so it defaults to the
appropriate character for the current platform. Such a list could then be used in another task,
like <code>javadoc</code>, that requires a comma separated list of files.</p>
<pre>
&lt;fileset dir=&quot;${src.dir}&quot; id=&quot;src.files&quot;&gt;
&lt;include name=&quot;**/*.java&quot;/&gt;
&lt;/fileset&gt;

&lt;pathconvert pathsep=&quot;,&quot; property=&quot;javafiles&quot; refid=&quot;src.files&quot;/&gt;</pre>
<p>This example takes the set of files determined by the fileset (all files ending
in <samp>.java</samp>), joins them together separated by commas, and places the resulting list into
the property <code>javafiles</code>. The directory separator is not specified, so it defaults to
the appropriate character for the current platform. Such a list could then be used in another task,
like <code>javadoc</code>, that requires a comma separated list of files.</p>

<h4>Example 4</h4>
<p>This task sets the property <code>prop</code> to <q>def|ghi</q> on Windows and on Unix.</p>
<pre>
&lt;pathconvert property="prop" dirsep="|"&gt;
&lt;map from="${basedir}/abc/" to=&quot;&quot;/&gt;
&lt;path location="abc/def/ghi"/&gt;
&lt;/pathconvert&gt;</pre>
<p>This example sets the property <code>prop</code> to <q>def|ghi</q> on Windows and on Unix.</p>
</body>
</html>

+ 18
- 19
manual/Tasks/property.html View File

@@ -205,57 +205,56 @@ a <a href="../using.html#path">path-like structure</a> and can also be set via a
nested <code>classpath</code> element.</p>

<h3>Examples</h3>
<p>Set the property <code>foo.dist</code> to the value <q>dist</q>.</p>
<pre>&lt;property name=&quot;foo.dist&quot; value=&quot;dist&quot;/&gt;</pre>
<p>sets the property <code>foo.dist</code> to the value <q>dist</q>.</p>

<p>Set the property <code>foo.dist</code> to the value <q>dist</q>.</p>
<pre>&lt;property name=&quot;foo.dist&quot;&gt;dist&lt;/property&gt;</pre>
<p>sets the property <code>foo.dist</code> to the value <q>dist</q>.</p>

<p>Read a set of properties from a file called <samp>foo.properties</samp>.</p>
<pre>&lt;property file=&quot;foo.properties&quot;/&gt;</pre>
<p>reads a set of properties from a file called <samp>foo.properties</samp>.</p>

<pre>&lt;property url=&quot;http://www.mysite.com/bla/props/foo.properties&quot;/&gt;</pre>
<p>reads a set of properties from the
<p>Read a set of properties from the
address <samp>http://www.mysite.com/bla/props/foo.properties</samp>.</p>
<pre>&lt;property url=&quot;http://www.mysite.com/bla/props/foo.properties&quot;/&gt;</pre>

<p>Read a set of properties from a resource called <samp>foo.properties</samp>.</p>
<pre>&lt;property resource=&quot;foo.properties&quot;/&gt;</pre>
<p>reads a set of properties from a resource called <samp>foo.properties</samp>.</p>
<p>Note that you can reference a global properties file for all of your Ant builds using the
following:</p>

<pre>&lt;property file=&quot;${user.home}/.ant-global.properties&quot;/&gt;</pre>
<p>since the <code>user.home</code> property is defined by JVM to be your home directory. Where
<p>since the <code>user.home</code> property is defined by JVM to be your home directory. Where
the <code>user.home</code> property resolves to in the file system depends on the operating system
version and the JVM implementation. On Unix based systems, this will map to the user's home
directory. On modern Windows variants, this will most likely resolve to the user's directory in
the <samp>Documents and Settings</samp> or <samp>Users</samp> folder. Older Windows variants such as
Windows 98/ME are less predictable, as are other operating system/JVM combinations.</p>

<p>Read the system environment variables and stores them in properties, prefixed
with <q>env</q>. Note that this only works on <em>select</em> operating systems. Two of the values
are shown being echoed.</p>
<pre>
&lt;property environment=&quot;env&quot;/&gt;
&lt;echo message=&quot;Number of Processors = ${env.NUMBER_OF_PROCESSORS}&quot;/&gt;
&lt;echo message=&quot;ANT_HOME is set to = ${env.ANT_HOME}&quot;/&gt;</pre>
<p>reads the system environment variables and stores them in properties, prefixed with <q>env</q>.
Note that this only works on <em>select</em> operating systems. Two of the values are shown being
echoed.
</p>

<pre>
&lt;property environment=&quot;env&quot;/&gt;
&lt;property file=&quot;${user.name}.properties&quot;/&gt;
&lt;property file=&quot;${env.STAGE}.properties&quot;/&gt;
&lt;property file=&quot;build.properties&quot;/&gt;</pre>
<p>This buildfile uses the properties defined in <samp>build.properties</samp>. Regarding to the
environment variable <code>STAGE</code> some or all values could be overwritten,
e.g. having <code>STAGE=test</code> and a <samp>test.properties</samp> you have special values for
that (like another name for the test server). Finally all these values could be overwritten by
personal settings with a file per user.</p>
<pre>
&lt;property environment=&quot;env&quot;/&gt;
&lt;property file=&quot;${user.name}.properties&quot;/&gt;
&lt;property file=&quot;${env.STAGE}.properties&quot;/&gt;
&lt;property file=&quot;build.properties&quot;/&gt;</pre>

<p>Store the relative path in <code>foo</code>: <samp>../my/file.txt</samp></p>
<pre>&lt;property name=&quot;foo&quot; location=&quot;my/file.txt&quot; relative=&quot;true&quot; basedir=&quot;..&quot;/&gt;</pre>
<p>Stores the relative path in <code>foo</code>: <samp>../my/file.txt</samp></p>

<p>Store the relative path in <code>foo</code>: <samp>cvs/my/file.txt</samp></p>
<pre>&lt;property name=&quot;foo&quot; location=&quot;my/file.txt&quot; relative=&quot;true&quot; basedir=&quot;cvs&quot;/&gt;</pre>
<p>Stores the relative path in <code>foo</code>: <samp>cvs/my/file.txt</samp></p>

<h3>Property files</h3>



+ 3
- 2
manual/Tasks/rename.html View File

@@ -53,11 +53,12 @@
</tr>
</table>
<h3>Examples</h3>
<pre>&lt;rename src=&quot;foo.jar&quot; dest=&quot;${name}-${version}.jar&quot;/&gt;</pre>
<p>Renames the file <samp>foo.jar</samp> to <samp>${name}-${version}.jar</samp>
<p>Rename the file <samp>foo.jar</samp> to <samp>${name}-${version}.jar</samp>
(assuming <code>name</code> and <code>version</code> being predefined properties). If a file
named <samp>${name}-${version}.jar</samp> already exists, it will be removed prior to
renaming <samp>foo.jar</samp>.</p>
<pre>&lt;rename src=&quot;foo.jar&quot; dest=&quot;${name}-${version}.jar&quot;/&gt;</pre>

</body>
</html>

+ 4
- 4
manual/Tasks/replace.html View File

@@ -201,6 +201,10 @@ the <code>&lt;replace&gt;</code> attribute <var>value</var> and/or
the <code>&lt;replacevalue&gt;</code> element is used. If no value was specified using either of
these options, the token is replaced with an empty string.</p>
<h3>Examples</h3>
<p>In file <samp>configure.sh</samp>, replace all instances of <q>@token1@</q>
with <q>defaultvalue</q>, all instances of <q>@token2@</q> with <q>value2</q>, and all instances
of <q>@token3@</q> with the value of the property <code>property.key</code>, as it appears in
property file <samp>src/name.properties</samp>.</p>
<pre>
&lt;replace file=&quot;configure.sh&quot;
value=&quot;defaultvalue&quot;
@@ -215,10 +219,6 @@ these options, the token is replaced with an empty string.</p>
&lt;replacevalue&gt;value4&lt;/replacevalue&gt;
&lt;/replacefilter&gt;
&lt;/replace&gt;</pre>
<p>In file <samp>configure.sh</samp>, replace all instances of <q>@token1@</q>
with <q>defaultvalue</q>, all instances of <q>@token2@</q> with <q>value2</q>, and all instances
of <q>@token3@</q> with the value of the property <code>property.key</code>, as it appears in
property file <samp>src/name.properties</samp>.</p>
<p><strong>Note</strong>: It is possible to use either
the <var>token</var>/<code>&lt;replacetoken&gt;</code>
and <var>value</var>/<code>&lt;replacevalue&gt;</code> attributes/elements, the


+ 10
- 12
manual/Tasks/replaceregexp.html View File

@@ -123,6 +123,9 @@ instance.</p>

<h3>Examples</h3>

<p>Replace occurrences of the property name <q>OldProperty</q> with <q>NewProperty</q> in a
properties file, preserving the existing value, in all files ending in <samp>.properties</samp> in
the current directory:</p>
<pre>
&lt;replaceregexp byline=&quot;true&quot;&gt;
&lt;regexp pattern=&quot;OldProperty=(.*)&quot;/&gt;
@@ -131,42 +134,37 @@ instance.</p>
&lt;include name=&quot;*.properties&quot;/&gt;
&lt;/fileset&gt;
&lt;/replaceregexp&gt;</pre>
<p>replaces occurrences of the property name <q>OldProperty</q> with <q>NewProperty</q> in a
properties file, preserving the existing value, in all files ending in <samp>.properties</samp> in
the current directory</p>

<p>Replace all whitespaces (blanks, tabs, etc) by one blank remaining the line separator:</p>
<pre>
&lt;replaceregexp match="\s+" replace=" " flags="g" byline="true"&gt;
&lt;fileset dir="${html.dir}" includes="**/*.html"/&gt;
&lt;/replaceregexp&gt;</pre>
<p>replaces all whitespaces (blanks, tabs, etc) by one blank remaining the line separator. So with
input</p>

<p>Then, input</p>
<pre>
&lt;html&gt; &lt;body&gt;
&lt;&lt;TAB&gt;&gt;&lt;h1&gt; T E S T &lt;/h1&gt; &lt;&lt;TAB&gt;&gt;
&lt;&lt;TAB&gt;&gt; &lt;/body&gt;&lt;/html&gt;</pre>
<p>would converted to</p>
<p>is converted to</p>
<pre>
&lt;html&gt; &lt;body&gt;
&lt;h1&gt; T E S T &lt;/h1&gt; &lt;/body&gt;&lt;/html&gt;</pre>

<br/><!-- small distance from code of the previous example -->

<p>The task</p>
<pre>
&lt;replaceregexp match="\\n" replace="${line.separator}" flags="g" byline="true"&gt;
&lt;fileset dir="${dir}"/&gt;
&lt;/replaceregexp&gt;</pre>
<p>replaces all <q>\n</q> markers (beware the quoting of the backslash) by a line break. So with
<p>replaces all <q>\n</q> markers (beware the quoting of the backslash) by a line break. Then,
input</p>
<pre>one\ntwo\nthree</pre>
<p>would converted to</p>
<p>is converted to</p>
<pre>
one
two
three</pre>

<p>Beware that inserting line breaks could break file syntax. For example in xml:</p>
<p>Beware that inserting line breaks could break file syntax. For example in XML:</p>
<pre>
&lt;root&gt;
&lt;text&gt;line breaks \n should work in text&lt;/text&gt;


+ 5
- 4
manual/Tasks/resourcecount.html View File

@@ -74,13 +74,16 @@ a <code>condition</code>.</p>
via a nested element or the <var>refid</var> attribute.</p>

<h3>Examples</h3>
<p>Store the number of resources in the specified filelist (two files) in the property
named <samp>count.foo</samp>.</p>
<pre>
&lt;resourcecount property=&quot;count.foo&quot;&gt;
&lt;filelist dir=&quot;.&quot; files=&quot;foo,bar&quot;/&gt;
&lt;/resourcecount&gt;</pre>
<p>Stores the number of resources in the specified filelist (two) in the property
named <samp>count.foo</samp>.</p>

<p>Store the number of lines of the current buildfile in the
property <code>file.lines</code>. Requires Ant 1.7.1+ as <code>&lt;concat&gt;</code> has to be a
resource.</p>
<pre>
&lt;project&gt;
&lt;property name=&quot;file&quot; value=&quot;${ant.file}&quot;/&gt;
@@ -98,8 +101,6 @@ named <samp>count.foo</samp>.</p>
&lt;/resourcecount&gt;
&lt;echo&gt;The file '${file}' has ${file.lines} lines.&lt;/echo&gt;
&lt;/project&gt;</pre>
<p>Stores the number of lines of the current buildfile in the property <code>file.lines</code>.
Requires Ant 1.7.1+ as <code>&lt;concat&gt;</code> has to be a resource.</p>

</body>
</html>

+ 2
- 2
manual/Tasks/retry.html View File

@@ -51,12 +51,12 @@ a <code>BuildException</code> is thrown.</p>
<p>Any valid Ant task may be embedded within the retry task.</p>

<h3>Example</h3>
<p>This example shows how to use <code>&lt;retry&gt;</code> to wrap a task which must interact with
an unreliable network resource.</p>
<pre>
&lt;retry retrycount="3"&gt;
&lt;get src="http://www.unreliable-server.com/unreliable.tar.gz"
dest="/home/retry/unreliable.tar.gz"/&gt;
&lt;/retry&gt;</pre>
<p>This example shows how to use <code>&lt;retry&gt;</code> to wrap a task which must interact with
an unreliable network resource.</p>
</body>
</html>

+ 6
- 4
manual/Tasks/rmic.html View File

@@ -297,13 +297,15 @@ using one of the built-in compilers.</p>
can be used as an alternative to the <var>compiler</var> attribute.</p>

<h3>Examples</h3>
<pre>&lt;rmic classname=&quot;com.xyz.FooBar&quot; base=&quot;${build}/classes&quot;/&gt;</pre>
<p>runs the <kbd>rmic</kbd> compiler for the class <code>com.xyz.FooBar</code>. The compiled files
<p>Run the <kbd>rmic</kbd> compiler for the class <code>com.xyz.FooBar</code>. The compiled files
will be stored in the directory <samp>${build}/classes</samp>.</p>
<pre>&lt;rmic base=&quot;${build}/classes&quot; includes=&quot;**/Remote*.class&quot;/&gt;</pre>
<p>runs the <kbd>rmic</kbd> compiler for all classes with <samp>.class</samp> files
<pre>&lt;rmic classname=&quot;com.xyz.FooBar&quot; base=&quot;${build}/classes&quot;/&gt;</pre>

<p>Run the <kbd>rmic</kbd> compiler for all classes with <samp>.class</samp> files
below <samp>${build}/classes</samp> whose classname starts with <code>Remote</code>. The compiled
files will be stored in the directory <samp>${build}/classes</samp>.</p>
<pre>&lt;rmic base=&quot;${build}/classes&quot; includes=&quot;**/Remote*.class&quot;/&gt;</pre>

<p>If you want to use a custom RmicAdapter <code>org.example.MyAdapter</code> you can either use
the <var>compiler</var> attribute:</p>


+ 10
- 8
manual/Tasks/schemavalidate.html View File

@@ -216,11 +216,17 @@ properties</a>. Properties can be used to set the schema used to validate the XM
</table>

<h3>Examples</h3>
<p>Validate a document against an XML schema. The document does not declare any schema itself, which
is why the <var>noNamespaceFile</var> is needed.</p>
<pre>
&lt;schemavalidate noNamespaceFile="document.xsd"
file="xml/endpiece.xml"/&gt;</pre>
<p>Validate a document against an XML schema. The document does not declare any schema itself, which
is why the <var>noNamespaceFile</var> is needed.</p>

<p>Declare a new preset task, <code>&lt;validate-soap&gt;</code>, that validates XSD and WSDL
documents against the relevant specifications. To validate XSD documents, you also
need <samp>XMLSchema.dtd</samp> and <samp>datatypes.dtd</samp> in the same directory
as <samp>XMLSchema.xsd</samp>, or pointed to via the catalog. All these files can be fetched
from <a href="https://www.w3.org/2001/XMLSchema" target="_top">W3C</a>.</p>
<pre>
&lt;presetdef name="validate-soap"&gt;
&lt;schemavalidate&gt;
@@ -234,13 +240,9 @@ is why the <var>noNamespaceFile</var> is needed.</p>
file="${soap.dir}/XMLSchema.xsd"/&gt;
&lt;/schemavalidate&gt;
&lt;/presetdef&gt;</pre>
<p>Declare a new preset task, <code>&lt;validate-soap&gt;</code>, that validates XSD and WSDL
documents against the relevant specifications. To validate XSD documents, you also
need <samp>XMLSchema.dtd</samp> and <samp>datatypes.dtd</samp> in the same directory
as <samp>XMLSchema.xsd</samp>, or pointed to via the catalog. All these files can be fetched
from <a href="https://www.w3.org/2001/XMLSchema" target="_top">W3C</a>.</p>
<pre>&lt;validate-soap file="xml/test.xsd"/&gt;</pre>

<p>Use the preset task defined above to validate an XML Schema document.</p>
<pre>&lt;validate-soap file="xml/test.xsd"/&gt;</pre>

</body>
</html>

+ 12
- 9
manual/Tasks/scp.html View File

@@ -210,39 +210,41 @@ set.</p>
<p>Prior to Ant 1.9.7 only <code>&lt;fileset&gt;</code> has been supported as a nested element.</p>

<h3>Examples</h3>
<p><strong>Copy a single local file to a remote machine</strong></p>
<p>Copy a single local file to a remote machine:</p>
<pre>&lt;scp file=&quot;myfile.txt&quot; todir=&quot;user:password@somehost:/home/chuck&quot;/&gt;</pre>

<p><strong>Copy a single local file to a remote machine with separate <var>password</var>
attribute</strong></p>
<p>Copy a single local file to a remote machine with separate <var>password</var>
attribute:</p>
<pre>&lt;scp file=&quot;myfile.txt&quot; todir=&quot;user@somehost:/home/chuck&quot; password=&quot;password&quot;/&gt;</pre>

<p><strong>Copy a single local file to a remote machine using key base authentication.</strong></p>
<p>Copy a single local file to a remote machine using key base authentication:</p>
<pre>
&lt;scp file=&quot;myfile.txt&quot;
todir=&quot;user@somehost:/home/chuck&quot;
keyfile=&quot;${user.home}/.ssh/id_dsa&quot;
passphrase=&quot;my extremely secret passphrase&quot;/&gt;</pre>

<p><strong>Copy a single remote file to a local directory</strong></p>
<p>Copy a single remote file to a local directory:</p>
<pre>&lt;scp file=&quot;user:password@somehost:/home/chuck/myfile.txt&quot; todir=&quot;../some/other/dir&quot;/&gt;</pre>

<p><strong>Copy a remote directory to a local directory</strong></p>
<p>Copy a remote directory to a local directory:</p>
<pre>&lt;scp file=&quot;user:password@somehost:/home/chuck/*&quot; todir=&quot;/home/sara&quot;/&gt;</pre>

<p><strong>Copy a local directory to a remote directory</strong></p>
<p>Copy a local directory to a remote directory:</p>
<pre>
&lt;scp todir=&quot;user:password@somehost:/home/chuck/&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot;/&gt;
&lt;/scp&gt;</pre>
<p><strong>Copy a set of files to a directory</strong></p>

<p>Copy a set of files to a directory:</p>
<pre>
&lt;scp todir=&quot;user:password@somehost:/home/chuck&quot;&gt;
&lt;fileset dir=&quot;src_dir&quot;&gt;
&lt;include name=&quot;**/*.java&quot;/&gt;
&lt;/fileset&gt;
&lt;/scp&gt;</pre>
<p><strong>Copy a set of files to a remote directory in reverse last-modified order</strong></p>

<p>Copy a set of files to a remote directory in reverse last-modified order:</p>
<pre>
&lt;scp todir=&quot;user:password@somehost:/home/chuck&quot;&gt;
&lt;sort&gt;
@@ -259,6 +261,7 @@ attribute</strong></p>
can be a serious security hole. Consider using variable substitution and include the password on
the command line. For example:</p>
<pre>&lt;scp todir=&quot;${username}:${password}@host:/dir&quot; ...&gt;</pre>

<p>Invoking Ant with the following command line:</p>
<pre class="input">ant -Dusername=me -Dpassword=mypassword target1 target2</pre>
<p>is slightly better, but the username/password is exposed to all users on an Unix system (via


+ 10
- 12
manual/Tasks/script.html View File

@@ -183,10 +183,8 @@ file.</p>
&lt;/classpath&gt;
System.out.println("Hello world");
&lt;/script&gt;</pre>
<p>
The following script uses JavaScript to create a number of
<code>echo</code> tasks and execute them.
</p>
<p>The following script uses JavaScript to create a number of <code>echo</code> tasks and execute
them.</p>
<pre>
&lt;project name=&quot;squares&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt;
&lt;target name=&quot;main&quot;&gt;
@@ -267,17 +265,17 @@ of all files a <code>&lt;fileset/&gt;</code> caught.</p>
import. Rhino knows two different methods for import statements: one for packages and one for a
single class. By default only the <code>java</code> packages are available,
so <code class="code">java.lang.System</code> can be directly imported
with <code>importClass/importPackage</code>. For other packages you have to prefix the full
classified name with <strong>Packages</strong>. For example Ant's <code>FileUtils</code> class can
be imported
with <code>importClass</code>/<code>importPackage</code>. For other packages you have to prefix the
full classified name with <strong>Packages</strong>. For example
Ant's <code class="code">FileUtils</code> class can be imported
with <code class="code">importClass(<strong>Packages</strong>.org.apache.tools.ant.util.FileUtils)</code><br/>
The <code>&lt;script&gt;</code> task populates the Project instance under the
name <code>project</code>, so we can use that reference. Another way is to use its given name or
getting its reference from the task itself.<br/> The Project provides methods for accessing and
setting properties, creating DataTypes and Tasks and much more.<br/> After creating a FileSet
object we initialize that by calling its set-methods. Then we can use that object like a normal Ant
task (<code>&lt;copy&gt;</code> for example).<br/> For getting the size of a file we instantiate
a <code class="code">java.io.File</code>. So we are using normal Java API here.<br/> Finally we use
getting its reference from the task itself.<br/>The Project provides methods for accessing and
setting properties, creating DataTypes and Tasks and much more.<br/>After creating a FileSet object
we initialize that by calling its set-methods. Then we can use that object like a normal Ant task
(<code>&lt;copy&gt;</code> for example).<br/>For getting the size of a file we instantiate
a <code class="code">java.io.File</code>. So we are using normal Java API here.<br/>Finally we use
the <code>&lt;echo&gt;</code> task for producing the output. The task is not executed by
its <code class="code">execute()</code> method, because the <code class="code">perform()</code>
method (implemented in Task itself) does the appropriate logging before and after


+ 2
- 2
manual/Tasks/scriptdef.html View File

@@ -261,8 +261,8 @@ self.log("text: " +self.text)
&lt;s:echo&gt;nested text&lt;/s:echo&gt;
&lt;/target&gt;</pre>

<p>The next example shows the use of <code>&lt;classpath&gt;</code>
and <var>loaderref</var> to get access to the beanshell jar.</p>
<p>The next example shows the use of <code>&lt;classpath&gt;</code> and <var>loaderref</var> to get
access to the beanshell jar.</p>
<pre>
&lt;scriptdef name="b1" language="beanshell"
loaderref="beanshell-ref"&gt;


+ 3
- 2
manual/Tasks/sequential.html View File

@@ -34,6 +34,9 @@ execution of a subset of tasks within the <a href="parallel.html">parallel</a> t
from Ant tasks. Any valid Ant task may be embedded within the sequential task.</p>

<h3>Example</h3>

<p>This example shows how the <code>sequential</code> task is used to execute three tasks in
sequence, while another task is being executed in a separate thread.</p>
<pre>
&lt;parallel&gt;
&lt;wlrun ... &gt;
@@ -43,8 +46,6 @@ from Ant tasks. Any valid Ant task may be embedded within the sequential task.</
&lt;wlstop/&gt;
&lt;/sequential&gt;
&lt;/parallel&gt;</pre>
<p>This example shows how the <code>sequential</code> task is used to execute three tasks in
sequence, while another task is being executed in a separate thread.</p>

</body>
</html>

+ 6
- 3
manual/Tasks/setpermissions.html View File

@@ -79,18 +79,21 @@ different sets of permissions to apply to either type of resource.</p>
<h4>any resource collection</h4>
<p><a href="../Types/resources.html#collection">resource collections</a> are used to select groups
of resources.</p>

<h3>Examples</h3>

<p>Make the <samp>start.sh</samp> file readable and executable for anyone and in addition writable
by the owner.</p>
<pre>
&lt;setpermissions mode=&quot;755&quot;&gt;
&lt;file file=&quot;${dist}/start.sh&quot;/&gt;
&lt;/setpermissions&gt;</pre>
<p>makes the <samp>start.sh</samp> file readable and executable for anyone and in addition writable

<p>Make the <samp>start.sh</samp> file readable and executable for anyone and in addition writable
by the owner.</p>
<pre>
&lt;setpermissions permissions=&quot;OWNER_READ,OWNER_WRITE,OWNER_EXECUTE,OTHERS_READ,OTHERS_EXECUTE,GROUP_READ,GROUP_EXECUTE&quot;&gt;
&lt;file file=&quot;${dist}/start.sh&quot;/&gt;
&lt;/setpermissions&gt;</pre>
<p>makes the <samp>start.sh</samp> file readable and executable for anyone and in addition writable
by the owner.</p>
</body>
</html>

+ 21
- 8
manual/Tasks/setproxy.html View File

@@ -85,14 +85,27 @@ FTP proxy, or a SOCKS server, reset the server settings, or do nothing at all.</
</table>

<h3>Examples</h3>
<pre>&lt;setproxy/&gt;</pre> do nothing
<pre>&lt;setproxy proxyhost="firewall"/&gt;</pre> set the proxy to firewall:80
<pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre> set the proxy to <samp>firewall:81</samp>
<pre>&lt;setproxy proxyhost=""/&gt;</pre> stop using HTTP proxy; don't change SOCKS settings
<pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre> use SOCKS via socksy:1080
<pre>&lt;setproxy socksproxyhost=""/&gt;</pre> stop using the SOCKS server.
<p>You can set a username and password for http with the <var>proxyHost</var>
and <var>proxyPassword</var> attributes. On Java 1.4 and above these can also be used against SOCKS

<p>Do nothing</p>
<pre>&lt;setproxy/&gt;</pre>

<p>Set the proxy to <samp>firewall:80</samp></p>
<pre>&lt;setproxy proxyhost="firewall"/&gt;</pre>

<p>Set the proxy to <samp>firewall:81</samp></p>
<pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre>

<p>Stop using HTTP proxy; don't change SOCKS settings</p>
<pre>&lt;setproxy proxyhost=""/&gt;</pre>

<p>Use SOCKS via <samp>socksy:1080</samp></p>
<pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre>

<p>Stop using the SOCKS server</p>
<pre>&lt;setproxy socksproxyhost=""/&gt;</pre>

<p>You can set a username and password for HTTP with the <var>proxyHost</var>
and <var>proxyPassword</var> attributes. On Java 1.4 and above, these can also be used against SOCKS
5 servers.</p>

</body>


+ 16
- 11
manual/Tasks/signjar.html View File

@@ -213,11 +213,16 @@ place.</p>
<p>For instructions on generating a code signing certificate, see
the <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/keytool.html"
target="_top">keytool documentation</a> and/or instructions from your certificate authority.</p>

<p>Sign the <samp>ant.jar</samp> with alias <q>apache-group</q> accessing the keystore and private
key via <q>secret</q> password.</p>
<pre>
&lt;signjar jar=&quot;${dist}/lib/ant.jar&quot;
alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt;</pre>
<p>signs the <samp>ant.jar</samp> with alias <q>apache-group</q> accessing the keystore and private
key via <q>secret</q> password.</p>

<p>Sign all JAR files matching the <samp>dist/**/*.jar</samp> pattern, copying them to the
directory <samp>signed</samp> afterwards. The flatten mapper means that they will all be copied to
this directory, not to subdirectories.</p>
<pre>
&lt;signjar destDir="signed"
alias="testonly" keystore="testkeystore"
@@ -228,9 +233,9 @@ key via <q>secret</q> password.</p>
&lt;/path&gt;
&lt;flattenmapper/&gt;
&lt;/signjar&gt;</pre>
<p>Sign all JAR files matching the <samp>dist/**/*.jar</samp> pattern, copying them to the
directory <samp>signed</samp> afterwards. The flatten mapper means that they will all be copied to
this directory, not to subdirectories.</p>
<p>Sign all the JAR files in <samp>dist/**/*.jar</samp> <em>in-situ</em>. Lazy signing is used, so
the files will only be signed if they are not already signed.</p>
<pre>
&lt;signjar alias="testonly" keystore="testkeystore"
storepass="apacheant"
@@ -239,8 +244,11 @@ this directory, not to subdirectories.</p>
&lt;fileset dir="dist" includes="**/*.jar"/&gt;
&lt;/path&gt;
&lt;/signjar&gt;</pre>
<p>Sign all the JAR files in <samp>dist/**/*.jar</samp> <em>in-situ</em>. Lazy signing is used, so
the files will only be signed if they are not already signed.</p>

<p>Sign all the JAR files in <samp>dist/**/*.jar</samp> using the digest algorithm SHA1 and the
signature algorithm MD5withRSA. This is especially useful when you want to use the JDK
7 <kbd>jarsigner</kbd> (which uses SHA256 and SHA256withRSA as default) to create signed jars that
will be deployed on platforms not supporting SHA256 and SHA256withRSA.</p>
<pre>
&lt;signjar alias="testonly" keystore="testkeystore"
storepass="apacheant"
@@ -250,10 +258,7 @@ the files will only be signed if they are not already signed.</p>
&lt;fileset dir="dist" includes="**/*.jar"/&gt;
&lt;/path&gt;
&lt;/signjar&gt;</pre>
<p>Sign all the JAR files in <samp>dist/**/*.jar</samp> using the digest algorithm SHA1 and the
signature algorithm MD5withRSA. This is especially useful when you want to use the JDK
7 <kbd>jarsigner</kbd> (which uses SHA256 and SHA256withRSA as default) to create signed jars that
will be deployed on platforms not supporting SHA256 and SHA256withRSA.</p>

<h3>About timestamp signing</h3>

<p>Timestamps record the date and time that a signature took place, allowing the signature to be


+ 7
- 4
manual/Tasks/sleep.html View File

@@ -67,14 +67,17 @@ negative value can be supplied to any of them provided the total sleep time is p
may either be ignored or rounded up to a minimum timeslice. Note also that the system clocks often
have a fairly low granularity too, which complicates measuring how long a sleep actually took.</p>
<h3>Examples</h3>
<pre>&lt;sleep milliseconds=&quot;10&quot;/&gt;</pre>
<p>Sleep for about 10 ms.</p>
<pre>&lt;sleep seconds=&quot;2&quot;/&gt;</pre>
<pre>&lt;sleep milliseconds=&quot;10&quot;/&gt;</pre>

<p>Sleep for about 2 seconds.</p>
<pre>&lt;sleep hours=&quot;1&quot; minutes=&quot;-59&quot; seconds=&quot;-58&quot;/&gt;</pre>
<pre>&lt;sleep seconds=&quot;2&quot;/&gt;</pre>

<p>Sleep for one hour less 59:58, or two seconds again.</p>
<pre>&lt;sleep/&gt;</pre>
<pre>&lt;sleep hours=&quot;1&quot; minutes=&quot;-59&quot; seconds=&quot;-58&quot;/&gt;</pre>

<p>Sleep for no time at all. This may yield the CPU time to another thread or process.</p>
<pre>&lt;sleep/&gt;</pre>

</body>
</html>

+ 23
- 21
manual/Tasks/sos.html View File

@@ -174,6 +174,11 @@ Linux, Solaris &amp; Windows 2000.</p>

<h3>Example</h3>

<p>Connect to a SourceOffsite server on <samp>192.168.10.6:8888</samp>
with <q>build</q>, <q>build</q> as the username &amp; password. The SourceSafe database resides on
the same box as the SOS server &amp; the VSS database is at <samp>d:\vss\srcsafe.ini</samp>. Do a
recursive <var>GetProject</var> on <samp>$/SourceRoot/project1</samp>, using <samp>tmp</samp> as the
working directory.</p>
<pre>
&lt;sosget verbose=&quot;true&quot;
recursive=&quot;true&quot;
@@ -183,11 +188,6 @@ Linux, Solaris &amp; Windows 2000.</p>
projectpath=&quot;$/SourceRoot/project1&quot;
sosserverpath=&quot;192.168.10.6:8888&quot;
vssserverpath=&quot;d:\vss\srcsafe.ini&quot;/&gt;</pre>
<p>Connects to a SourceOffsite server on <samp>192.168.10.6:8888</samp>
with <q>build</q>, <q>build</q> as the username &amp; password. The SourceSafe database resides on
the same box as the SOS server &amp; the VSS database is at <samp>d:\vss\srcsafe.ini</samp>. Does a
recursive <var>GetProject</var> on <samp>$/SourceRoot/project1</samp>, using <samp>tmp</samp> as the
working directory.</p>

<hr/>
<h2 id="SOSLabel">SOSLabel</h2>
@@ -254,6 +254,11 @@ working directory.</p>
</table>

<h3>Example</h3>

<p>Connect to a SourceOffsite server on <samp>192.168.10.6:8888</samp>
with <q>build</q>, <q>build</q> as the username &amp; password. The SourceSafe database resides on
the same box as the SOS server &amp; the VSS database is at <samp>d:\vss\srcsafe.ini</samp>. Label
the <samp>$/SourceRoot/project1</samp> project with <q>test label</q>.</p>
<pre>
&lt;soslabel username=&quot;build&quot;
password=&quot;build&quot;
@@ -261,10 +266,6 @@ working directory.</p>
projectpath=&quot;$/SourceRoot/project1&quot;
sosserverpath=&quot;192.168.10.6:8888&quot;
vssserverpath=&quot;d:\vss\srcsafe.ini&quot;/&gt;</pre>
<p>Connects to a SourceOffsite server on <samp>192.168.10.6:8888</samp>
with <q>build</q>, <q>build</q> as the username &amp; password. The SourceSafe database resides on
the same box as the SOS server &amp; the VSS database is at <samp>d:\vss\srcsafe.ini</samp>. Labels
the <samp>$/SourceRoot/project1</samp> project with <q>test label</q>.</p>

<hr/>
<h2 id="SOSCheckIn">SOSCheckIn</h2>
@@ -356,6 +357,12 @@ the <samp>$/SourceRoot/project1</samp> project with <q>test label</q>.</p>
</table>

<h3>Example</h3>

<p>Connect to a SourceOffsite server on <samp>server1:8888</samp> with <q>build</q>, <q>build</q> as
the username &amp; password. The SourceSafe database resides on a different box
(<samp>server2</samp>) &amp; the VSS database is on a share called <samp>vss</samp>. Check-in only
the <samp>foobar.txt</samp> file adding a comment of <q>comment abc</q>. Extra status messages will
be displayed on screen.</p>
<pre>
&lt;soscheckin username=&quot;build&quot;
password=&quot;build&quot;
@@ -366,12 +373,6 @@ the <samp>$/SourceRoot/project1</samp> project with <q>test label</q>.</p>
sosserverpath=&quot;server1:8888&quot;
vssserverpath=&quot;\\server2\vss\srcsafe.ini&quot;/&gt;</pre>

<p>Connects to a SourceOffsite server on <samp>server1:8888</samp> with <q>build</q>, <q>build</q>
as the username &amp; password. The SourceSafe database resides on a different box
(<samp>server2</samp>) &amp; the VSS database is on a share called <samp>vss</samp>. Checks-in only
the <samp>foobar.txt</samp> file adding a comment of <q>comment abc</q>. Extra status messages will
be displayed on screen.</p>

<hr/>
<h2 id="SOSCheckOut">SOSCheckOut</h2>

@@ -458,6 +459,13 @@ be displayed on screen.</p>
</table>

<h3>Example</h3>

<p>Connect to a SourceOffsite server on <samp>server1:8888</samp> with <q>build</q>, <q>build</q> as
the username &amp; password. The SourceSafe database resides on a different box
(<samp>server2</samp>) &amp; the VSS database is on a share
called <samp>vss</samp>. Check-out <q>project1</q>, only the <samp>project1</samp> directory will be
locked as the recursive option was not set. Extra status messages will be displayed on
screen. The <code>soscmd(.exe)</code> file to be used resides in <samp>/usr/local/bin</samp>.</p>
<pre>
&lt;soscheckout soscmd=&quot;/usr/local/bin&quot;
verbose=&quot;true&quot;
@@ -466,12 +474,6 @@ be displayed on screen.</p>
projectpath=&quot;$/SourceRoot/project1&quot;
sosserverpath=&quot;192.168.10.6:8888&quot;
vssserverpath=&quot;\\server2\vss\srcsafe.ini&quot;/&gt;</pre>
<p>Connects to a SourceOffsite server on <samp>server1:8888</samp> with <q>build</q>, <q>build</q>
as the username &amp; password. The SourceSafe database resides on a different box
(<samp>server2</samp>) &amp; the VSS database is on a share
called <samp>vss</samp>. Checks-out <q>project1</q>, only the <samp>project1</samp> directory will
be locked as the recursive option was not set. Extra status messages will be displayed on
screen. The <code>soscmd(.exe)</code> file to be used resides in <samp>/usr/local/bin</samp>.</p>

</body>
</html>

+ 6
- 5
manual/Tasks/sound.html View File

@@ -74,6 +74,10 @@ and <code>&lt;fail&gt;</code> elements:</p>

<h3>Examples</h3>

<p>Play the <samp>bell.wav</samp> sound file if the build succeeded, or the <samp>ohno.wav</samp>
sound file if the build failed, three times, if the <code>fun</code> property is set to <q>true</q>.
If the target is a dependency of an "initialization" target that other targets depend on,
the <code>fun.done</code> property prevents the target from being executed more than once.</p>
<pre>
&lt;target name=&quot;fun&quot; if=&quot;fun&quot; unless=&quot;fun.done&quot;&gt;
&lt;sound&gt;
@@ -82,10 +86,8 @@ and <code>&lt;fail&gt;</code> elements:</p>
&lt;/sound&gt;
&lt;property name=&quot;fun.done&quot; value=&quot;true&quot;/&gt;
&lt;/target&gt;</pre>
<p>plays the <samp>bell.wav</samp> sound file if the build succeeded, or the <samp>ohno.wav</samp>
sound file if the build failed, three times, if the <code>fun</code> property is set to <q>true</q>.
If the target is a dependency of an "initialization" target that other targets depend on,
the <code>fun.done</code> property prevents the target from being executed more than once.</p>

<p>Randomly select a sound file to play when the build succeeds or fails.</p>
<pre>
&lt;target name=&quot;fun&quot; if=&quot;fun&quot; unless=&quot;fun.done&quot;&gt;
&lt;sound&gt;
@@ -95,7 +97,6 @@ the <code>fun.done</code> property prevents the target from being executed more
&lt;property name=&quot;fun.done&quot; value=&quot;true&quot;/&gt;
&lt;/target&gt;
</pre>
<p>randomly selects a sound file to play when the build succeeds or fails.</p>

</body>
</html>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save