From 7eeb33d5e8967edf6ba8523f354e4d7e45ab929b Mon Sep 17 00:00:00 2001 From: Gintas Grigelionis Date: Fri, 9 Feb 2018 06:54:03 +0100 Subject: [PATCH] Chop off redundant blockquotes --- manual/Tasks/ant.html | 32 +-- manual/Tasks/antcall.html | 8 +- manual/Tasks/antlr.html | 4 +- manual/Tasks/antstructure.html | 4 +- manual/Tasks/antversion.html | 17 +- manual/Tasks/apply.html | 24 +-- manual/Tasks/attrib.html | 14 +- manual/Tasks/available.html | 20 +- manual/Tasks/basename.html | 12 +- manual/Tasks/bindtargets.html | 14 +- manual/Tasks/buildnumber.html | 8 +- manual/Tasks/cab.html | 16 +- manual/Tasks/ccm.html | 40 ++-- manual/Tasks/checksum.html | 22 +- manual/Tasks/chgrp.html | 15 +- manual/Tasks/chmod.html | 18 +- manual/Tasks/chown.html | 12 +- manual/Tasks/clearcase.html | 52 ++--- manual/Tasks/conditions.html | 84 ++++---- manual/Tasks/copyfile.html | 6 +- manual/Tasks/dependset.html | 3 +- manual/Tasks/echoproperties.html | 28 +-- manual/Tasks/exec.html | 33 +-- manual/Tasks/genkey.html | 8 +- manual/Tasks/image.html | 16 +- manual/Tasks/jar.html | 46 ++-- manual/Tasks/javac.html | 4 +- manual/Tasks/javacc.html | 4 +- manual/Tasks/jdepend.html | 7 +- manual/Tasks/jjdoc.html | 60 ++---- manual/Tasks/jjtree.html | 3 - manual/Tasks/junitreport.html | 17 +- manual/Tasks/macrodef.html | 14 -- manual/Tasks/mail.html | 12 +- manual/Tasks/manifestclasspath.html | 6 +- manual/Tasks/netrexxc.html | 8 +- manual/Tasks/pack.html | 16 +- manual/Tasks/presetdef.html | 18 +- manual/Tasks/propertyfile.html | 16 +- manual/Tasks/renameextensions.html | 8 +- manual/Tasks/replace.html | 14 +- manual/Tasks/replaceregexp.html | 35 ++- manual/Tasks/rexec.html | 8 +- manual/Tasks/script.html | 32 ++- manual/Tasks/scriptdef.html | 4 +- manual/Tasks/setpermissions.html | 8 +- manual/Tasks/signjar.html | 17 +- manual/Tasks/sound.html | 5 +- manual/Tasks/splash.html | 14 +- manual/Tasks/sql.html | 36 ++-- manual/Tasks/sync.html | 8 +- manual/Tasks/telnet.html | 16 +- manual/Tasks/unpack.html | 26 +-- manual/Tasks/verifyjar.html | 5 +- manual/Tasks/vss.html | 52 +++-- manual/Tasks/waitfor.html | 12 +- manual/Tasks/whichresource.html | 12 +- manual/Types/antlib.html | 61 ++---- manual/Types/classfileset.html | 12 +- manual/Types/custom-programming.html | 80 +++---- manual/Types/dirset.html | 21 +- manual/Types/extension.html | 12 +- manual/Types/extensionset.html | 5 +- manual/Types/filelist.html | 16 +- manual/Types/fileset.html | 24 +-- manual/Types/filterchain.html | 281 ++++++++++++------------- manual/Types/filterset.html | 23 +- manual/Types/mapper.html | 72 +++---- manual/Types/multirootfileset.html | 8 +- manual/Types/patternset.html | 20 +- manual/Types/permissions.html | 12 +- manual/Types/propertyset.html | 11 +- manual/Types/regexp.html | 20 +- manual/Types/resources.html | 2 - manual/Types/selectors.html | 100 ++++----- manual/Types/tarfileset.html | 4 +- manual/Types/xmlcatalog.html | 16 +- manual/Types/zipfileset.html | 12 +- manual/develop.html | 36 ++-- manual/ifunless.html | 6 +- manual/install.html | 22 +- manual/listeners.html | 32 +-- manual/running.html | 39 +--- manual/stylesheets/style.css | 4 +- manual/targets.html | 34 ++- manual/tutorial-HelloWorldWithAnt.html | 10 +- manual/using.html | 45 ++-- 87 files changed, 899 insertions(+), 1194 deletions(-) diff --git a/manual/Tasks/ant.html b/manual/Tasks/ant.html index 7088d2cc2..25f25a62b 100644 --- a/manual/Tasks/ant.html +++ b/manual/Tasks/ant.html @@ -330,7 +330,7 @@ targets so specified, in the order specified.

corresponding Ant tasks set the dir attribute explicitly.

Examples

-
+
 <ant antfile="subproject/subbuild.xml" target="compile"/>
 
 <ant dir="subproject"/>
@@ -343,66 +343,66 @@ targets so specified, in the order specified.

<ant inheritAll="false" antfile="subproject/subbuild.xml"> <property name="output.type" value="html"/> </ant> -
+

These lines invoke the same build file:

-
+
 <ant antfile="sub1/sub2/build.xml" />
 <ant antfile="sub2/build.xml" dir="sub1" />
 <ant antfile="build.xml" dir="sub1/sub2" />
-
+

The build file of the calling project defines some <path> elements like this:

-
+
 <path id="path1">
     ...
 </path>
 <path id="path2">
     ...
 </path>
-
+

and the called build file (subbuild.xml) also defines a <path> with the id path1, but path2 is not defined:

-
+
 <ant antfile="subbuild.xml" inheritrefs="true"/>
-
+

will not override subbuild's definition of path1, but make the parent's definition of path2 available in the subbuild.

-
+
 <ant antfile="subbuild.xml"/>
-
+

as well as

-
+
 <ant antfile="subbuild.xml" inheritrefs="false"/>
-
+

will neither override path1 nor copy path2.

-
+
 <ant antfile="subbuild.xml" inheritrefs="false">
   <reference refid="path1"/>
 </ant>
-
+

will override subbuild's definition of path1.

-
+
 <ant antfile="subbuild.xml" inheritrefs="false">
   <reference refid="path1" torefid="path2"/>
 </ant>
-
+

will copy the parent's definition of path1 into the new project using the id path2.

diff --git a/manual/Tasks/antcall.html b/manual/Tasks/antcall.html index 32044c884..08dab5a2b 100644 --- a/manual/Tasks/antcall.html +++ b/manual/Tasks/antcall.html @@ -173,7 +173,7 @@ targets so specified, in the order specified.

since Ant 1.6.3.

Examples

-
+
 <target name="default">
   <antcall target="doSomethingElse">
     <param name="param1" value="value"/>
@@ -183,14 +183,14 @@ targets so specified, in the order specified.

<target name="doSomethingElse"> <echo message="param1=${param1}"/> </target> -
+

Will run the target 'doSomethingElse' and echo 'param1=value'.

-
+
 <antcall ... >
   <reference refid="path1" torefid="path2"/>
 </antcall>
-
+

will copy the parent's definition of path1 into the new project using the id path2.

diff --git a/manual/Tasks/antlr.html b/manual/Tasks/antlr.html index 36d22cb40..55277c85c 100644 --- a/manual/Tasks/antlr.html +++ b/manual/Tasks/antlr.html @@ -186,11 +186,11 @@ VM via nested <jvmarg> attributes, for example:

href="../using.html#arg">Command line arguments.

Example

-
+
 <antlr
     target="etc/java.g"
     outputdirectory="build/src"/>
-
+

This invokes ANTLR on grammar file etc/java.g, writing the generated files to build/src. diff --git a/manual/Tasks/antstructure.html b/manual/Tasks/antstructure.html index 55810403a..3d525bb1b 100644 --- a/manual/Tasks/antstructure.html +++ b/manual/Tasks/antstructure.html @@ -68,9 +68,7 @@ element of this task - see the example below.

Examples

-
-<antstructure output="project.dtd" />
-
+
<antstructure output="project.dtd"/>

Emitting your own structure instead of a DTD

diff --git a/manual/Tasks/antversion.html b/manual/Tasks/antversion.html index 3e9919f20..ee1bece88 100644 --- a/manual/Tasks/antversion.html +++ b/manual/Tasks/antversion.html @@ -60,34 +60,33 @@ Stores the Apache Ant version (when used as task) or checks for a specific Ant v -

Examples

-
+
 <antversion property="antversion"/>
-
+

Stores the current Ant version in the property antversion.

-
+
 <antversion property="antversion" atleast="1.6"/>
-
+

Stores the Ant version in the property antversion if the current Ant version is 1.6.0 or higher. Otherwise the property remains unset.

-
+
 <antversion property="ant-is-exact-7" exactly="1.7.0"/>
-
+

Sets the property ant-is-exact-7 if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0 would match.

-
+
 <condition property="Ant17isOnline">
   <and>
     <antversion exactly="1.7.0"/>
     <http url="http://ant.apache.org"/>
   </and>
 </condition>
-
+

Sets Ant17isOnline if Ant 1.7.0 is running and can get a non-error-response from the Ant homepage.

diff --git a/manual/Tasks/apply.html b/manual/Tasks/apply.html index dd42fe953..0ed887926 100644 --- a/manual/Tasks/apply.html +++ b/manual/Tasks/apply.html @@ -399,7 +399,7 @@ files for each sourcefile. of executions (with maxparallel > 0) and null will be used a source file just like it is in the case of exec.

Examples

-
+
 <apply executable="ls">
   <arg value="-l"/>
   <fileset dir="/tmp">
@@ -409,25 +409,25 @@ files for each sourcefile.
   </fileset>
   <fileset refid="other.files"/>
 </apply>
-
+

invokes ls -l, adding the absolute filenames of all files below /tmp not ending in .txt and all files of the FileSet with id other.files to the command line.

-
+
 <apply executable="somecommand" parallel="false">
   <arg value="arg1"/>
   <srcfile/>
   <arg value="arg2"/>
   <fileset dir="/tmp"/>
 </apply>
-
+

invokes somecommand arg1 SOURCEFILENAME arg2 for each file in /tmp replacing SOURCEFILENAME with the absolute filename of each file in turn. If parallel had been set to true, SOURCEFILENAME would be replaced with the absolute filenames of all files separated by spaces.

-
+
 <apply executable="cc" dest="src/C" parallel="false">
   <arg value="-c"/>
   <arg value="-o"/>
@@ -436,13 +436,13 @@ of all files separated by spaces.

<fileset dir="src/C" includes="*.c"/> <mapper type="glob" from="*.c" to="*.o"/> </apply> -
+

invokes cc -c -o TARGETFILE SOURCEFILE for each .c file that is newer than the corresponding .o, replacing TARGETFILE with the absolute filename of the .o and SOURCEFILE with the absolute name of the .c file.

-
+
 <mapper id="out" type="glob"
            from="src${file.separator}*.file"
            to="dest${file.separator}*.out"/>
@@ -454,7 +454,7 @@ the .o and SOURCEFILE with the absolute name of the
     <outputmapper refid="out"/>
   </redirector>
 </apply>
-
+ Applies the fictitious "processfile" executable to all files matching *.file in the src directory. The out <mapper> has been set up to map @@ -464,7 +464,7 @@ task. A reference to out is then used as an <outputmapper> nested in a <redirector>, which in turn is nested beneath this <apply> instance. This allows us to perform dependency checking against output files--the target files in this case. -
+
 <apply executable="ls" parallel="true"
        force="true" dest="${basedir}" append="true" type="both">
   <path>
@@ -472,11 +472,11 @@ dependency checking against output files--the target files in this case.
   </path>
   <identitymapper/>
 </apply>
-
+ Applies the "ls" executable to all directories in the PATH, effectively listing all executables that are available on the PATH. -
+
 <apply executable="jsmin" addsourcefile="false">
     <!-- Collect the JS-files -->
     <fileset dir="src" includes="*.js"/>
@@ -488,7 +488,7 @@ listing all executables that are available on the PATH.
         <outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/>
     </redirector>
 </apply>
-
+ Conversion of the command jsmin < src/a.js > dest/a.js but for all files in the src-directory. Because the filename itself should not be passed to the jsmin program, the addsourcefile is set to diff --git a/manual/Tasks/attrib.html b/manual/Tasks/attrib.html index 86200b83f..dc8d73479 100644 --- a/manual/Tasks/attrib.html +++ b/manual/Tasks/attrib.html @@ -136,21 +136,15 @@ directory tree), so you'll have to experiment a little.

Examples

-
+
<attrib file="${dist}/run.bat" readonly="true" hidden="true"/>
-

makes the "run.bat" file read-only and hidden.

- -
-
<attrib readonly="false">
+
<attrib readonly="false">
   <fileset dir="${meta.inf}" includes="**/*.xml"/>
 </attrib>
 
-

makes all ".xml" files below ${meta.inf} readable.

- -
-
+
 <attrib readonly="true" archive="true">
   <fileset dir="shared/sources1">
     <exclude name="**/trial/**"/>
@@ -158,7 +152,7 @@ directory tree), so you'll have to experiment a little.
   <fileset refid="other.shared.sources"/>
 </attrib>
 
-
+

makes all files below shared/sources1 (except those below any directory named trial) read-only and archived. In addition all files belonging to a FileSet with id other.shared.sources get the diff --git a/manual/Tasks/available.html b/manual/Tasks/available.html index 3b0a9c751..57ba9cef4 100644 --- a/manual/Tasks/available.html +++ b/manual/Tasks/available.html @@ -115,41 +115,41 @@ href="../using.html#path">path-like structure and can also be set via a nest href="../using.html#path">path-like structure and can also be set via a nested <filepath> element.

Examples

-
+
 <available classname="org.whatever.Myclass" property="Myclass.present"/>
-
+

sets the Myclass.present property to the value "true" if the class org.whatever.Myclass is found in Ant's classpath.

-
+
 <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/>
 <available file="${jaxp.jar}" property="jaxp.jar.present"/>
-
+

sets the jaxp.jar.present property to the value "true" if the file ./lib/jaxp11/jaxp.jar is found.

-
+
 <available file="/usr/local/lib" type="dir"
            property="local.lib.present"/>
-
+

sets the local.lib.present property to the value "true" if the directory /usr/local/lib is found.

-
+
 ...in project ...
 <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/>
 <path id="jaxp" location="${jaxp.jar}"/>
 ...in target ...
 <available classname="javax.xml.transform.Transformer"
            classpathref="jaxp" property="jaxp11.present"/>
-
+

sets the jaxp11.present property to the value "true" if the class javax.xml.transform.Transformer is found in the classpath referenced by jaxp (in this case, ./lib/jaxp11/jaxp.jar).

-
+
 <available property="have.extras" resource="extratasks.properties">
   <classpath>
     <pathelement location="/usr/local/ant/extra.jar" />
   </classpath>
 </available>
-
+

sets the have.extras property to the value "true" if the resource-file extratasks.properties is found.

diff --git a/manual/Tasks/basename.html b/manual/Tasks/basename.html index b185b24ae..bc55c6e98 100644 --- a/manual/Tasks/basename.html +++ b/manual/Tasks/basename.html @@ -64,23 +64,23 @@ the basename will be the simple file name, without any directory elements.

Examples

-
+
 <basename property="jar.filename" file="${lib.jarfile}"/>
-
+ will set jar.filename to myjar.jar, if lib.jarfile is defined as either a full-path filename (eg., /usr/local/lib/myjar.jar), a relative-path filename (eg., lib/myjar.jar), or a simple filename (eg., myjar.jar). -
+
 <basename property="cmdname" file="D:/usr/local/foo.exe"
           suffix=".exe"/>
-
+ will set cmdname to foo. -
+
 <property environment="env"/>
 <basename property="temp.dirname" file="${env.TEMP}"/>
-
+ will set temp.dirname to the last directory element of the path defined for the TEMP environment variable. diff --git a/manual/Tasks/bindtargets.html b/manual/Tasks/bindtargets.html index fdf679f12..538d538de 100644 --- a/manual/Tasks/bindtargets.html +++ b/manual/Tasks/bindtargets.html @@ -44,12 +44,10 @@ target dependencies but only in your context. target which will be the bridge between the target to bind and the extension point. For instance:

-
<bindtargets targets="jar,javadoc" extensionPoint="dist" />
+
<bindtargets targets="jar,javadoc" extensionPoint="dist" />
is quite equivalent to: -
<target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" />
-

-This task basically avoid the creation of a target. -

+
<target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" />
+

This task basically avoid the creation of a target.

The bindtargets task may only be used as a top-level task. This means that it may not be used in a target. This is making the target dependency graph static @@ -84,9 +82,9 @@ and predictable as soon as every build file is loaded.

Examples

-
-<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist" />
-
+
+<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist"/>
+
diff --git a/manual/Tasks/buildnumber.html b/manual/Tasks/buildnumber.html index 7351e2241..474a925d5 100644 --- a/manual/Tasks/buildnumber.html +++ b/manual/Tasks/buildnumber.html @@ -53,16 +53,16 @@ the number format.)

Examples

-
+
 <buildnumber/>
-
+

Read, increment, and write a build number to the default file, build.number.

-
+
 <buildnumber file="mybuild.number"/>
-
+

Read, increment, and write a build number to the file mybuild.number.

diff --git a/manual/Tasks/cab.html b/manual/Tasks/cab.html index 6d7a4d6cc..115d73901 100644 --- a/manual/Tasks/cab.html +++ b/manual/Tasks/cab.html @@ -118,34 +118,34 @@ element to specify the files to be included in the archive.

Examples

-
+
 <cab cabfile="${dist}/manual.cab"
      basedir="htdocs/manual"/>
-
+

cabs all files in the htdocs/manual directory into a file called manual.cab in the ${dist} directory.

-
+
 <cab cabfile="${dist}/manual.cab"
      basedir="htdocs/manual"
      excludes="mydocs/**, **/todo.html"/>
-
+

cabs all files in the htdocs/manual directory into a file called manual.cab in the ${dist} directory. Files in the directory mydocs, or files with the name todo.html are excluded.

-
+
 <cab cabfile="${dist}/manual.cab"
      basedir="htdocs/manual"
      includes="api/**/*.html"
      excludes="**/todo.html"
      verbose="yes"/>
-
+

Cab all files in the htdocs/manual directory into a file called manual.cab in the ${dist} directory. Only html files under the directory api are archived, and files with the name todo.html are excluded. Output from the cabarc tool is displayed in the build output.

-
+
 <cab cabfile="${dist}/manual.cab"
      verbose="yes">
   <fileset
@@ -153,7 +153,7 @@ output.

includes="api/**/*.html" excludes="**/todo.html"/> </cab> -
+

is equivalent to the example above.

diff --git a/manual/Tasks/ccm.html b/manual/Tasks/ccm.html index 8e229097c..39ca6716a 100644 --- a/manual/Tasks/ccm.html +++ b/manual/Tasks/ccm.html @@ -68,11 +68,11 @@ Task to checkin a file

Examples

-
+
<ccmcheckin file="c:/wa/com/foo/MyFile.java"
         comment="mycomment"/>
 
-
+

Checks in the file c:/wa/com/foo/MyFile.java. Comment attribute mycomment is added as a task comment. The task used is the one set as the default.

@@ -114,22 +114,19 @@ Task to perform a Checkout command to Continuus

Examples

-
-
<ccmcheckout file="c:/wa/com/foo/MyFile.java"
-        comment="mycomment"/>
-
-
+ +
<ccmcheckout file="c:/wa/com/foo/MyFile.java"
+        comment="mycomment"/>
+

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

-
-
<ccmcheckout  comment="mycomment">
+
+
<ccmcheckout  comment="mycomment">
   <fileset dir="lib" >
     <include name="**/*.jar"/>
   </fileset>
-</ccmcheckout >
-  
-
+</ccmcheckout >

Check out all the files in the lib directory having the .jar extension. Comment attribute mycomment is added as a task comment @@ -162,10 +159,9 @@ Task to perform a check in default task command to Continuus

Examples

-
-
<ccmcheckintask comment="blahblah/>
-
-
+ +
<ccmcheckintask comment="blahblah/>
+

Does a Checkin default task on all the checked out files in the current task.


CCMReconfigure

@@ -200,11 +196,11 @@ Task to perform an reconfigure command to Continuus.

Examples

-
-
<ccmreconfigure ccmproject="ANTCCM_TEST#BMO_1"
+
+
<ccmreconfigure ccmproject="ANTCCM_TEST#BMO_1"
          verbose="true"/>
 
-
+

Does a Continuus reconfigure on the project ANTCCM_TEST#BMO_1.


@@ -255,11 +251,11 @@ Create a Continuus task.

Examples

-
-
<ccmcreatetask resolver="${user.name}"
+
+
<ccmcreatetask resolver="${user.name}"
             release="ANTCCM_TEST" comment="blahblah"/>
 
-
+

Creates a task for the release ANTCCM_TEST with the current user as the resolver for this task.

diff --git a/manual/Tasks/checksum.html b/manual/Tasks/checksum.html index 8abb45fcc..cf7bb87d7 100644 --- a/manual/Tasks/checksum.html +++ b/manual/Tasks/checksum.html @@ -202,48 +202,48 @@ or set the fileext attribute. The names of common hashing algorithms ca

Examples

Example 1

-
<checksum file="foo.bar"/>
+
<checksum file="foo.bar"/>
Generates a MD5 checksum for foo.bar and stores the checksum in the destination file foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself.

Example 2

-
<checksum file="foo.bar" forceOverwrite="yes"/>
+
<checksum file="foo.bar" forceOverwrite="yes"/>
Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5. If foo.bar.MD5 already exists, it is overwritten.

Example 3

-
<checksum file="foo.bar" property="foobarMD5"/>
+
<checksum file="foo.bar" property="foobarMD5"/>
Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5.

Example 4

-
<checksum file="foo.bar" verifyProperty="isMD5ok"/>
+
<checksum file="foo.bar" verifyProperty="isMD5ok"/>
Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets isMD5ok to either true or false, depending upon the result.

Example 5

-
<checksum file="foo.bar" algorithm="SHA-512" fileext="asc"/>
+
<checksum file="foo.bar" algorithm="SHA-512" fileext="asc"/>
Generates a SHA-512 checksum for foo.bar and stores the checksum in the destination file foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself.

Example 6

-
+
 <checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/>
-
+ Generates a MD5 checksum for foo.bar, compares it against the value of the property md5, and sets isEqual to either true or false, depending upon the result.

Example 7

-
+
 <checksum>
   <fileset dir=".">
     <include name="foo*"/>
   </fileset>
 </checksum>
-
+ Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo.

Example 8

-
+
 <condition property="isChecksumEqual">
   <checksum>
     <fileset dir=".">
@@ -251,7 +251,7 @@ Works just like Example 1, but generates a .MD5 file for every file that begins
     </fileset>
   </checksum>
 </condition>
-
+ Works like Example 4, but only sets isChecksumEqual to true, if the checksum matches - it will never be set to false. This example demonstrates use with the Condition task. diff --git a/manual/Tasks/chgrp.html b/manual/Tasks/chgrp.html index a56c1ad03..fecc78359 100644 --- a/manual/Tasks/chgrp.html +++ b/manual/Tasks/chgrp.html @@ -127,22 +127,22 @@ could use as initial value for these experiments.

Examples

-
+
 <chgrp file="${dist}/start.sh" group="coders"/>
 
-
+

makes the "start.sh" file belong to the coders group on a UNIX system.

-
+
 <chgrp group="coders">
   <fileset dir="${dist}/bin" includes="**/*.sh"/>
 </chgrp>
 
-
+

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

-
+
 <chgrp group="coders">
   <fileset dir="shared/sources1">
@@ -151,14 +151,14 @@ belong to the coders group on a UNIX system.

<fileset refid="other.shared.sources"/> </chgrp>
-
+

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

-
+
 <chgrp group="webdev" type="file">
   <fileset dir="/web">
@@ -170,7 +170,6 @@ group.

</dirset> </chmod>
-

makes all .test.jsp, and .new files belong to group webdev. Directories beginning with test_ also will belong diff --git a/manual/Tasks/chmod.html b/manual/Tasks/chmod.html index 5dd369a08..c1c0f11af 100644 --- a/manual/Tasks/chmod.html +++ b/manual/Tasks/chmod.html @@ -155,25 +155,23 @@ could use as initial value for these experiments.

Examples

-
+  
 <chmod file="${dist}/start.sh" perm="ugo+rx"/>
-
+

makes the "start.sh" file readable and executable for anyone on a UNIX system.

-
+
 <chmod file="${dist}/start.sh" perm="700"/>
-
+

makes the "start.sh" file readable, writable and executable only for the owner on a UNIX system.

-
 <chmod dir="${dist}/bin" perm="ugo+rx"
        includes="**/*.sh"/>
 
-

makes all ".sh" files below ${dist}/bin readable and executable for anyone on a UNIX system.

-
+
 <chmod perm="g+w">
   <fileset dir="shared/sources1">
@@ -182,14 +180,11 @@ readable and executable for anyone on a UNIX system.

<fileset refid="other.shared.sources"/> </chmod>
-

makes all files below shared/sources1 (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 id other.shared.sources get the same permissions.

- -
 <chmod perm="go-rwx" type="file">
   <fileset dir="/web">
@@ -201,14 +196,11 @@ permissions.

</dirset> </chmod>
-
-

keeps non-owners from touching cgi scripts, files with a .old extension or directories beginning with private_. A directory ending in .old or a file beginning with private_ would remain unaffected.

-

Note on maxparallel attribute

Some shells have a limit of the number of characters that diff --git a/manual/Tasks/chown.html b/manual/Tasks/chown.html index 587878aeb..a0194c00f 100644 --- a/manual/Tasks/chown.html +++ b/manual/Tasks/chown.html @@ -126,22 +126,20 @@ could use as initial value for these experiments.

Examples

-
+
 <chown file="${dist}/start.sh" owner="coderjoe"/>
 
-

makes the "start.sh" file belong to coderjoe on a UNIX system.

-
+
     <chown owner="coderjoe">
       <fileset dir="${dist}/bin" includes="**/*.sh"/>
     </chown>
 
-

makes all ".sh" files below ${dist}/bin belong to coderjoe on a UNIX system.

-
+
 <chown owner="coderjoe">
   <fileset dir="shared/sources1">
@@ -150,14 +148,12 @@ belong to coderjoe on a UNIX system.

<fileset refid="other.shared.sources"/> </chown>
-

makes all files below shared/sources1 (except those below any directory named trial) belong to coderjoe on a UNIX system. In addition all files belonging to a FileSet with id other.shared.sources get the same owner.

-
 <chown owner="webadmin" type="file">
   <fileset dir="/web">
@@ -169,8 +165,6 @@ owner.

</dirset> </chmod>
-
-

makes cgi scripts, files with a .old extension or directories beginning with private_ belong to the user named webadmin. A directory ending in .old or a file beginning with diff --git a/manual/Tasks/clearcase.html b/manual/Tasks/clearcase.html index 18e4e666b..d1b5b9c7b 100644 --- a/manual/Tasks/clearcase.html +++ b/manual/Tasks/clearcase.html @@ -121,14 +121,14 @@ Task to perform a "cleartool checkin" command to ClearCase.

Examples

-
+
 <cccheckin viewpath="c:/views/viewdir/afile"
         commentfile="acomment.txt"
         nowarn="true"
         identical="true"/>
 
-
+

Does a ClearCase checkin on the file c:/views/viewdir/afile. Comment text from the file acomment.txt is added to ClearCase as a comment. All warning messages are suppressed. The file is checked in even if it is @@ -204,7 +204,7 @@ Task to perform a "cleartool checkout" command to ClearCase.

Examples

-
+
 <cccheckout viewpath="c:/views/viewdir/afile"
         reserved="true"
@@ -212,7 +212,7 @@ Task to perform a "cleartool checkout" command to ClearCase.
         nowarn="true"
         comment="Some comment text"/>
 
-
+

Does a ClearCase checkout on the file c:/views/viewdir/afile. It is checked out as reserved on branch called abranch. All warning messages are suppressed. A Some comment text is added to @@ -248,12 +248,12 @@ Task to perform a UnCheckout command to ClearCase.

Examples

-
+
 <ccuncheckout viewpath="c:/views/viewdir/afile"
         keepcopy="true"/>
 
-
+

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


@@ -315,7 +315,7 @@ Task to perform an "cleartool update" command to ClearCase.

Examples

-
+
 <ccupdate viewpath="c:/views/viewdir"
         graphical="false"
@@ -324,7 +324,7 @@ Task to perform an "cleartool update" command to ClearCase.
         currenttime="true"
         rename="false"/>
 
-
+

Does a ClearCase update on the snapshot view directory c:/views/viewdir. A graphical dialog will be displayed. The output will be logged to log.log and it will overwrite any hijacked files. The modified @@ -393,13 +393,13 @@ Task to perform a "mklbtype" command to ClearCase.

Examples

-
+
 <ccmklbtype typename="VERSION_1"
         ordinary="true"
         comment="Development version 1"/>
 
-
+

Does a ClearCase mklbtype to create a label type named VERSION_1. It is created as ordinary so it is available only to the current VOB. The text Development version 1 is added as a comment.

@@ -462,7 +462,7 @@ Task to perform a "mklabel" command to ClearCase.

Examples

-
+
 <ccmklabel viewpath="c:/views/viewdir/afile"
         comment="Some comment text"
@@ -470,7 +470,7 @@ Task to perform a "mklabel" command to ClearCase.
         version="\main\2"
         typename="VERSION_1"/>
 
-
+

Does a ClearCase mklabel on the file c:/views/viewdir/afile under the main branch for version 2 (\main\2). Text Some comment text is added as a comment. It will recurse all subdirectories. @@ -561,14 +561,14 @@ Task to perform a "rmtype" command to ClearCase.

Examples

-
+
 <ccrmtype typekind="lbtype"
         typename="VERSION_1"
         commentfile="acomment.txt"
         rmall="true"/>
 
-
+

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

@@ -627,12 +627,12 @@ Task to perform a "cleartool lock" command to ClearCase.

Examples

-
+
 <cclock
     objsel="stream:Application_Integration@\MyProject_PVOB"/>
 
-
+

Does a ClearCase lock on the object stream:Application_Integration@\MyProject_PVOB.


CCUnlock

@@ -674,12 +674,12 @@ Task to perform a "cleartool unlock" command to ClearCase.

Examples

-
+
 <ccunlock
     objsel="stream:Application_Integration@\MyProject_PVOB"/>
 
-
+

Does a ClearCase unlock on the object stream:Application_Integration@\MyProject_PVOB.


CCMkbl

@@ -736,7 +736,7 @@ Task to perform a "cleartool mkbl" command to ClearCase.

Examples

-
+
 <ccmkbl
     baselinerootname="Application_Baseline_AUTO"
@@ -744,7 +744,7 @@ Task to perform a "cleartool mkbl" command to ClearCase.
     full="no"
     viewpath="v:\ApplicationCC"/>
 
-
+

Does a ClearCase mkbl on the Integration view at v:\ApplicationCC even if it is identical to a previous baseline. The new baseline with be incremental and named "Application_Baseline_AUTO".

@@ -807,13 +807,13 @@ Task to perform a "cleartool mkattr" command to ClearCase.

Examples

-
+
 <ccmkattr viewpath="c:/views/viewdir/afile"
     typename="BugFix"
     typevalue="34445"/>
 
-
+

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


@@ -854,13 +854,13 @@ Task to perform a "cleartool mkdir" command to ClearCase.

Examples

-
+
 <ccmkdir viewpath="c:/views/viewdir/adir"
         nocheckout="true"
         comment="Some comment text"/>
 
-
+

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


@@ -927,14 +927,14 @@ Task to perform a "cleartool mkelem" command to ClearCase.

Examples

-
+
 <ccmkelem viewpath="c:/views/viewdir/afile"
         eltype="text_file"
         checkin="true"
         comment="Some comment text"/>
 
-
+

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

diff --git a/manual/Tasks/conditions.html b/manual/Tasks/conditions.html index c3976855d..e8bc0522d 100644 --- a/manual/Tasks/conditions.html +++ b/manual/Tasks/conditions.html @@ -335,10 +335,10 @@ that is "true","yes", or "on"

Yes -
+
 <istrue value="${someproperty}"/>
 <istrue value="false"/>
-
+

isfalse

Tests whether a string is not true, the negation of <istrue> @@ -355,10 +355,10 @@ that is "true","yes", or "on"

Yes -
+
 <isfalse value="${someproperty}"/>
 <isfalse value="false"/>
-
+

isreference

Test whether a given reference has been defined in this project and @@ -449,11 +449,11 @@ that is "true","yes", or "on"

Example usage:

-
+
 <isfileselected file="a.xml">
   <date datetime="06/28/2000 2:02 pm" when="equal"/>
 </isfileselected>
-
+

typefound

@@ -486,10 +486,10 @@ tasks, datatypes, scriptdefs, macrodefs and presetdefs.

Example usages:

-
+
 <typefound name="junit"/>
 <typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/>
-
+

scriptcondition

@@ -578,12 +578,12 @@ Alternatively, self.value can be used to set the evaluation result.

Example:

-
+
 <scriptcondition language="javascript"
         value="true">
     self.setValue(false);
 </scriptcondition>
-
+ Sets the default value of the condition to true, then in the script, sets the value to false. This condition always evaluates to "false" @@ -618,18 +618,18 @@ attempting to set the appropriate property/feature/

-
+
 <parsersupports feature="http://xml.org/sax/features/namespaces"/>
-
+ Check for namespace support. All SAX2 parsers should have this. -
+
 <or>
   <parsersupports
     feature="http://apache.org/xml/features/validation/schema"/>
   <parsersupports
     feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/>
 </or>
-
+ Check for XML Schema support. @@ -691,21 +691,21 @@ not reachable on other ports (i.e. port 80), because of firewalls. -
+
 <condition property="offline">
   <isreachable url="http://ibiblio.org/maven/" />
 </condition>
-
+

Probe for the maven repository being reachable.

-
+
 <condition property="offline">
   <isreachable host="ibiblio.org" timeout="10" />
 </condition>
-
+

Probe for the maven repository being reachable using the hostname, ten second timeout.. @@ -717,14 +717,14 @@ Probe for the maven repository being reachable using the hostname, ten second ti Since Ant 1.6.3

-
+
 <length string=" foo " trim="true" length="3" />
-
+

Verify a string is of a certain length.

-
+
 <length file="foo" when="greater" length="0" />
-
+

Verify that file foo is not empty.

isfailure

@@ -753,9 +753,9 @@ Probe for the maven repository being reachable using the hostname, ten second ti Since Ant 1.7

-
+
 <resourcecount refid="myresourcecollection" when="greater" count="0" />
-
+

Verify that a resource collection is not empty.

resourcesmatch

@@ -870,9 +870,9 @@ must match. Since Ant 1.7 There is also a nested <classpath> element, which can be used to specify a classpath.

-
+
 <hasmethod classname="java.util.ArrayList" method="trimToSize"  />
-
+

Looks for the method trimToSize in the ArrayList class.

@@ -934,29 +934,29 @@ must match. Since Ant 1.7

An example:

-
+
 <condition property="legal-password">
   <matches pattern="[1-9]" string="${user-input}"/>
 </condition>
 <fail message="Your password should at least contain one number"
       unless="legal-password"/>
-
+

The following example sets the property "ok" if the property "input" is three characters long, starting with 'a' and ending with 'b'.

-
+
 <condition property="ok">
   <matches string="${input}" pattern="^a.b$"/>
 </condition>
-
+

The following defines a reference regular expression for matching dates and then uses antunit to check if the property "today" is in the correct format:

-
+
 <regexp id="date.pattern" pattern="^[0123]\d-[01]\d-[12]\d\d\d$"/>
 
 <au:assertTrue xmlns:au="antlib:org.apache.ant.antunit">
@@ -964,12 +964,12 @@ must match. Since Ant 1.7
     <regexp refid="date.pattern"/>
   </matches>
 </au:assertTrue>
-
+

The following example shows the use of the singleline and the casesensitive flags.

-
+
 <au:assertTrue>
   <matches string="AB${line.separator}C" pattern="^ab.*C$"
            casesensitive="false"
@@ -980,7 +980,7 @@ must match. Since Ant 1.7
            casesensitive="false"
            singleline="false"/>
 </au:assertFalse>
-
+

antversion

This condition is identical to the

An example:

-
+
 <hasfreespace partition="c:" needed="100M"/>
-
+

islastmodified

@@ -1070,11 +1070,11 @@ is redundant and will be ignored.

An example:

-
+
 <islastmodified dateTime="08/18/2009 04:41:19 AM" mode="not-before">
   <file file="${file}"/>
 </islastmodified>
-
+

resourceexists

@@ -1085,11 +1085,11 @@ is redundant and will be ignored.

An example:

-
+
 <resourceexists>
   <file file="${file}"/>
 </resourceexists>
-
+

javaversion

@@ -1122,9 +1122,9 @@ is redundant and will be ignored.

An example:

-
+
 <javaversion atleast="9"/>
-
+

will evaluate to true if the current JVM is Java 9 or above.

diff --git a/manual/Tasks/copyfile.html b/manual/Tasks/copyfile.html index 80306ae31..2ce4180bd 100644 --- a/manual/Tasks/copyfile.html +++ b/manual/Tasks/copyfile.html @@ -62,10 +62,8 @@ does not exist.

Examples

-
-

<copyfile src="test.java" dest="subdir/test.java"/>

-

<copyfile src="${src}/index.html" dest="${dist}/help/index.html"/>

-
+
  <copyfile src="test.java" dest="subdir/test.java"/>
+  <copyfile src="${src}/index.html" dest="${dist}/help/index.html"/>
diff --git a/manual/Tasks/dependset.html b/manual/Tasks/dependset.html index cb8a84197..90aa2daa9 100644 --- a/manual/Tasks/dependset.html +++ b/manual/Tasks/dependset.html @@ -132,7 +132,7 @@ Multiple <targetfilelist> filelists may be specified.

Examples

-
+
     <dependset>
        <srcfilelist
            dir   = "${dtd.dir}"
@@ -147,7 +147,6 @@ Multiple <targetfilelist> filelists may be specified.
            dir      = "${output.dir}"
            includes = "**/*.html"/>
     </dependset>
-

In this example derived HTML files in the ${output.dir} directory diff --git a/manual/Tasks/echoproperties.html b/manual/Tasks/echoproperties.html index 96864c237..bb81568d7 100644 --- a/manual/Tasks/echoproperties.html +++ b/manual/Tasks/echoproperties.html @@ -97,46 +97,36 @@ shortcuts that use propertysets internally.

since Ant 1.6.

Examples

-
-  <echoproperties/>
-
+
<echoproperties/>

Report the current properties to the log.

-
-  <echoproperties destfile="my.properties"/>
-
+
<echoproperties destfile="my.properties"/>

Report the current properties to the file "my.properties", and will fail the build if the file could not be created or written to.

-
-  <echoproperties destfile="my.properties" failonerror="false"/>
-
+
<echoproperties destfile="my.properties" failonerror="false"/>

Report the current properties to the file "my.properties", and will log a message if the file could not be created or written to, but will still allow the build to continue.

-
-  <echoproperties prefix="java."/>
-
+
<echoproperties prefix="java."/>

List all properties beginning with "java."

-
+
   <echoproperties>
     <propertyset>
       <propertyref prefix="java."/>
     </propertyset>
   </echoproperties>
-
+

This again lists all properties beginning with "java." using a nested </propertyset> which is an equivalent but longer way.

-
-  <echoproperties regex=".*ant.*"/>
-
+
<echoproperties regex=".*ant.*"/>

Lists all properties that contain "ant" in their names. The equivalent snippet with </propertyset> is:

-
+
   <echoproperties>
     <propertyset>
       <propertyref regex=".*ant.*"/>
     </propertyset>
   </echoproperties>
-
+ diff --git a/manual/Tasks/exec.html b/manual/Tasks/exec.html index bb7a17af9..96dbdb12b 100644 --- a/manual/Tasks/exec.html +++ b/manual/Tasks/exec.html @@ -60,7 +60,6 @@ types listed in the environment variable PATHEXT. That is only used by the shell One normally needs to execute the command shell executable cmd using the /c switch.

-
 <target name="help">
   <exec executable="cmd">
@@ -69,7 +68,7 @@ types listed in the environment variable PATHEXT. That is only used by the shell
     <arg value="-p"/>
   </exec>
 </target>
-
+

A common problem is not having the executable on the PATH. In case you get an error message Cannot run program "...":CreateProcess error=2. The system cannot find @@ -79,7 +78,6 @@ to the PATH (set PATH=%PATH%;dirOfProgram) or specify the absolute path executable attribute in your buildfile.

-

Cygwin Users

The <exec> task will not understand paths such as /bin/sh for the executable parameter. This is because the Java VM in which Ant is @@ -116,27 +114,20 @@ set to true instead as this task will follow the VM's interpretation of exit codes.

RedHat S/390 Users

-

It has been reported on the VMESA-LISTSERV that shell scripts invoked via the Ant Exec task must have their interpreter specified, i.e., the scripts must start with something like:

-
 #!/bin/bash
 
-
-

or the task will fail as follows:

- -
 [exec] Warning: UNIXProcess.forkAndExec native error: Exec format error
 [exec] Result: 255
 
-

Running Ant as a background process on Unix(-like) systems

@@ -318,12 +309,11 @@ start with something like:

Examples

-
 <exec dir="${src}" executable="cmd.exe" os="Windows 2000" output="dir.txt">
   <arg line="/c dir"/>
 </exec>
-
+

Parameters specified as nested elements

arg

Command line arguments should be specified as nested @@ -398,34 +388,31 @@ it is not on the path. Any time you see such an error from any Ant task, it is usually not an Ant bug, but some configuration problem on your machine.

Examples

-
+
 <exec executable="emacs">
   <env key="DISPLAY" value=":1.0"/>
 </exec>
-
+

starts emacs on display 1 of the X Window System.

- -
+
 <property environment="env"/>
 <exec ... >
   <env key="PATH" path="${env.PATH}:${basedir}/bin"/>
 </exec>
-
+

adds ${basedir}/bin to the PATH of the system command.

- -
+
 <property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/>
 <property name="file" location="ant/docs/manual/index.html"/>
 
 <exec executable="${browser}" spawn="true">
     <arg value="${file}"/>
 </exec>
-
+

Starts the ${browser} with the specified ${file} and end the Ant process. The browser will remain.

- -
+
 <exec executable="cat">
     <redirector outputproperty="redirector.out"
                 errorproperty="redirector.err"
@@ -437,7 +424,7 @@ Ant process. The browser will remain.

<errormapper type="merge" to="redirector.err"/> </redirector> </exec> -
+ Sends the string "blah before blah" to the "cat" executable, using an <inputfilterchain> diff --git a/manual/Tasks/genkey.html b/manual/Tasks/genkey.html index 5010a201c..de8f39396 100644 --- a/manual/Tasks/genkey.html +++ b/manual/Tasks/genkey.html @@ -102,13 +102,12 @@ with "\,".

The following two examples are identical:

Examples

-
+
 <genkey alias="apache-group" storepass="secret"
   dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/>
-
+ -
-
+
 <genkey alias="apache-group" storepass="secret" >
   <dname>
     <param name="CN" value="Ant Group"/>
@@ -117,7 +116,6 @@ with "\,".

<param name="C" value="US"/> </dname> </genkey>
-
diff --git a/manual/Tasks/image.html b/manual/Tasks/image.html index d1a06e202..e3153e202 100644 --- a/manual/Tasks/image.html +++ b/manual/Tasks/image.html @@ -219,38 +219,38 @@ nested inside the Draw object.

Examples

-
+
  <image destdir="samples/low" overwrite="yes">
      <fileset dir="samples/full">
          <include name="**/*.jpg"/>
      </fileset>
      <scale width="160" height="160" proportions="fit"/>
  </image>
-
+

Create thumbnails of my images and make sure they all fit within the 160x160 size whether the image is portrait or landscape.

-
+
 <image srcdir="src" includes="*.png">
     <scale proportions="width" width="40"/>
 </image>
-
+

Creates a thumbnail for all PNG-files in src in the size of 40 pixel keeping the proportions and stores the src.

-
+
 <image srcdir="src" destdir="dest" includes="*.png">
     <scale proportions="width" width="40"/>
 </image>
-
+

Same as above but stores the result in dest.

-
+
 <image srcdir="src" destdir="dest" includes="*.png">
     <scale proportions="width" width="40"/>
     <globmapper from="*" to="scaled-*"/>
 </image>
-
+

Same as above but stores the resulting file names will be prefixed by "scaled-".

diff --git a/manual/Tasks/jar.html b/manual/Tasks/jar.html index ea3eecce8..c2631a39f 100644 --- a/manual/Tasks/jar.html +++ b/manual/Tasks/jar.html @@ -440,39 +440,38 @@ depend on your manifest:

nested <provider> elements may be used.

-

Examples

Simple

-
  <jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/>
+
  <jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/>

jars all files in the ${build}/classes directory into a file called app.jar in the ${dist}/lib directory.

With filters

-
  <jar destfile="${dist}/lib/app.jar"
+
  <jar destfile="${dist}/lib/app.jar"
        basedir="${build}/classes"
-       excludes="**/Test.class"/>
+ excludes="**/Test.class"/>

jars all files in the ${build}/classes directory into a file called app.jar in the ${dist}/lib directory. Files with the name Test.class are excluded.

-
  <jar destfile="${dist}/lib/app.jar"
+
  <jar destfile="${dist}/lib/app.jar"
        basedir="${build}/classes"
        includes="mypackage/test/**"
-       excludes="**/Test.class"/>
+ excludes="**/Test.class"/>

jars all files in the ${build}/classes directory into a file called app.jar in the ${dist}/lib directory. Only files under the directory mypackage/test are used, and files with the name Test.class are excluded.

Multiple filesets

-
  <jar destfile="${dist}/lib/app.jar">
+
  <jar destfile="${dist}/lib/app.jar">
     <fileset dir="${build}/classes"
              excludes="**/Test.class"/>
     <fileset dir="${src}/resources"/>
-  </jar>
+ </jar>

jars all files in the ${build}/classes directory and also in the ${src}/resources directory together into a file called app.jar in the ${dist}/lib directory. @@ -484,20 +483,20 @@ by Java).

Merging archives

-
 <jar destfile="build/main/checksites.jar">
+
 <jar destfile="build/main/checksites.jar">
     <fileset dir="build/main/classes"/>
     <zipfileset includes="**/*.class" src="lib/main/some.jar"/>
     <manifest>
       <attribute name="Main-Class"
             value="com.acme.checksites.Main"/>
     </manifest>
-  </jar>
+ </jar>

Creates an executable jar file with a main class "com.acme.checksites.Main", and embeds all the classes from the jar lib/main/some.jar.

-
 <jar destfile="build/main/checksites.jar">
+
 <jar destfile="build/main/checksites.jar">
     <fileset dir="build/main/classes"/>
     <restrict>
      <name name="**/*.class"/>
@@ -511,14 +510,14 @@ by Java).

<attribute name="Main-Class" value="com.acme.checksites.Main"/> </manifest> - </jar>
+ </jar>

Creates an executable jar file with a main class "com.acme.checksites.Main", and embeds all the classes from all the jars in lib/main.

Inline manifest

-
  <jar destfile="test.jar" basedir=".">
+
  <jar destfile="test.jar" basedir=".">
     <include name="build"/>
     <manifest>
       <!-- If this is an Applet or Web Start application, include
@@ -536,14 +535,14 @@ by Java).

<attribute name="Sealed" value="false"/> </section> </manifest> - </jar>
+ </jar>

This is an example of an inline manifest specification including the version of the build program (Implementation-Version). Note that the Built-By attribute will take the value of the Ant property ${user.name}. The manifest produced by the above would look like this:

-
Manifest-Version: 1.0
+
Manifest-Version: 1.0
 Permissions: sandbox
 Codebase: example.com
 Built-By: conor
@@ -553,7 +552,7 @@ Implementation-Version: 1.0.0beta2
 Created-By: Apache Ant 1.9.2
 
 Name: common/MyClass.class
-Sealed: false
+Sealed: false

Service Provider

@@ -561,20 +560,18 @@ Sealed: false The following shows how to create a jar file specifying a service with an implementation of the JDK 6 scripting interface:

-
<jar destfile="pinky.jar">
+
<jar destfile="pinky.jar">
   <fileset dir="build/classes"/>
   <service type="javax.script.ScriptEngineFactory"
            provider="org.acme.PinkyLanguage"/>
 </jar>
-
- - +

The following shows how to create a jar file specifying a service with two implementations of the JDK 6 scripting interface:

-
+
 <jar destfile="pinkyandbrain.jar">
   <fileset dir="classes"/>
   <service type="javax.script.ScriptEngineFactory">
@@ -582,8 +579,7 @@ Sealed: false
<provider classname="org.acme.BrainLanguage"/> </service> </jar> - - +

JEP 238 example: a Multi-Release JAR Files

@@ -601,7 +597,7 @@ Sealed: false ${java.classes} and the Java 9 classes are compiled into ${java9.classes}.

-
+
     <jar destfile="mrjar.jar">
       <manifest>
         <!-- special mf-entry according to the spec -->
@@ -613,7 +609,7 @@ Sealed: false
<!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader --> <zipfileset prefix="META-INF/versions/9/" dir="${java9.classes}"/> </jar> - + diff --git a/manual/Tasks/javac.html b/manual/Tasks/javac.html index a0656bb19..1a79c6f57 100644 --- a/manual/Tasks/javac.html +++ b/manual/Tasks/javac.html @@ -914,7 +914,7 @@ while all others are false.

to be given to the runtime system of the javac executable, so it needs to be prepended with a "-J". For example: -
+
   <property name="patched.javac.jar"
             location="${my.patched.compiler}/dist/lib/javac.jar"/>
 
@@ -927,7 +927,7 @@ while all others are false.

<patched.javac srcdir="src/java" destdir="build/classes" debug="yes"/> -
+

Note on package-info.java

diff --git a/manual/Tasks/javacc.html b/manual/Tasks/javacc.html index 0dba9cdf2..df359b27d 100644 --- a/manual/Tasks/javacc.html +++ b/manual/Tasks/javacc.html @@ -189,13 +189,13 @@

Example

-
+
 <javacc
     target="src/Parser.jj"
     outputdirectory="build/src"
     javacchome="c:/program files/JavaCC"
     static="true"/>
-
+

This invokes JavaCC on grammar file src/Parser.jj, writing the generated files to build/src. The grammar option STATIC is set to true when diff --git a/manual/Tasks/jdepend.html b/manual/Tasks/jdepend.html index 6fd5486d1..4ad2b5f81 100644 --- a/manual/Tasks/jdepend.html +++ b/manual/Tasks/jdepend.html @@ -117,7 +117,6 @@ to ignore (requires JDepend 2.5 or above).

Examples

-
 <jdepend classpathref="base.path">
     <classespath>
@@ -125,13 +124,12 @@ to ignore (requires JDepend 2.5 or above).

</classespath> </jdepend>
-

This invokes JDepend on the build directory, writing the output on the standard output. The classpath is defined using a classpath reference.

-
+
 <jdepend outputfile="docs/jdepend.xml" fork="yes" format="xml">
     <sourcespath>
@@ -143,14 +141,12 @@ classpath reference.

</classpath> </jdepend>
-

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

-
 <jdepend classpathref="base.path">
     <exclude name="java.*>
@@ -160,7 +156,6 @@ classpath is defined using nested elements.

</classespath> </jdepend>
-

This invokes JDepend with the build directory as the base for class files to analyze, and will ignore all classes in the java.* and diff --git a/manual/Tasks/jjdoc.html b/manual/Tasks/jjdoc.html index caf718a6f..d0bf263e4 100644 --- a/manual/Tasks/jjdoc.html +++ b/manual/Tasks/jjdoc.html @@ -44,56 +44,42 @@ generated BNF documentation file.

- - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - - - - + + + - - + @@ -101,15 +87,13 @@ option.
AttributeDescriptionRequiredAttributeDescriptionRequired
targetThe javacc grammar file to process.YestargetThe javacc grammar file to process.Yes
javacchomeThe directory containing the JavaCC distribution.YesjavacchomeThe directory containing the JavaCC distribution.Yes
outputfileThe file to write the generated BNF documentation file to. If not set, -the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txtNooutputfileThe file to write the generated BNF documentation file to. If not set, + the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txtNo
textSets the TEXT BNF documentation option. This is a boolean -option.NotextSets the TEXT BNF documentation option. This is a boolean option.No
onetableSets the ONE_TABLE BNF documentation option. This is a boolean option.NoonetableSets the ONE_TABLE BNF documentation option. This is a boolean option.No
maxmemory Max amount of memory to allocate to the forked VM. since Ant 1.8.3
-

-Example

+

Example

-
<jjdoc
     target="src/Parser.jj"
     outputfile="doc/ParserBNF.html"
     javacchome="c:/program files/JavaCC"/>
-
+ This invokes JJDoc on grammar file src/Parser.jj, writing the generated BNF documentation file, ParserBNF.html, file to doc. diff --git a/manual/Tasks/jjtree.html b/manual/Tasks/jjtree.html index 4bfd484ab..a94390e40 100644 --- a/manual/Tasks/jjtree.html +++ b/manual/Tasks/jjtree.html @@ -194,17 +194,14 @@ option.

Example

-
<jjtree
     target="src/Parser.jjt"
     outputdirectory="build/src"
     javacchome="c:/program files/JavaCC"
     nodeusesparser="true"/>
-
This invokes JJTree on grammar file src/Parser.jjt, writing the generated grammar file, Parser.jj, file to build/src. The grammar option NODE_USES_PARSER is set to true when invoking JJTree. -

Comparison output locations between command line JJTree and different Ant taskdef versions

diff --git a/manual/Tasks/junitreport.html b/manual/Tasks/junitreport.html index 2b0e72c1d..6c8e86192 100644 --- a/manual/Tasks/junitreport.html +++ b/manual/Tasks/junitreport.html @@ -181,20 +181,18 @@ a nested <factory> can be used to specify factory settings.

Example of report

-
-
<junitreport todir="./reports">
+
<junitreport todir="./reports">
   <fileset dir="./reports">
     <include name="TEST-*.xml"/>
   </fileset>
   <report format="frames" todir="./report/html"/>
-</junitreport>
-
-
+</junitreport> +

would generate a TESTS-TestSuites.xml file in the directory reports and generate the default framed report in the directory report/html.

+

Example of report with xsl params

-
-
+
 <junitreport todir="${outputdir}">
     <fileset dir="${jrdir}">
         <include name="TEST-*.xml"/>
@@ -205,9 +203,8 @@ generate the default framed report in the directory report/html.

<param name="key1" expression="value1"/> <param name="key2" expression="value2"/> </report> -</junitreport> -
-
+</junitreport> +

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

diff --git a/manual/Tasks/macrodef.html b/manual/Tasks/macrodef.html index dd816d008..adf6869a8 100644 --- a/manual/Tasks/macrodef.html +++ b/manual/Tasks/macrodef.html @@ -243,7 +243,6 @@ The following example defined a task called testing and runs it.

-
 <macrodef name="testing">
    <attribute name="v" default="NOT SET"/>
@@ -260,7 +259,6 @@
    </some-tasks>
 </testing>
 
-

The following fragment defines a task called <call-cc> which take the attributes "target", "link" and "target.dir" and the @@ -268,7 +266,6 @@ uses the <cc> task from the ant-contrib project.

-
 <macrodef name="call-cc">
    <attribute name="target"/>
@@ -286,11 +283,9 @@
       </sequential>
 </macrodef>
 
-

This then can be used as follows:

-
 <call-cc target="unittests" link="executable"
          target.dir="${build.bin.dir}">
@@ -303,13 +298,11 @@
    </cc-elements>
 </call-cc>
 
-

The following fragment shows <call-cc>, but this time using an implicit element and with the link and target.dir arguments having default values.

-
 <macrodef name="call-cc">
    <attribute name="target"/>
@@ -327,12 +320,10 @@
       </sequential>
 </macrodef>
 
-

This then can be used as follows, note that <cc-elements> is not specified.

-
 <call-cc target="unittests">
    <includepath location="${gen.dir}"/>
@@ -342,11 +333,9 @@
    <linker refid="linker-libs"/>
 </call-cc>
 
-

The following shows the use of the text element.

-
 <macrodef name="echotest">
    <text name="text"/>
@@ -358,7 +347,6 @@
    Hello world
 </echotest>
 
-

The following uses a prior defined attribute for setting the default value of another. The output would be @@ -367,7 +355,6 @@ because while processing the two-line the value for one is not set.

-
 <macrodef name="test">
    <attribute name="one"/>                     *1
@@ -378,7 +365,6 @@
 </macrodef>
 <test one="test"/>
 
-
diff --git a/manual/Tasks/mail.html b/manual/Tasks/mail.html index 2ada002c3..c702b8341 100644 --- a/manual/Tasks/mail.html +++ b/manual/Tasks/mail.html @@ -309,18 +309,18 @@ the <message> element.

Examples

-
+
 <mail from="me"
       tolist="you"
       subject="Results of nightly build"
       files="build.log"/>
-
+

Sends an email from me to you with a subject of Results of nightly build and includes the contents of the file build.log in the body of the message.

-
+
 <mail mailhost="smtp.myisp.com" mailport="1025" subject="Test build">
   <from address="config@myisp.com"/>
   <replyto address="me@myisp.com"/>
@@ -332,7 +332,7 @@ the <message> element.

</fileset> </attachments> </mail> -
+

Sends an eMail from config@myisp.com to all@xyz.com with a subject of Test Build. Replies to this email will go to me@myisp.com. @@ -341,7 +341,7 @@ 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. ${buildname} will be replaced with the buildname property's value.

-
+
 <property name="line2" value="some_international_message"/>
 <echo message="${line2}"/>
 
@@ -350,7 +350,7 @@ will be replaced with the buildname property's value.

<to address="all@xyz.com"/> <message>some international text:${line2}</message> </mail> -
+

Sends an eMail from me@myisp.com to all@xyz.com with a subject of Test Build, the message body being coded in UTF-8 diff --git a/manual/Tasks/manifestclasspath.html b/manual/Tasks/manifestclasspath.html index c19fb5d55..3c09d5cb8 100644 --- a/manual/Tasks/manifestclasspath.html +++ b/manual/Tasks/manifestclasspath.html @@ -96,20 +96,18 @@ defined in-place, or refer to a path defined elsewhere using the This classpath must not be empty, and is required.

Examples

-
-
+  
     <manifestclasspath property="jar.classpath"
                        jarfile="build/acme.jar">
       <classpath refid="classpath" />
     </manifestclasspath>
-  
+

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

-
diff --git a/manual/Tasks/netrexxc.html b/manual/Tasks/netrexxc.html index 6231aa910..b7927e06d 100644 --- a/manual/Tasks/netrexxc.html +++ b/manual/Tasks/netrexxc.html @@ -324,16 +324,14 @@ for more information.

Examples

-
-

<netrexxc srcDir="/source/project" + +

<netrexxc srcDir="/source/project"
            includes="vnr/util/*"
            destDir="/source/project/build"
            classpath="/source/project2/proj.jar"
            comments="true"
            crossref="false" replace="true"
-           keep="true"/>
-  

-
+ keep="true"/> diff --git a/manual/Tasks/pack.html b/manual/Tasks/pack.html index 3ecebca86..c8d6fa85a 100644 --- a/manual/Tasks/pack.html +++ b/manual/Tasks/pack.html @@ -63,20 +63,20 @@ resource collection

The specified resource will be used as src. Since Apache Ant 1.7

Examples

-
+
 <gzip src="test.tar" destfile="test.tar.gz"/>
-
-
+
+
 <bzip2 src="test.tar" destfile="test.tar.bz2"/>
-
-
+
+
 <xz src="test.tar" destfile="test.tar.xz"/>
-
-
+
+
 <gzip destfile="archive.tar.gz">
   <url url="http://example.org/archive.tar"/>
 </gzip>
-
+

downloads http://example.org/archive.tar and compresses it to archive.tar.gz in the project's basedir on the fly.

diff --git a/manual/Tasks/presetdef.html b/manual/Tasks/presetdef.html index d975bf953..8becea2ba 100644 --- a/manual/Tasks/presetdef.html +++ b/manual/Tasks/presetdef.html @@ -71,7 +71,6 @@ srcdir and destdir attributes set. It also has a src element to source files from a generated directory. -
 <presetdef name="my.javac">
    <javac debug="${debug}" deprecation="${deprecation}"
@@ -80,24 +79,18 @@
    </javac>
 </presetdef>
 
-
This can be used as a normal javac task - example: -
 <my.javac/>
 
-
The attributes specified in the preset task may be overridden - i.e. they may be seen as optional attributes - example: -
 <my.javac srcdir="${test.src}" deprecation="no"/>
 
-
One may put a presetdef definition in an antlib. For example suppose the jar file antgoodies.jar has the antlib.xml as follows: -
 <antlib>
    <taskdef resource="com/acme/antgoodies/tasks.properties"/>
@@ -108,9 +101,7 @@
    </presetdef>
 </antlib>
 
-
One may then use this in a build file as follows: -
 <project default="example" xmlns:antgoodies="antlib:com.acme.antgoodies">
    <target name="example">
@@ -121,12 +112,10 @@
    </target>
 </project>
 
-

The following is an example of evaluation of properties when the definition is used:

-
 <target name="defineandcall">
    <presetdef name="showmessage">
@@ -143,11 +132,9 @@
    <showmessage/>
 </target>
 
-

The command ant defineandcall results in the output:

-
 defineandcall:
 [showmessage] message is '${message}'
@@ -156,14 +143,13 @@ defineandcall:
 called:
 [showmessage] message is 'Message 2'
 
-

It is possible to use a trick to evaluate properties when the definition is made rather than used. This can be useful if you do not expect some properties to be available in child builds run with <ant ... inheritall="false">:

-
+
 <macrodef name="showmessage-presetdef">
   <attribute name="messageval"/>
   <presetdef name="showmessage">
@@ -171,7 +157,7 @@ properties to be available in child builds run with
   </presetdef>
 </macrodef>
 <showmessage-presetdef messageval="${message}"/>
-
+ diff --git a/manual/Tasks/propertyfile.html b/manual/Tasks/propertyfile.html index f698301ea..49444b7f0 100644 --- a/manual/Tasks/propertyfile.html +++ b/manual/Tasks/propertyfile.html @@ -191,7 +191,7 @@ The slashes conform to the expectations of the Properties class. The file will The layout and comment of the original file is preserved. New properties are added at the end of the file. Existing properties are overwritten in place.

-
<propertyfile
+
<propertyfile
     file="my.properties"
     comment="My properties">
   <entry  key="akey" value="avalue"/>
@@ -200,10 +200,10 @@ The layout and comment of the original file is preserved. New properties are add
   <entry  key="formated.int" type="int" default="0013" operation="+" pattern="0000"/>
   <entry  key="formated.date" type="date" value="now" pattern="DDD HH:mm"/>
 </propertyfile>
-
+

To produce dates relative from today :

-
<propertyfile
+
<propertyfile
     file="my.properties"
     comment="My properties">
   <entry  key="formated.date-1"
@@ -213,21 +213,21 @@ To produce dates relative from today :

type="date" default="now" pattern="DDD" operation="+" value="1"/> </propertyfile> -
+

Concatenation of strings :

-
<propertyfile
+
<propertyfile
     file="my.properties"
     comment="My properties">
   <entry  key="progress" default="" operation="+" value="."/>
 </propertyfile>
-
+

Each time called, a "." will be appended to "progress"

Pumps the project version to the next minor version (increase minor and set path=0):

-
<target name="nextMinorVersion">
+
<target name="nextMinorVersion">
    <property
      name="header"
      value="##Generated file - do not modify!"/>
@@ -238,7 +238,7 @@ Concatenation of strings :

<entry key="product.build.date" type="date" value="now" /> </propertyfile> </target> -
+ After running this target the version changed e.g. from 3.2.2 to 3.3.0. diff --git a/manual/Tasks/renameextensions.html b/manual/Tasks/renameextensions.html index d54d1fad1..664edfd9b 100644 --- a/manual/Tasks/renameextensions.html +++ b/manual/Tasks/renameextensions.html @@ -105,16 +105,14 @@ supports most attributes of <fileset>

Examples

-
-

<renameext srcDir="/source/project1" + +

<renameext srcDir="/source/project1"
               includes="**"
               excludes="**/samples/*"
               fromExtension=".java.keep"
               toExtension=".java"
               replace="true"/>
-
-  

-
+ diff --git a/manual/Tasks/replace.html b/manual/Tasks/replace.html index bc1988fd8..c2981cd59 100644 --- a/manual/Tasks/replace.html +++ b/manual/Tasks/replace.html @@ -159,30 +159,30 @@ them.

expandProperties Whether to expand properties in the nested text. - since Ant 1.8.0. + Since Ant 1.8.0. No, defaults to true.

Examples

-
+
 <replace dir="${src}" value="wombat">
   <include name="**/*.html"/>
   <replacetoken><![CDATA[multi line
 token]]></replacetoken>
 </replace>
-
+

replaces occurrences of the string "multi line\ntoken" with the string "wombat", in all HTML files in the directory ${src}.Where \n is the platform specific line separator.

-
+
 <replace file="${src}/index.html">
   <replacetoken><![CDATA[two line
 token]]></replacetoken>
   <replacevalue><![CDATA[two line
 token]]></replacevalue>
 </replace>
-
+

replacefilter

In addition to allowing for multiple replacements, optional nested <replacefilter> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <replace> attribute propertyFile.

@@ -213,7 +213,7 @@ token]]></replacevalue>

If neither value nor property is used, the value provided using the <replace> attribute value and/or the <replacevalue> element is used. If no value was specified using either of these options, the token is replaced with an empty string.

Examples

-
+
 <replace
     file="configure.sh"
     value="defaultvalue"
@@ -231,7 +231,7 @@ token]]></replacevalue>
     <replacevalue>value4</replacevalue>
   </replacefilter>
 </replace>
-
+

In file configure.sh, replace all instances of "@token1@" with "defaultvalue", all instances of "@token2@" with "value2", and all instances of "@token3@" with the value of the property "property.key", as it appears in property file src/name.properties.

Note: It is possible to use either the token/<replacetoken> and value/<replacevalue> attributes/elements, the nested replacefilter elements, or both in the same operation.

diff --git a/manual/Tasks/replaceregexp.html b/manual/Tasks/replaceregexp.html index 68e6523fc..68f2c72e2 100644 --- a/manual/Tasks/replaceregexp.html +++ b/manual/Tasks/replaceregexp.html @@ -115,23 +115,22 @@ value, in the file ${src}/build.properties

This task supports a nested Regexp element to specify the regular expression. You can use this element to refer to a previously defined regular expression datatype instance.

-
+ <regexp id="id" pattern="alpha(.+)beta"/>
<regexp refid="id"/> -
+

This task supports a nested Substitution element to specify the substitution pattern. You can use this element to refer to a previously defined substitution pattern datatype instance.

-
+ <substitution id="id" expression="beta\1alpha"/>
<substitution refid="id"/> -
+

Examples

-
-
+
 <replaceregexp byline="true">
   <regexp pattern="OldProperty=(.*)"/>
   <substitution expression="NewProperty=\1"/>
@@ -139,62 +138,54 @@ value, in the file ${src}/build.properties

<include name="*.properties"/> </fileset> </replaceregexp> -
+

replaces occurrences of the property name "OldProperty" with "NewProperty" in a properties file, preserving the existing value, in all files ending in .properties in the current directory

-
-
<replaceregexp match="\s+" replace=" " flags="g" byline="true">
     <fileset dir="${html.dir}" includes="**/*.html"/>
 </replaceregexp>
-
+

replaces all whitespaces (blanks, tabs, etc) by one blank remaining the line separator. So with input

-
+
 <html>    <body>
 <<TAB>><h1>    T E S T   </h1>  <<TAB>>
 <<TAB>> </body></html>
-
+

would converted to

-
 <html> <body>
  <h1> T E S T </h1> </body></html>
 
-

-
+
<replaceregexp match="\\n" replace="${line.separator}" flags="g" byline="true">
     <fileset dir="${dir}"/>
 </replaceregexp>
-
+

replaces all \n markers (beware the quoting of the backslash) by a line break. So with input

-
 one\ntwo\nthree
-
+

would converted to

-
 one
 two
 three
 
-
+

Beware that inserting line breaks could break file syntax. For example in xml:

-
 <root>
   <text>line breaks \n should work in text</text>
   <attribute value="but breaks \n attributes" />
 </root>
 
-
diff --git a/manual/Tasks/rexec.html b/manual/Tasks/rexec.html index 7874c7bcb..c3940fcd7 100644 --- a/manual/Tasks/rexec.html +++ b/manual/Tasks/rexec.html @@ -100,14 +100,14 @@ this is "true" by default

Example

A simple example of connecting to a server and running a command. -
+
 <rexec userid="bob" password="badpass" server="localhost" command="ls"/>
-
+ The task can be used with other ports as well: -
+
 <rexec port="80" userid="bob" password="badpass" server="localhost" command="ls"/>
-
+ diff --git a/manual/Tasks/script.html b/manual/Tasks/script.html index eedbb176e..375c1f973 100644 --- a/manual/Tasks/script.html +++ b/manual/Tasks/script.html @@ -162,7 +162,7 @@ different location values.

Examples

The following snippet shows use of five different languages: -
+  
     <property name="message" value="Hello world"/>
 
     <script language="groovy">
@@ -185,7 +185,6 @@ The following snippet shows use of five different languages:
 print "message is %s" % message
     </script>
 
-

Note that for the jython example, the script contents must start on the first column. @@ -196,28 +195,26 @@ print "message is %s" % message

The following script shows a little more complicated jruby example:

-
+  
 <script language="ruby">
   xmlfiles = Dir.new(".").entries.delete_if { |i| ! (i =~ /\.xml$/) }
   xmlfiles.sort.each { |i| $self.log(i) }
 </script>
 
-

The same example in groovy is:

-
+  
 <script language="groovy">
   xmlfiles = new java.io.File(".").listFiles().findAll{ it =~ "\.xml$"}
   xmlfiles.sort().each { self.log(it.toString())}
 </script>
 
-

The following example shows the use of classpath to specify the location of the beanshell jar file.

-
+  
 <script language="beanshell" setbeans="true">
   <classpath>
     <fileset dir="${user.home}/lang/beanshell" includes="*.jar" />
@@ -225,12 +222,11 @@ print "message is %s" % message
   System.out.println("Hello world");
 </script>
 
-

The following script uses javascript to create a number of echo tasks and execute them.

-
+
 <project name="squares" default="main" basedir=".">
 
   <target name="main">
@@ -248,9 +244,9 @@ print "message is %s" % message
   </target>
 
 </project>
-
+

generates

-
+
 main:
 1
 4
@@ -264,11 +260,11 @@ main:
 100
 
 BUILD SUCCESSFUL
-
+

Now a more complex example using the Java API and the Ant API. The goal is to list the filesizes of all files a <fileset/> caught.

-
+
 
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <project name="MyProject" basedir="." default="main">
@@ -316,7 +312,7 @@ filesizes of all files a <fileset/> caught.

]]></script> </target> </project> -
+

We want to use the Java API. Because we don't want always typing the package signature we do an import. Rhino knows two different methods for import statements: one for packages and one for a single class. By default only the java packages are available, so @@ -343,7 +339,7 @@ appropriate logging before and after invoking execute(). task. This task will add filesets and paths to a referenced path. If the path does not exist, it will be created.

-
+
 <!--
        Define addtopath task
  -->
@@ -372,14 +368,14 @@ appropriate logging before and after invoking execute().
     }
     project.addTaskDefinition("addtopath", AddToPath.class);
 </script>
-
+

An example of using this task to create a path from a list of directories (using antcontrib's <for> task) follows:

-
+
 <path id="main.path">
   <fileset dir="build/classes"/>
 </path>
@@ -392,7 +388,7 @@ appropriate logging before and after invoking execute().
     </addtopath>
   </sequential>
 </ac:for>
-
+ diff --git a/manual/Tasks/scriptdef.html b/manual/Tasks/scriptdef.html index 1d016e6ff..554e04edd 100644 --- a/manual/Tasks/scriptdef.html +++ b/manual/Tasks/scriptdef.html @@ -282,8 +282,8 @@ error. For example in the above script, removing the closing curly bracket would result in this error

-

build.xml:15: SyntaxError: missing } in compound -statement (scriptdef <scripttest2>; line 10)

+
build.xml:15: SyntaxError: missing } in compound
+statement (scriptdef <scripttest2>; line 10)

Script errors are only detected when a script task is actually executed. diff --git a/manual/Tasks/setpermissions.html b/manual/Tasks/setpermissions.html index 28bf99950..7ef144953 100644 --- a/manual/Tasks/setpermissions.html +++ b/manual/Tasks/setpermissions.html @@ -91,18 +91,18 @@

Resource Collections are used to select groups of resources.

Examples

-
+
 <setpermissions mode="755">
   <file file="${dist}/start.sh"/>
 </setpermissions>
-  
+

makes the "start.sh" file readable and executable for anyone and in addition writable by the owner.

-
+
 <setpermissions permissions="OWNER_READ,OWNER_WRITE,OWNER_EXECUTE,OTHERS_READ,OTHERS_EXECUTE,GROUP_READ,GROUP_EXECUTE">
   <file file="${dist}/start.sh"/>
 </setpermissions>
-  
+

makes the "start.sh" file readable and executable for anyone and in addition writable by the owner.

diff --git a/manual/Tasks/signjar.html b/manual/Tasks/signjar.html index a422b9fd7..e414db9e5 100644 --- a/manual/Tasks/signjar.html +++ b/manual/Tasks/signjar.html @@ -223,15 +223,15 @@ block

Examples

For instructions on generating a code signing certificate, see the keytool documentation and/or instructions from your certificate authority.

-
+
 <signjar jar="${dist}/lib/ant.jar"
 alias="apache-group" storepass="secret"/>
-
+

signs the ant.jar with alias "apache-group" accessing the keystore and private key via "secret" password.

-
+
 <signjar destDir="signed"
     alias="testonly" keystore="testkeystore"
     storepass="apacheant"
@@ -241,14 +241,13 @@ alias="apache-group" storepass="secret"/>
   </path>
   <flattenmapper />
 </signjar>
-
+

Sign all JAR files matching the dist/**/*.jar pattern, copying them to the directory "signed" afterwards. The flatten mapper means that they will all be copied to this directory, not to subdirectories. -

-
+
 <signjar
     alias="testonly" keystore="testkeystore"
     storepass="apacheant"
@@ -258,12 +257,12 @@ all be copied to this directory, not to subdirectories.
     <fileset dir="dist" includes="**/*.jar" />
   </path>
 </signjar>
-
+

Sign all the JAR files in dist/**/*.jar in-situ. Lazy signing is used, so the files will only be signed if they are not already signed.

-
+
 <signjar
     alias="testonly" keystore="testkeystore"
     storepass="apacheant"
@@ -273,7 +272,7 @@ so the files will only be signed if they are not already signed.
     <fileset dir="dist" includes="**/*.jar" />
   </path>
 </signjar>
-
+

Sign all the JAR files in dist/**/*.jar using the digest algorithm SHA1 and the signature algorithm MD5withRSA. This is especially useful when you want to use diff --git a/manual/Tasks/sound.html b/manual/Tasks/sound.html index f0de67dd0..7f8f341c9 100644 --- a/manual/Tasks/sound.html +++ b/manual/Tasks/sound.html @@ -84,7 +84,7 @@ will be logged.

Examples

-
+
 <target name="fun" if="fun" unless="fun.done">
   <sound>
@@ -94,7 +94,6 @@ will be logged.
   <property name="fun.done" value="true"/>
 </target>
 
-
plays the bell.wav sound-file if the build succeeded, or the ohno.wav sound-file if the build failed, three times, if the fun property is set to true. @@ -103,7 +102,6 @@ is a dependency of an "initialization" target that other targets depend on, the fun.done property prevents the target from being executed more than once. -
 <target name="fun" if="fun" unless="fun.done">
   <sound>
@@ -113,7 +111,6 @@ more than once.
   <property name="fun.done" value="true"/>
 </target>
 
-
randomly selects a sound-file to play when the build succeeds or fails. diff --git a/manual/Tasks/splash.html b/manual/Tasks/splash.html index cf8bcad7a..e8eed6911 100644 --- a/manual/Tasks/splash.html +++ b/manual/Tasks/splash.html @@ -105,7 +105,6 @@ the build exactly what is going on. User to authenticate to the proxy as. No None - password @@ -113,23 +112,20 @@ the build exactly what is going on. No None -

Examples

-
-<splash/>
-
+
<splash/>

Splash images/ant_logo_large.gif from the classpath.

-
+
 <splash imageurl="http://jakarta.apache.org/images/jakarta-logo.gif"
            useproxy="true"
            showduration="5000"/>
 
-
+

Splashes the jakarta logo, for an initial period of 5 seconds.

Splash with controlled progress and nondefault text

-
+
         <target name="test_new_features">
                 <echo>New features</echo>
                 <splash progressRegExp="Progress: (.*)%" showduration="0" displayText="Test text"/>
@@ -145,7 +141,7 @@ the build exactly what is going on.
                 <echo>Progress: 100%</echo>
                 <sleep seconds="3"/>
         </target>
-
+ diff --git a/manual/Tasks/sql.html b/manual/Tasks/sql.html index 4e52ae4e8..58d673fe9 100644 --- a/manual/Tasks/sql.html +++ b/manual/Tasks/sql.html @@ -352,19 +352,19 @@ href="../using.html#path">PATH like structure and can also be set via a nest

Examples

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
     password="pass"
     src="data.sql"/>
-
+

Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the file data.sql

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -372,14 +372,14 @@ the file data.sql

src="data.sql"> <connectionProperty name="internal_logon" value="SYSDBA"> </sql> -
+

Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the file data.sql. Also sets the property internal_logon to the value SYSDBA.

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -390,7 +390,7 @@ values(1,2,3,4);
 
 truncate table some_other_table;
 </sql>
-
+

Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the two SQL statements @@ -402,7 +402,7 @@ truncate table some_other_table; need to escape <, > & or other special characters. For example:

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -411,12 +411,12 @@ or other special characters. For example:

update some_table set column1 = column1 + 1 where column2 < 42; ]]></sql> -
+ The following command turns property expansion in nested text on (it is off purely for backwards compatibility), then creates a new user in the HSQLDB database using Ant properties. -
<sql
+
<sql
     driver="org.hsqldb.jdbcDriver";
     url="jdbc:hsqldb:file:${database.dir}"
     userid="sa"
@@ -426,14 +426,14 @@ compatibility), then creates a new user in the HSQLDB database using Ant propert
     CREATE USER ${newuser} PASSWORD ${newpassword}
   </transaction>
 </sql>
-
+

The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the files data1.sql, data2.sql and data3.sql and then executes the truncate operation on some_other_table.

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -445,14 +445,14 @@ operation on some_other_table.

truncate table some_other_table; </transaction> </sql> -
+

The following example does the same as (and may execute additional SQL files if there are more files matching the pattern data*.sql) but doesn't guarantee that data1.sql will be run before data2.sql.

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -466,14 +466,14 @@ run before data2.sql.

truncate table some_other_table; </transaction> </sql> -
+

The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar as well as the system classpath for the driver class.

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -485,12 +485,12 @@ as well as the system classpath for the driver class.

<pathelement location="/some/jdbc.jar"/> </classpath> </sql> -
+

The following will only execute if the RDBMS is "oracle" and the version starts with "8.1."

-
<sql
+
<sql
     driver="org.database.jdbcDriver"
     url="jdbc:database-url"
     userid="sa"
@@ -504,7 +504,7 @@ values(1,2,3,4);
 
 truncate table some_other_table;
 </sql>
-
+ diff --git a/manual/Tasks/sync.html b/manual/Tasks/sync.html index e315cec4d..a598175a4 100644 --- a/manual/Tasks/sync.html +++ b/manual/Tasks/sync.html @@ -137,23 +137,23 @@ defaults to false.

Examples

-
+
 <sync todir="site">
   <fileset dir="generated-site"/>
 </sync>
-
+

overwrites all files in site with newer files from generated-site, deletes files from site that are not present in generated-site.

-
+
 <sync todir="site">
   <fileset dir="generated-site"/>
   <preserveintarget>
     <include name="**/CVS/**"/>
   </preserveintarget>
 </sync>
-
+

overwrites all files in site with newer files from generated-site, deletes files from site that are not present in generated-site but keeps all files in any diff --git a/manual/Tasks/telnet.html b/manual/Tasks/telnet.html index af507fbc9..c2c9dc93f 100644 --- a/manual/Tasks/telnet.html +++ b/manual/Tasks/telnet.html @@ -101,16 +101,16 @@ A simple example of connecting to a server and running a command. This assumes a prompt of "ogin:" for the userid, and a prompt of "assword:" for the password. -

+
 <telnet userid="bob" password="badpass" server="localhost">
    <read>/home/bob</read>
    <write>ls</write>
    <read string="/home/bob"/>
 </telnet>
-
+ This task can be rewritten as: -
+
 <telnet server="localhost">
    <read>ogin:</read>
    <write>bob</write>
@@ -120,28 +120,28 @@ This task can be rewritten as:
    <write>ls</write>
    <read>/home/bob</read>
 </telnet>
-
+ A timeout can be specified at the <telnet> level or at the <read> level. This will connect, issue a sleep command that is suppressed from displaying and wait 10 seconds before quitting. -
+
 <telnet userid="bob" password="badpass" server="localhost" timeout="20">
    <read>/home/bob</read>
    <write echo="false">sleep 15</write>
    <read timeout="10">/home/bob</read>
 </telnet>
-
+ The task can be used with other ports as well: -
+
 <telnet port="80" server="localhost" timeout="20">
    <read/>
    <write>GET / http/0.9</write>
    <write/>
    <read timeout="10">&lt;/HTML&gt;</read>
 </telnet>
-
+

To use this task against the WinNT telnet service, you need to configure the service to use classic authentication rather than NTLM negotiated authentication. diff --git a/manual/Tasks/unpack.html b/manual/Tasks/unpack.html index 6537d3152..ac278d282 100644 --- a/manual/Tasks/unpack.html +++ b/manual/Tasks/unpack.html @@ -66,32 +66,22 @@ resource collection

The specified resource will be used as src.

Examples

-
-<gunzip src="test.tar.gz"/>
-
+
<gunzip src="test.tar.gz"/>

expands test.tar.gz to test.tar

-
-<bunzip2 src="test.tar.bz2"/>
-
+
<bunzip2 src="test.tar.bz2"/>

expands test.tar.bz2 to test.tar

-
-<unxz src="test.tar.xz"/>
-
+
<unxz src="test.tar.xz"/>

expands test.tar.xz to test.tar

-
-<gunzip src="test.tar.gz" dest="test2.tar"/>
-
+
<gunzip src="test.tar.gz" dest="test2.tar"/>

expands test.tar.gz to test2.tar

-
-<gunzip src="test.tar.gz" dest="subdir"/>
-
+
<gunzip src="test.tar.gz" dest="subdir"/>

expands test.tar.gz to subdir/test.tar (assuming subdir is a directory).

-
+
 <gunzip dest=".">
   <url url="http://example.org/archive.tar.gz"/>
 </gunzip>
-
+

downloads http://example.org/archive.tar.gz and expands it to archive.tar in the project's basedir on the fly.

@@ -100,9 +90,7 @@ to archive.tar in the project's basedir on the fly.

 <gunzip src="some-archive.gz" dest="some-dest-dir"/>
 
- is identical to -
 <copy todir="some-dest-dir">
   <gzipresource>
diff --git a/manual/Tasks/verifyjar.html b/manual/Tasks/verifyjar.html
index 58a751be5..8908b3190 100644
--- a/manual/Tasks/verifyjar.html
+++ b/manual/Tasks/verifyjar.html
@@ -126,12 +126,11 @@ supported
   
  
 
-
 

Examples

-
+
 <verifyjar jar="${dist}/lib/ant.jar"
 alias="apache-group" storepass="secret"/>
-
+

verifies the ant.jar with alias "apache-group" accessing the keystore and private key via "secret" password. diff --git a/manual/Tasks/vss.html b/manual/Tasks/vss.html index a11f8bbfe..e02b76d98 100644 --- a/manual/Tasks/vss.html +++ b/manual/Tasks/vss.html @@ -198,7 +198,7 @@ label only one will be used in the order version, date, label.

Note that only one of version, date or label should be specified

Examples

-
+
 <vssget localPath="C:\mysrc\myproject"
         recursive="true"
@@ -207,7 +207,7 @@ label only one will be used in the order version, date, label.

vsspath="$/source/aProject" writable="true"/>
-
+

Does a get on the VSS-Project $/source/myproject using the username me and the password mypassword. It will recursively get the files which are labeled Release1 and write them to the local directory @@ -282,24 +282,24 @@ project.

Examples

-
+
 <vsslabel vsspath="$/source/aProject"
           login="me,mypassword"
           label="Release1"/>
 
-
+

Labels the current version of the VSS project $/source/aProject with the label Release1 using the username me and the password mypassword.

-
+
 <vsslabel vsspath="$/source/aProject/myfile.txt"
           version="4"
           label="1.03.004"/>
 
-
+

Labels version 4 of the VSS file $/source/aProject/myfile.txt with the label 1.03.004. If this version already has a label, the operation (and the build) will fail. @@ -414,25 +414,25 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.

Examples

-
+
 <vsshistory vsspath="$/myProject" recursive="true"
             fromLabel="Release1"
             toLabel="Release2"/>
 
-
+

Shows all changes between "Release1" and "Release2".

-
+
 <vsshistory vsspath="$/myProject" recursive="true"
             fromDate="01.01.2001"
             toDate="31.03.2001"/>
 
-
+

Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be specified according to your locale).

-
+
 <tstamp>
   <format property="to.tstamp" pattern="M-d-yy;h:mma"/>
@@ -443,7 +443,7 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.
             dateFormat="M-d-yy;h:mma"
             toDate="${to.tstamp}"/>
 
-
+

Shows all changes in the 14 days before today.


@@ -517,13 +517,13 @@ Task to perform CHECKIN commands to Microsoft Visual SourceSafe.

Examples

-
+
 <vsscheckin vsspath="$/test/test*"
             localpath="D:\build\"
             comment="Modified by automatic build"/>
 
-
+

Checks in the file(s) named test* in the project $/test using the local directory D:\build.


@@ -621,14 +621,14 @@ label only one will be used in the order version, date, label.

Examples

-
+
 <vsscheckout vsspath="$/test"
              localpath="D:\build"
              recursive="true"
              login="me,mypass"/>
 
-
+

Does a recursive checkout of the project $/test to the directory D:\build.


@@ -697,12 +697,12 @@ Task to perform ADD commands to Microsoft Visual SourceSafe.

Examples

-
+
 <vssadd localpath="D:\build\build.00012.zip"
             comment="Added by automatic build"/>
 
-
+

Add the file named build.00012.zip into the project current working directory (see vsscp).


@@ -753,11 +753,9 @@ directory (see vsscp).

Examples

-
-
-<vsscp vsspath="$/Projects/ant"/>
-
-
+ +
<vsscp vsspath="$/Projects/ant"/>
+

Sets the current VSS project to $/Projects/ant.


@@ -811,11 +809,9 @@ directory (see vsscp).

Examples

-
-
-<vsscreate vsspath="$/existingProject/newProject"/>
-
-
+ +
<vsscreate vsspath="$/existingProject/newProject"/>
+

Creates the VSS-Project $/existingProject/newProject.

diff --git a/manual/Tasks/waitfor.html b/manual/Tasks/waitfor.html index 30dc465a5..890ede6e1 100644 --- a/manual/Tasks/waitfor.html +++ b/manual/Tasks/waitfor.html @@ -102,27 +102,27 @@ true within the specified time.

here for the full list.

Examples

-
+
 <waitfor maxwait="30" maxwaitunit="second">
         <available file="errors.log"/>
 </waitfor>
-
+

waits up to 30 seconds for a file called errors.log to appear.

-
+
 <waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
         <http url="http://localhost/myapp/index.html"/>
 </waitfor>
-
+

waits up to 3 minutes (and checks every 500 milliseconds) for a web server on localhost to serve up the specified URL.

-
+
 <waitfor maxwait="10" maxwaitunit="second">
         <and>
             <socket server="dbserver" port="1521"/>
             <http url="http://webserver/mypage.html"/>
         </and>
 </waitfor>
-
+

waits up to 10 seconds for a server on the dbserver machine to begin listening on port 1521 and for the http://webserver/mypage.html web page to become available.

diff --git a/manual/Tasks/whichresource.html b/manual/Tasks/whichresource.html index 72eb2eeb6..27ee95e3f 100644 --- a/manual/Tasks/whichresource.html +++ b/manual/Tasks/whichresource.html @@ -31,9 +31,9 @@ The named property is set if the item can be found. For example:

-
+
   <whichresource resource="/log4j.properties" property="log4j.url" >
-
+

Parameters

@@ -91,7 +91,7 @@

The following shows using a classpath reference.

-
+
   <path id="bsf.classpath">
     <fileset dir="${user.home}/lang/bsf" includes="*.jar"/>
   </path>
@@ -99,11 +99,11 @@
                  class="org.apache.bsf.BSFManager"
                  classpathref="bsf.classpath"/>
   <echo>${bsf.class.location}</echo>
-
+

The following shows using a nested classpath.

-
+
   <whichresource
     property="ant-contrib.antlib.location"
     resource="net/sf/antcontrib/antlib.xml">
@@ -112,6 +112,6 @@
     </classpath>
   </whichresource>
   <echo>${ant-contrib.antlib.location}</echo>
-
+ diff --git a/manual/Types/antlib.html b/manual/Types/antlib.html index 0e738c053..bace8decb 100644 --- a/manual/Types/antlib.html +++ b/manual/Types/antlib.html @@ -25,7 +25,6 @@

Antlib

-

Description

An antlib file is an xml file with a root element of "antlib". @@ -53,8 +52,7 @@ A group of tasks and types may be defined together in an antlib file. For example the file sample.xml contains the following:

-
-
+    
 <?xml version="1.0"?>
 <antlib>
    <typedef name="if" classname="org.acme.ant.If"/>
@@ -70,17 +68,14 @@
       </sequential>
    </macrodef>
 </antlib>
-      
-
+

It defines two types or tasks, if and scriptpathmapper. This antlib file may be used in a build script as follows:

-
-
+    
 <typedef file="sample.xml"/>
-      
-
+

The other attributes of <typedef> may be used as well. For example, assuming that the sample.xml is in a jar @@ -88,25 +83,20 @@ following build fragment will define the if and scriptpathmapper tasks/types and place them in the namespace uri samples:/acme.org.

-
-
+    
 <typedef resource="org/acme/ant/sample.xml"
          uri="samples:/acme.org"/>
-      
-
+

The definitions may then be used as follows:

-
-
+    
 <sample:if valuetrue="${props}" xmlns:sample="samples:/acme.org">
    <sample:scriptpathmapper language="beanshell">
       some bean shell
    </sample:scriptpathmapper>
 </sample:if>
-      
-
- +

Antlib namespace

@@ -125,8 +115,7 @@ defined, the following build file will automatically load the antcontrib definitions at location HERE:

-
-
+    
 <project default="deletetest" xmlns:antcontrib="antlib:net.sf.antcontrib">
    <macrodef name="showdir">
       <attribute name="dir"/>
@@ -148,22 +137,18 @@
       <showdir dir="a"/>
    </target>
 </project>
-      
-
+

The requirement that the resource is in the default classpath may be removed in future versions of Ant.

- -

Load antlib from inside of the buildfile

If you want to separate the antlib from your local Ant installation, e.g. because you want to hold that jar in your projects SCM system, you have to specify a classpath, so that Ant could find that jar. The best solution is loading the antlib with <taskdef>.

-
-
+    
 <project xmlns:antcontrib="antlib:net.sf.antcontrib">
    <taskdef uri="antlib:net.sf.antcontrib"
             resource="net/sf/antcontrib/antlib.xml"
@@ -178,9 +163,7 @@
       </antcontrib:for>
    </target>
 </project>
-      
-
- +

Current namespace

Definitions defined in antlibs may be used in antlibs. However @@ -192,8 +175,7 @@ type <isallowed> and a macro <ifallowed> that makes use of the task and type:

-
-
+    
 <antlib xmlns:current="ant:current">
    <taskdef name="if" classname="org.acme.ant.If"/>
    <typedef name="isallowed" classname="org.acme.ant.Isallowed"/>
@@ -210,10 +192,7 @@
       </sequential>
    </macrodef>
 </antlib>
-      
-
- - +

Other examples and comments

Antlibs may make use of other antlibs. @@ -226,8 +205,7 @@ following antlib may be used to define defaults for various tasks:

-
-
+    
 <antlib xmlns:antcontrib="antlib:net.sf.antcontrib">
    <presetdef name="javac">
       <javac deprecation="${deprecation}"
@@ -240,21 +218,18 @@
       <antcontrib:shellscript shell="bash"/>
    </presetdef>
 </antlib>
-      
-
+

This may be used as follows:

-
-
+    
 <project xmlns:local="localpresets">
    <typedef file="localpresets.xml" uri="localpresets"/>
    <local:shellscript>
       echo "hello world"
    </local:shellscript>
 </project>
-      
-
+ diff --git a/manual/Types/classfileset.html b/manual/Types/classfileset.html index 5e7642c44..5f251085e 100644 --- a/manual/Types/classfileset.html +++ b/manual/Types/classfileset.html @@ -85,28 +85,28 @@ relative location of the classfile in the fileset. So, the file org.apache.tools.ant.Project.

Examples

-
+
 <classfileset id="reqdClasses" dir="${classes.dir}">
   <root classname="org.apache.tools.ant.Project"/>
 </classfileset>
-
+

This example creates a fileset containing all the class files upon which the org.apache.tools.ant.Project class depends. This fileset could then be used to create a jar.

-
+
 <jar destfile="minimal.jar">
   <fileset refid="reqdClasses"/>
 </jar>
-
+ -
+
 <classfileset id="reqdClasses" dir="${classes.dir}">
   <rootfileset dir="${classes.dir}" includes="org/apache/tools/ant/Project*.class"/>
 </classfileset>
-
+

This example constructs the classfileset using all the class with names starting with Project in the org.apache.tools.ant package

diff --git a/manual/Types/custom-programming.html b/manual/Types/custom-programming.html index 3010b83c7..5f851e4df 100644 --- a/manual/Types/custom-programming.html +++ b/manual/Types/custom-programming.html @@ -64,8 +64,7 @@ For example a custom condition that returns true if a string is all upper case could be written as:

-
-
+    
 package com.mydomain;
 
 import org.apache.tools.ant.BuildException;
@@ -87,31 +86,25 @@ public class AllUpperCaseCondition implements Condition {
         return value.toUpperCase().equals(value);
    }
 }
-      
-
- +

Adding the condition to the system is achieved as follows:

-
-
+    
 <typedef
     name="alluppercase"
     classname="com.mydomain.AllUpperCaseCondition"
     classpath="${mydomain.classes}"/>
-      
-
+

This condition can now be used wherever a Core Ant condition is used.

-
-
+    
 <condition property="allupper">
    <alluppercase value="THIS IS ALL UPPER CASE"/>
 </condition>
-      
-
+

Custom Selectors

Custom selectors are datatypes that implement @@ -128,8 +121,7 @@ public class AllUpperCaseCondition implements Condition { An example of a custom selection that selects filenames ending in ".java" would be:

-
-
+    
 package com.mydomain;
 import java.io.File;
 import org.apache.tools.ant.types.selectors.FileSelector;
@@ -138,34 +130,28 @@ public class JavaSelector implements FileSelector {
        return filename.toLowerCase().endsWith(".java");
     }
 }
-      
-
+

Adding the selector to the system is achieved as follows:

-
-
+    
 <typedef
     name="javaselector"
     classname="com.mydomain.JavaSelector"
     classpath="${mydomain.classes}"/>
-      
-
-

+ +

This selector can now be used wherever a Core Ant selector is used, for example:

-
-
+    
 <copy todir="to">
    <fileset dir="src">
       <javaselector/>
    </fileset>
 </copy>
-      
-
- -

+ +

One may use org.apache.tools.ant.types.selectors.BaseSelector, a convenience class that provides reasonable default @@ -197,8 +183,7 @@ public class JavaSelector implements FileSelector { if a certain number of contained selectors select, one could write a selector as follows:

-
-
+    
 public class MatchNumberSelectors extends BaseSelectorContainer {
     private int number = -1;
     public void setNumber(int number) {
@@ -221,13 +206,11 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
         return numberSelected == number;
     }
 }
-      
-
+

To define and use this selector one could do:

-
-
+    
 <typedef name="numberselected"
          classname="com.mydomain.MatchNumberSelectors"/>
 ...
@@ -238,8 +221,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
       <javaselector/>
    </numberselected>
 </fileset>
-      
-
+

The custom selector

@@ -250,7 +232,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer {

You can write your own selectors and use them within the selector containers by specifying them within the <custom> tag.

-

To create a new Custom Selector, you have to create a class that +

To create a new Custom Selector, you have to create a class that implements org.apache.tools.ant.types.selectors.ExtendFileSelector. The easiest way to do that is through the convenience base class @@ -305,15 +287,13 @@ public class MatchNumberSelectors extends BaseSelectorContainer {

Here is how you use <custom> to use your class as a selector:

- -
+    
 <fileset dir="${mydir}" includes="**/*">
     <custom classname="com.mydomain.MySelector">
         <param name="myattribute" value="myvalue"/>
     </custom>
 </fileset>
-      
- +

The core selectors that can also be used as custom selectors are

@@ -337,15 +317,13 @@ public class MatchNumberSelectors extends BaseSelectorContainer {

Here is the example from the Depth Selector section rewritten to use the selector through <custom>.

- -
+    
 <fileset dir="${doc.path}" includes="**/*">
     <custom classname="org.apache.tools.ant.types.selectors.DepthSelector">
         <param name="max" value="1"/>
     </custom>
 </fileset>
-      
- +

Selects all files in the base directory and one directory below that.

@@ -363,8 +341,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer { For example a filterreader that removes every second character could be:

-
-
+    
 public class RemoveOddCharacters implements ChainableReader {
    public Reader chain(Reader reader) {
       return new BaseFilterReader(reader) {
@@ -384,8 +361,7 @@ public class RemoveOddCharacters implements ChainableReader {
       }
    }
 }
-      
-
+

For line oriented filters it may be easier to extend ChainableFilterReader an inner class of @@ -394,8 +370,7 @@ public class RemoveOddCharacters implements ChainableReader {

For example a filter that appends the line number could be

-
-
+    
 public class AddLineNumber extends ChainableReaderFilter {
    private void lineNumber = 0;
    public String filter(String string) {
@@ -403,8 +378,7 @@ public class AddLineNumber extends ChainableReaderFilter {
       return "" + lineNumber + "\t" + string;
    }
 }
-      
-
+ diff --git a/manual/Types/dirset.html b/manual/Types/dirset.html index 24adf54f7..3e790dcfd 100644 --- a/manual/Types/dirset.html +++ b/manual/Types/dirset.html @@ -98,9 +98,8 @@ equivalent to an <and> selector container.

Specify what happens if the base directory does not exist. If true a build error will happen, if false, the dirset will be ignored/empty. - Defaults to true. - Since Apache Ant 1.7.1 (default is true for backward compatibility - reasons.) + Defaults to true (for backward compatibility reasons). + Since Apache Ant 1.7.1 @@ -108,43 +107,43 @@ equivalent to an <and> selector container.

Examples

-
+
 <dirset dir="${build.dir}">
   <include name="apps/**/classes"/>
   <exclude name="apps/**/*Test*"/>
 </dirset>
-
+

Groups all directories named classes found under the apps subdirectory of ${build.dir}, except those that have the text Test in their name.

-
+
 <dirset dir="${build.dir}">
   <patternset id="non.test.classes">
     <include name="apps/**/classes"/>
     <exclude name="apps/**/*Test*"/>
   </patternset>
 </dirset>
-
+

Groups the same directories as the above example, but also establishes a PatternSet that can be referenced in other <dirset> elements, rooted at a different directory.

-
+
 <dirset dir="${debug_build.dir}">
   <patternset refid="non.test.classes"/>
 </dirset>
-
+

Groups all directories in directory ${debug_build.dir}, using the same patterns as the above example.

-
+
 <dirset id="dirset" dir="${workingdir}">
    <present targetdir="${workingdir}">
         <mapper type="glob" from="*" to="*/${markerfile}" />
    </present>
 </dirset>
-
+

Selects all directories somewhere under ${workingdir} which contain a ${markerfile}.

diff --git a/manual/Types/extension.html b/manual/Types/extension.html index b54d8997d..12193e2ed 100644 --- a/manual/Types/extension.html +++ b/manual/Types/extension.html @@ -83,7 +83,7 @@ Java2 Standard Edition package, in file
No

Examples

-
+
 <extension id="e1"
     extensionName="MyExtensions"
     specificationVersion="1.0"
@@ -92,18 +92,18 @@ Java2 Standard Edition package, in file
     implementationVendor="Apache"
     implementationVersion="2.0"
     implementationURL="http://somewhere.com/myExt.jar"/>
-
+ -

Fully specific extension object.

+

Fully specified extension object.

-
+
 <extension id="e1"
     extensionName="MyExtensions"
     specificationVersion="1.0"
     specificationVendor="Peter Donald"/>
-
+ -

Extension object that just species the specification details.

+

Extension object that just specifies the specification details.

diff --git a/manual/Types/extensionset.html b/manual/Types/extensionset.html index a42d8f4f0..4b1d4445e 100644 --- a/manual/Types/extensionset.html +++ b/manual/Types/extensionset.html @@ -48,7 +48,7 @@ Java2 Standard Edition package, in file may be modified by attributes of libfileset

Examples

-
+
 <extension id="e1"
     extensionName="MyExtensions"
     specificationVersion="1.0"
@@ -72,8 +72,7 @@ Java2 Standard Edition package, in file
   <libfileset refid="lfs"/>
   <extension refid="e1"/>
 </extensionSet>
-
-
+ diff --git a/manual/Types/filelist.html b/manual/Types/filelist.html index 3a3f61c4d..6a9eb6255 100644 --- a/manual/Types/filelist.html +++ b/manual/Types/filelist.html @@ -74,42 +74,42 @@ types.

Examples

-
+
 <filelist
     id="docfiles"
     dir="${doc.src}"
     files="foo.xml,bar.xml"/>
-
+

The files ${doc.src}/foo.xml and ${doc.src}/bar.xml. Note that these files may not (yet) actually exist.

-
+
 <filelist
     id="docfiles"
     dir="${doc.src}"
     files="foo.xml
            bar.xml"/>
-
+

Same files as the example above.

-
+
 <filelist refid="docfiles"/>
-
+

Same files as the example above.

-
+
 <filelist
     id="docfiles"
     dir="${doc.src}">
     <file name="foo.xml"/>
     <file name="bar.xml"/>
 </filelist>
-
+

Same files as the example above.

diff --git a/manual/Types/fileset.html b/manual/Types/fileset.html index 47fcbec92..920e85d15 100644 --- a/manual/Types/fileset.html +++ b/manual/Types/fileset.html @@ -122,60 +122,60 @@ symbolic link but it may lead to false results on other platforms.

Examples

-
+
 <fileset dir="${server.src}" casesensitive="yes">
   <include name="**/*.java"/>
   <exclude name="**/*Test*"/>
 </fileset>
-
+

Groups all files in directory ${server.src} that are Java source files and don't have the text Test in their name.

-
+
 <fileset dir="${server.src}" casesensitive="yes">
   <patternset id="non.test.sources">
     <include name="**/*.java"/>
     <exclude name="**/*Test*"/>
   </patternset>
 </fileset>
-
+

Groups the same files as the above example, but also establishes a PatternSet that can be referenced in other <fileset> elements, rooted at a different directory.

-
+
 <fileset dir="${client.src}" >
   <patternset refid="non.test.sources"/>
 </fileset>
-
+

Groups all files in directory ${client.src}, using the same patterns as the above example.

-
+
 <fileset dir="${server.src}" casesensitive="yes">
   <filename name="**/*.java"/>
   <filename name="**/*Test*" negate="true"/>
 </fileset>
-
+

Groups the same files as the top example, but using the <filename> selector.

-
+
 <fileset dir="${server.src}" casesensitive="yes">
   <filename name="**/*.java"/>
   <not>
     <filename name="**/*Test*"/>
   </not>
 </fileset>
-
+

Groups the same files as the previous example using a combination of the <filename> selector and the <not> selector container.

-
+
 <fileset dir="src" includes="main/" />
-
+

Selects all files in src/main (e.g. src/main/Foo.java or src/main/application/Bar.java).

diff --git a/manual/Types/filterchain.html b/manual/Types/filterchain.html index ced1f3079..649a3fdda 100644 --- a/manual/Types/filterchain.html +++ b/manual/Types/filterchain.html @@ -56,7 +56,7 @@ FilterReaders can be easily plugged in as nested elements of <filterchain> by using <filterreader> elements.

Example: -

+
 <copy file="${src.file}" tofile="${dest.file}">
   <filterchain>
     <filterreader classname="your.extension.of.java.io.FilterReader">
@@ -71,21 +71,21 @@ Example:
     </filterreader>
   </filterchain>
 </copy>
-
+ Ant provides some built-in filter readers. These filter readers can also be declared using a syntax similar to the above syntax. However, they can be declared using some simpler syntax also.

Example: -

+
 <loadfile srcfile="${src.file}" property="src.file.head">
   <filterchain>
     <headfilter lines="15"/>
   </filterchain>
 </loadfile>
-
+ is equivalent to: -
+
 <loadfile srcfile="${src.file}" property="src.file.head">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
@@ -93,7 +93,7 @@ is equivalent to:
     </filterreader>
   </filterchain>
 </loadfile>
-
+ The following built-in tasks support nested <filterchain> elements.
Concat,
@@ -188,18 +188,18 @@ distribution. This loads the basic constants defined in a Java class as Ant properties. -
+
 <loadproperties srcfile="foo.class" encoding="ISO-8859-1">
   <filterchain>
     <classconstants/>
   </filterchain>
 </loadproperties>
-
+ This loads the constants from a Java class file as Ant properties, prepending the names with a prefix. -
+    
 <loadproperties srcfile="build/classes/org/acme/bar.class"
                 encoding="ISO-8859-1">
   <filterchain>
@@ -207,7 +207,7 @@ prepending the names with a prefix.
     <prefixlines prefix="ini."/>
   </filterchain>
 </loadproperties>
-
+

EscapeUnicode

This filter converts its input by changing all non US-ASCII characters @@ -218,34 +218,34 @@ into their equivalent unicode escape backslash u plus 4 digits.

Example:

This loads the basic constants defined in a Java class as Ant properties. -
+
 <loadproperties srcfile="non_ascii_property.properties">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.EscapeUnicode"/>
   </filterchain>
 </loadproperties>
-
+ Convenience method: -
+
 <loadproperties srcfile="non_ascii_property.properties">
   <filterchain>
     <escapeunicode/>
   </filterchain>
 </loadproperties>
-
+

ExpandProperties

If the data contains data that represents Ant properties (of the form ${...}), that is substituted with the property's actual value. -

+

Example:

This results in the property modifiedmessage holding the value "All these moments will be lost in time, like teardrops in the rain" -
+
 <echo
   message="All these moments will be lost in time, like teardrops in the ${weather}"
   file="loadfile1.tmp"
@@ -256,10 +256,10 @@ This results in the property modifiedmessage holding the value
     <filterreader classname="org.apache.tools.ant.filters.ExpandProperties"/>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <echo
   message="All these moments will be lost in time, like teardrops in the ${weather}"
   file="loadfile1.tmp"
@@ -270,12 +270,12 @@ Convenience method:
     <expandproperties/>
   </filterchain>
 </loadfile>
-
+

Since Ant 1.8.3, a nested - PropertySet can be specified: + PropertySet can be specified:

-
+
 <property name="weather" value="rain"/>
 <loadfile property="modifiedmessage" srcFile="loadfile1.tmp">
   <filterchain>
@@ -286,7 +286,7 @@ Convenience method:
     </expandproperties>
   </filterchain>
 </loadfile>
-
+

HeadFilter

@@ -316,7 +316,7 @@ This filter reads the first few lines from the data supplied to it.

Example:

This stores the first 15 lines of the supplied data in the property src.file.head -
+
 <loadfile srcfile="${src.file}" property="src.file.head">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
@@ -324,26 +324,26 @@ This stores the first 15 lines of the supplied data in the property src.file.hea
     </filterreader>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <loadfile srcfile="${src.file}" property="src.file.head">
   <filterchain>
     <headfilter lines="15"/>
   </filterchain>
 </loadfile>
-
+ This stores the first 15 lines, skipping the first 2 lines, of the supplied data in the property src.file.head. (Means: lines 3-17) -
+
 <loadfile srcfile="${src.file}" property="src.file.head">
   <filterchain>
     <headfilter lines="15" skip="2"/>
   </filterchain>
 </loadfile>
-
+ See the testcases for more examples (src\etc\testcases\filters\head-tail.xml in the source distribution). @@ -376,36 +376,36 @@ strings. This will include only those lines that contain foo and bar. -
+
 <filterreader classname="org.apache.tools.ant.filters.LineContains">
   <param type="contains" value="foo"/>
   <param type="contains" value="bar"/>
 </filterreader>
-
+ Convenience method: -
+
 <linecontains>
   <contains value="foo"/>
   <contains value="bar"/>
 </linecontains>
-
+ Negation: -
+
 <filterreader classname="org.apache.tools.ant.filters.LineContains">
   <param type="negate" value="true"/>
   <param type="contains" value="foo"/>
   <param type="contains" value="bar"/>
 </filterreader>
-
+ or -
+
 <linecontains negate="true">
   <contains value="foo"/>
   <contains value="bar"/>
 </linecontains>
-
+

LineContainsRegExp

@@ -447,32 +447,32 @@ the choice of regular expression implementation.

Example:

This will fetch all those lines that contain the pattern foo -
+
 <filterreader classname="org.apache.tools.ant.filters.LineContainsRegExp">
   <param type="regexp" value="foo*"/>
 </filterreader>
-
+ Convenience method: -
+
 <linecontainsregexp>
   <regexp pattern="foo*"/>
 </linecontainsregexp>
-
+ Negation: -
+
 <filterreader classname="org.apache.tools.ant.filters.LineContainsRegExp">
   <param type="negate" value="true"/>
   <param type="regexp" value="foo*"/>
 </filterreader>
-
+ or -
+
 <linecontainsregexp negate="true">
   <regexp pattern="foo*"/>
 </linecontainsregexp>
-
+

PrefixLines

@@ -494,16 +494,16 @@ Attaches a prefix to every line.

Example:

This will attach the prefix Foo to all lines. -
+
 <filterreader classname="org.apache.tools.ant.filters.PrefixLines">
   <param name="prefix" value="Foo"/>
 </filterreader>
-
+ Convenience method: -
+
 <prefixlines prefix="Foo"/>
-
+

SuffixLines

@@ -527,16 +527,16 @@ Attaches a suffix to every line.

Example:

This will attach the suffix Foo to all lines. -
+
 <filterreader classname="org.apache.tools.ant.filters.SuffixLines">
   <param name="suffix" value="Foo"/>
 </filterreader>
-
+ Convenience method: -
+
 <suffixlines suffix="Foo"/>
-
+

ReplaceTokens

@@ -598,7 +598,7 @@ user defined values. This replaces occurrences of the string @DATE@ in the data with today's date and stores it in the property ${src.file.replaced}. -
+
 <tstamp/>
 <!-- just for explaining the use of the properties -->
 <property name="src.file" value="orders.csv"/>
@@ -615,10 +615,10 @@ with today's date and stores it in the property ${src.file.replaced}.
 
 <!-- just for explaining the use of the properties -->
 <echo message="${orders.replaced}"/>
-
+ Convenience method: -
+
 <tstamp/>
 <loadfile srcfile="${src.file}" property="${src.file.replaced}">
   <filterchain>
@@ -627,11 +627,11 @@ Convenience method:
     </replacetokens>
   </filterchain>
 </loadfile>
-
+ This replaces occurrences of the string {{DATE}} in the data with today's date and stores it in the property ${src.file.replaced}. -
+
 <loadfile srcfile="${src.file}" property="${src.file.replaced}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
@@ -640,10 +640,10 @@ with today's date and stores it in the property ${src.file.replaced}.
     </filterreader>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <tstamp/>
 <loadfile srcfile="${src.file}" property="${src.file.replaced}">
   <filterchain>
@@ -652,10 +652,10 @@ Convenience method:
     </replacetokens>
   </filterchain>
 </loadfile>
-
+ This will treat each properties file entry in sample.properties as a token/key pair : -
+
 <loadfile srcfile="${src.file}" property="${src.file.replaced}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
@@ -663,10 +663,10 @@ This will treat each properties file entry in sample.properties as a token/key p
     </filterreader>
   </filterchain>
 </loadfile>
-
+ This reads the properties from an Ant resource referenced by its id: -
+
 <string id="embedded-properties">
 foo=bar
 baz=xyzzy
@@ -676,7 +676,7 @@ baz=xyzzy
     <replacetokens propertiesResource="${ant.refid:embedded-properties}"/>
   </filterchain>
 </loadfile>
-
+

StripJavaComments

@@ -686,22 +686,22 @@ take in any parameters.

Example:

-
+
 <loadfile srcfile="${java.src.file}" property="${java.src.file.nocomments}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.StripJavaComments"/>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <loadfile srcfile="${java.src.file}" property="${java.src.file.nocomments}">
   <filterchain>
     <stripjavacomments/>
   </filterchain>
 </loadfile>
-
+

StripLineBreaks

@@ -725,26 +725,26 @@ from the data supplied to it.

Examples:

This strips the '\r' and '\n' characters. -
+
 <loadfile srcfile="${src.file}" property="${src.file.contents}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks"/>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <loadfile srcfile="${src.file}" property="${src.file.contents}">
   <filterchain>
     <striplinebreaks/>
   </filterchain>
 </loadfile>
-
+ This treats the '(' and ')' characters as line break characters and strips them. -
+
 <loadfile srcfile="${src.file}" property="${src.file.contents}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks">
@@ -752,7 +752,7 @@ strips them.
     </filterreader>
   </filterchain>
 </loadfile>
-
+

StripLineComments

@@ -776,7 +776,7 @@ that represent comments as specified by the user.

Examples:

This removes all lines that begin with #, --, REM, rem and // -
+
 <filterreader classname="org.apache.tools.ant.filters.StripLineComments">
   <param type="comment" value="#"/>
   <param type="comment" value="--"/>
@@ -784,10 +784,10 @@ This removes all lines that begin with #, --, REM, rem and //
   <param type="comment" value="rem "/>
   <param type="comment" value="//"/>
 </filterreader>
-
+ Convenience method: -
+
 <striplinecomments>
   <comment value="#"/>
   <comment value="--"/>
@@ -795,7 +795,7 @@ Convenience method:
   <comment value="rem "/>
   <comment value="//"/>
 </striplinecomments>
-
+

TabsToSpaces

@@ -817,22 +817,22 @@ This filter replaces tabs with spaces

Examples:

This replaces tabs in ${src.file} with spaces. -
+
 <loadfile srcfile="${src.file}" property="${src.file.notab}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.TabsToSpaces"/>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <loadfile srcfile="${src.file}" property="${src.file.notab}">
   <filterchain>
     <tabstospaces/>
   </filterchain>
 </loadfile>
-
+

TailFilter

@@ -931,7 +931,7 @@ This graphic shows the dependencies:

Examples:

This stores the last 15 lines of the supplied data in the property ${src.file.tail} -
+
 <loadfile srcfile="${src.file}" property="${src.file.tail}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.TailFilter">
@@ -939,20 +939,20 @@ This stores the last 15 lines of the supplied data in the property ${src.file.ta
     </filterreader>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <loadfile srcfile="${src.file}" property="${src.file.tail}">
   <filterchain>
     <tailfilter lines="15"/>
   </filterchain>
 </loadfile>
-
+ This stores the last 5 lines of the first 15 lines of the supplied data in the property ${src.file.mid} -
+
 <loadfile srcfile="${src.file}" property="${src.file.mid}">
   <filterchain>
     <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
@@ -963,28 +963,28 @@ data in the property ${src.file.mid}
     </filterreader>
   </filterchain>
 </loadfile>
-
+ Convenience method: -
+
 <loadfile srcfile="${src.file}" property="${src.file.mid}">
   <filterchain>
     <headfilter lines="15"/>
     <tailfilter lines="5"/>
   </filterchain>
 </loadfile>
-
+ This stores the last 10 lines, skipping the last 2 lines, of the supplied data in the property src.file.head. (Means: if supplied data contains 60 lines, lines 49-58 are extracted) -
+
 <loadfile srcfile="${src.file}" property="src.file.head">
   <filterchain>
     <tailfilter lines="10" skip="2"/>
   </filterchain>
 </loadfile>
-
+

DeleteCharacters

@@ -1011,9 +1011,9 @@ lines 49-58 are extracted)

Examples:

Delete tabs and returns from the data. -
+
 <deletecharacters chars="\t\r"/>
-
+

ConcatFilter

This filter prepends or appends the content file to the filtered files.

@@ -1044,18 +1044,18 @@ Delete tabs and returns from the data.

Examples:

Do nothing: -
+
 <filterchain>
     <concatfilter/>
 </filterchain>
-
+ Adds a license text before each java source: -
+
 <filterchain>
     <concatfilter prepend="apache-license-java.txt"/>
 </filterchain>
-
+

SortFilter

since Ant 1.8.0

@@ -1094,14 +1094,14 @@ Adds a license text before each java source:

Examples:

-
+
   <copy todir="build">
       <fileset dir="input" includes="*.txt"/>
       <filterchain>
           <sortfilter/>
       </filterchain>
   </copy>
-
+

Sort all files *.txt from src location @@ -1110,21 +1110,21 @@ ascendant order comparing the lines via the String.compareTo(Object o) method.

-
+
   <copy todir="build">
       <fileset dir="input" includes="*.txt"/>
       <filterchain>
           <sortfilter reverse="true"/>
       </filterchain>
   </copy>
-
+

Sort all files *.txt from src location into reverse order and copy them into build location.

-
+
   <copy todir="build">
       <fileset dir="input" includes="*.txt"/>
       <filterchain>
@@ -1133,7 +1133,7 @@ order and copy them into build location.
           </filterreader>
       </filterchain>
   </copy>
-
+

Sort all files *.txt from src location using as @@ -1157,7 +1157,7 @@ implement java.util.Comparator interface, for example:

The example above is equivalent to:

-
+
   <componentdef name="evenfirst"
                 classname="org.apache.tools.ant.filters.EvenFirstCmp"/>
   <copy todir="build">
@@ -1168,7 +1168,7 @@ implement java.util.Comparator interface, for example:
           </sortfilter>
       </filterchain>
   </copy>
-
+

TokenFilter

This filter tokenizes the inputstream into strings and passes these @@ -1274,17 +1274,17 @@ This is the default tokenizer.
Examples:
Convert input current line endings to unix style line endings. -
+
 <tokenfilter delimoutput="\n"/>
-
+ Remove blank lines. -
+
 <tokenfilter>
     <ignoreblank/>
 </tokenfilter>
 
-
+

FileTokenizer

This tokenizer treats all the input as a token. So be @@ -1292,14 +1292,14 @@ careful not to use this on very large input.
Examples:
Replace the first occurrence of package with //package. -
+
 <tokenfilter>
       <filetokenizer/>
       <replaceregex pattern="([\n\r]+[ \t]*|^[ \t]*)package"
                     flags="s"
                     replace="\1//package"/>
 </tokenfilter>
-
+

StringTokenizer

This tokenizer is based on java.util.StringTokenizer. @@ -1353,13 +1353,13 @@ attribute is used). Surround each non space token with a "[]". -
+
 <tokenfilter>
     <stringtokenizer/>
     <replaceregex pattern="(.+)" replace="[\1]"/>
 </tokenfilter>
 
-
+

ReplaceString

This is a simple filter to replace strings. @@ -1389,11 +1389,11 @@ This filter may be used directly within a filterchain. Replace "sun" with "moon". -
+
 <tokenfilter>
     <replacestring from="sun" to="moon"/>
 </tokenfilter>
-
+

ContainsString

This is a simple filter to filter tokens that contains @@ -1416,12 +1416,12 @@ a specified string. Include only lines that contain "foo"; -
+
 <tokenfilter>
     <containsstring contains="foo"/>
 </tokenfilter>
 
-
+

ReplaceRegex

This string filter replaces regular expressions. @@ -1461,12 +1461,12 @@ for an explanation of regex flags. Replace all occurrences of "hello" with "world", ignoring case. -
+
 <tokenfilter>
     <replaceregex pattern="hello" replace="world" flags="gi"/>
 </tokenfilter>
 
-
+

ContainsRegex

This filters strings that match regular expressions. @@ -1509,23 +1509,23 @@ for an explanation of regex flags. Filter lines that contain "hello" or "world", ignoring case. -
+
 <tokenfilter>
     <containsregex pattern="(hello|world)" flags="i"/>
 </tokenfilter>
 
-
+ This example replaces lines like "SUITE(TestSuite, bits);" with "void register_bits();" and removes other lines. -
+
 <tokenfilter>
     <containsregex
         pattern="^ *SUITE\(.*,\s*(.*)\s*\).*"
         replace="void register_\1();"/>
 </tokenfilter>
-
+

Trim

This filter trims whitespace from the start and end of @@ -1557,14 +1557,14 @@ This filter deletes specified characters from tokens. Delete tabs from lines, trim the lines and removes empty lines. -
+
 <tokenfilter>
     <deletecharacters chars="\t"/>
     <trim/>
     <ignoreblank/>
 </tokenfilter>
 
-
+

UniqFilter

@@ -1576,11 +1576,11 @@ Delete tabs from lines, trim the lines and removes empty lines.
Example:
This suppresses duplicate lines. -
+
 <tokenfilter>
   <uniqfilter/>
 </tokenfilter>
-
+

Native2AsciiFilter

@@ -1609,11 +1609,11 @@ This suppresses duplicate lines.
Example:

This replaces all non-ASCII characters by their Unicode-escapes.

-
+
 <tokenfilter>
   <native2asciifilter/>
 </tokenfilter>
-
+

ScriptFilter

@@ -1694,18 +1694,17 @@ Must be a supported Apache BSF or JSR 223 language

Examples:
Convert to uppercase: -
+
 <tokenfilter>
     <scriptfilter language="javascript">
         self.setToken(self.getToken().toUpperCase());
     </scriptfilter>
 </tokenfilter>
-
+ Remove lines containing the string "bad" while copying text files: -
-
+
 <copy todir="dist">
   <fileset dir="src" includes="**/*.txt"/>
   <filterchain>
@@ -1716,8 +1715,7 @@ copying text files:
     </scriptfilter>
   </filterchain>
 </copy>
-    
-
+

Custom tokenizers and string filters

@@ -1727,7 +1725,7 @@ and org.apache.tools.ant.util.Tokenizer respectly. They are defined in the build file using <typedef/>. For example a string filter that capitalizes words may be declared as: -
+
 package my.customant;
 import org.apache.tools.ant.filters.TokenFilter;
 
@@ -1741,10 +1739,10 @@ public class Capitalize
                 token.substring(1);
    }
 }
-
+ This may be used as follows: -
+
   <typedef name="capitalize" classname="my.customant.Capitalize"
            classpath="my.customant.path"/>
   <copy file="input" tofile="output">
@@ -1755,6 +1753,7 @@ This may be used as follows:
       </tokenfilter>
     </filterchain>
   </copy>
-
+ - + + diff --git a/manual/Types/filterset.html b/manual/Types/filterset.html index a50d750ad..ea1b7b78f 100644 --- a/manual/Types/filterset.html +++ b/manual/Types/filterset.html @@ -141,27 +141,27 @@ you should ensure that the set of files being filtered are all text files.

You are copying the version.txt file to the dist directory from the build directory but wish to replace the token @DATE@ with today's date.

-
+
 <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
   <filterset>
     <filter token="DATE" value="${TODAY}"/>
   </filterset>
 </copy>
-
+

You are copying the version.txt file to the dist directory from the build directory but wish to replace the token %DATE* with today's date.

-
+
 <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
   <filterset begintoken="%" endtoken="*">
     <filter token="DATE" value="${TODAY}"/>
   </filterset>
 </copy>
-
+

Copy all the docs but change all dates and appropriate notices as stored in a file.

-
+
 <copy toDir="${dist.dir}/docs">
   <fileset dir="${build.dir}/docs">
     <include name="**/*.html">
@@ -170,10 +170,10 @@ but wish to replace the token %DATE* with today's date.

<filtersfile file="${user.dir}/dist.properties"/> </filterset> </copy> -
+

Define a FilterSet and reference it later.

-
+
 <filterset id="myFilterSet" begintoken="%" endtoken="*">
   <filter token="DATE" value="${TODAY}"/>
 </filterset>
@@ -181,12 +181,12 @@ but wish to replace the token %DATE* with today's date.

<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt"> <filterset refid="myFilterSet"/> </copy> -
+

You are copying the version.txt file to the dist directory from the build directory but wish to replace the token @project.date@ with the property of the same name.

-
+
 <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
   <filterset>
     <propertyset>
@@ -194,5 +194,6 @@ but wish to replace the token @project.date@ with the prope
     </propertyset>
   </filterset>
 </copy>
-
- + + + diff --git a/manual/Types/mapper.html b/manual/Types/mapper.html index 01ccc904c..4678afe92 100644 --- a/manual/Types/mapper.html +++ b/manual/Types/mapper.html @@ -117,10 +117,10 @@ implicitly configured as a composite mapper.

The target file name is identical to the source file name. Both to and from will be ignored.

Examples: -
+
 <mapper type="identity"/>
 <identitymapper/>
-
+ @@ -153,10 +153,10 @@ implicitly configured as a composite mapper. leading directory information stripped off. Both to and from will be ignored.

Examples: -
+
 <mapper type="flatten"/>
 <flattenmapper/>
-
+
Source file name
@@ -188,10 +188,10 @@ leading directory information stripped off. Both to and

The target file name will always be the same, as defined by to - from will be ignored.

Examples:
-
+
 <mapper type="merge" to="archive.tar"/>
 <mergemapper to="archive.tar"/>
-
+
Source file name
@@ -228,10 +228,10 @@ the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.

Examples: -
+
 <mapper type="glob" from="*.java" to="*.java.bak"/>
 <globmapper from="*.java" to="*.java.bak"/>
-
+
Source file name
@@ -254,10 +254,10 @@ that don't match the from pattern will be ignored.

Source file name ignored
-
+
 <mapper type="glob" from="C*ies" to="Q*y"/>
 <globmapper from="C*ies" to="Q*y"/>
-
+ @@ -404,10 +404,10 @@ should be used.Examples: -
+
 <mapper type="regexp" from="^(.*)\.java$$" to="\1.java.bak"/>
 <regexpmapper from="^(.*)\.java$$" to="\1.java.bak"/>
-
+
Source file name
@@ -430,10 +430,10 @@ should be used.
Source file name ignored
-
+
 <mapper type="regexp" from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/>
 <regexpmapper from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/>
-
+ @@ -456,10 +456,10 @@ should be used.
Source file name Classes/dir/dir2/dir2-A.properties
-
+
 <mapper type="regexp" from="^(.*)\.(.*)$$" to="\2.\1"/>
 <regexpmapper from="^(.*)\.(.*)$$" to="\2.\1"/>
-
+ @@ -482,10 +482,10 @@ should be used.
Source file name properties.Classes/dir/dir2/A
-
+
 <mapper type="regexp" from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/>
 <regexpmapper from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/>
-
+ @@ -580,10 +580,10 @@ pattern placeholder. This mapper is particularly useful in combination with <uptodate> and <junit> output.

The to and from attributes are both required.

Example: -
+
 <mapper type="package" from="*Test.java" to="TEST-*Test.xml"/>
 <packagemapper from="*Test.java" to="TEST-*Test.xml"/>
-
+
Source file name
@@ -612,10 +612,10 @@ with <uptodate> and <junit> output.

The to and from attributes are both required.

Example: -
+
 <mapper type="unpackage" from="TEST-*Test.xml" to="${test.src.dir}/*Test.java">
 <unpackagemapper from="TEST-*Test.xml" to="${test.src.dir}/*Test.java">
-
+
Source file name
@@ -640,12 +640,12 @@ with <uptodate> and <junit> output.

same as the order of the nested mappers; prior to Ant 1.8.0 the order has been undefined.

Examples: -
+
 <compositemapper>
   <identitymapper/>
   <packagemapper from="*.java" to="*"/>
 </compositemapper>
-
+
Source file name
@@ -674,7 +674,7 @@ with <uptodate> and <junit> output.

generated by the last nested mapper comprise the ultimate results of the mapping operation. The to and from attributes are ignored.

Examples: -
+
 <chainedmapper>
   <flattenmapper/>
   <globmapper from="*" to="new/path/*"/>
@@ -683,7 +683,7 @@ with <uptodate> and <junit> output.

<globmapper from="*" to="*2"/> </mapper> </chainedmapper> -
+
Source file name
@@ -718,11 +718,11 @@ with <uptodate> and <junit> output.

to the source file name.

Examples: -
+
 <filtermapper>
   <replacestring from="\" to="/"/>
 </filtermapper>
-
+
Source file name
@@ -734,13 +734,13 @@ with <uptodate> and <junit> output.

foo/bar/A.java
-
+
 <filtermapper>
   <scriptfilter language="beanshell">
     self.setToken(self.getToken().toUpperCase());
   </scriptfilter>
 </filtermapper>
-
+ @@ -838,12 +838,12 @@ an explanation of scripts and dependencies.

Example:

-
+
 <scriptmapper language="javascript">
   self.addMappedName(source.toUpperCase());
   self.addMappedName(source.toLowerCase());
 </scriptmapper>
-
+
@@ -907,12 +907,12 @@ list of mapped names reset after every invocation. different from composite mapper which collects the results of all matching children.

Examples: -
+
 <firstmatchmapper>
   <globmapper from="*.txt" to="*.bak"/>
   <globmapper from="*A.*" to="*B.*"/>
 </firstmatchmapper>
-
+
@@ -939,9 +939,9 @@ list of mapped names reset after every invocation. the source file name.

Examples: -
+
 <cutdirsmapper dirs="1"/>
-
+
diff --git a/manual/Types/multirootfileset.html b/manual/Types/multirootfileset.html index cbe1fdcd0..fbb83a80b 100644 --- a/manual/Types/multirootfileset.html +++ b/manual/Types/multirootfileset.html @@ -143,25 +143,25 @@ an <and> selector container.

Examples

-
+
 <multirootfileset basedirs="${build.dir},${other.project.dir}">
   <include name="apps/**/classes"/>
   <exclude name="apps/**/*Test*"/>
 </multirootfileset>
-
+

Groups all files inside classes found under the apps subdirectory of ${build.dir} or ${other.project.dir}, except those that have the text Test in their name.

-
+
 <multirootfileset>
   <basedir file="${build.dir}"/>
   <basedir file="${other.project.dir}"
   <include name="apps/**/classes"/>
   <exclude name="apps/**/*Test*"/>
 </multirootfileset>
-
+

Is equivalent to the first example but used nested basedir elements. The nested elements and the basedirs attribute can be used at the same time and diff --git a/manual/Types/patternset.html b/manual/Types/patternset.html index e06cfc253..3ab11e395 100644 --- a/manual/Types/patternset.html +++ b/manual/Types/patternset.html @@ -133,12 +133,12 @@ patterns to the parent patternset.

A nested patternset can be inverted using the <invert> element. Since Apache Ant 1.7.1

Examples

-
+
 <patternset id="non.test.sources">
   <include name="**/*.java"/>
   <exclude name="**/*Test*"/>
 </patternset>
-
+

Builds a set of patterns that matches all .java files that do not contain the text Test in their name. This set can be referred to via @@ -153,34 +153,34 @@ attribute to hold a single pattern.

specify that the element should only be used if a property is set, or that it should be used only if a property is not set.

For example

-
+
 <patternset id="sources">
   <include name="std/**/*.java"/>
   <include name="prof/**/*.java" if="professional"/>
   <exclude name="**/*Test*"/>
 </patternset>
-
+

will only include the files in the sub-directory prof if the property professional is set to some value.

The two sets

-
+
 <patternset includesfile="some-file"/>
-
+

and

-
+
 <patternset>
   <includesfile name="some-file"/>
 <patternset/>
-
+

are identical. The include patterns will be read from the file some-file, one pattern per line.

-
+
 <patternset>
   <includesfile name="some-file"/>
   <includesfile name="${some-other-file}"
                 if="some-other-file"/>
 <patternset/>
-
+

will also read include patterns from the file the property some-other-file points to, if a property of that name has been defined.

diff --git a/manual/Types/permissions.html b/manual/Types/permissions.html index a1438e535..83698b01a 100644 --- a/manual/Types/permissions.html +++ b/manual/Types/permissions.html @@ -114,7 +114,7 @@ If the actions are left empty all actions match, and are revoked.

Base set

A permissions set implicitly contains the following permissions: -
+
 <grant class="java.net.SocketPermission" name="localhost:1024-" actions="listen">
 <grant class="java.util.PropertyPermission" name="java.version" actions="read">
 <grant class="java.util.PropertyPermission" name="java.vendor" actions="read">
@@ -136,25 +136,25 @@ A permissions set implicitly contains the following permissions:
 <grant class="java.util.PropertyPermission" name="java.vm.version" actions="read">
 <grant class="java.util.PropertyPermission" name="java.vm.vendor" actions="read">
 <grant class="java.util.PropertyPermission" name="java.vm.name" actions="read">
-
+ These permissions can be revoked via <revoke> elements if necessary.

Examples

-
+
 <permissions>
   <grant class="java.security.AllPermission"/>
   <revoke class="java.util.PropertyPermission"/>
 </permissions>
-
+

Grants all permissions to the code except for those handling Properties.

-
+
 <permissions>
   <grant class="java.net.SocketPermission" name="foo.bar.com" action="connect"/>
   <grant class="java.util.PropertyPermission" name="user.home" action="read,write"/>
 </permissions>
-
+

Grants the base set of permissions with the addition of a SocketPermission to connect to foo.bar.com and the permission to read and write the user.home system property. diff --git a/manual/Types/propertyset.html b/manual/Types/propertyset.html index 922723609..e98dea476 100644 --- a/manual/Types/propertyset.html +++ b/manual/Types/propertyset.html @@ -56,8 +56,7 @@ supports this.

propertyref

-

Selects properties from the current project to be included in the -set.

+

Selects properties from the current project to be included in the set.

@@ -100,7 +99,7 @@ set.

For example:

-
+
 <propertyset id="properties-starting-with-foo">
   <propertyref prefix="foo"/>
 </propertyset>
@@ -111,7 +110,7 @@ set.

<propertyset refid="properties-starting-with-foo"/> <propertyset refid="properties-starting-with-bar"/> </propertyset> -
+

collects all properties whose name starts with either "foo" or "bar" in the set named @@ -123,12 +122,12 @@ set.

specified. The mapper is used to change the names of the property keys, for example: -
+
 <propertyset id="properties-starting-with-foo">
   <propertyref prefix="foo"/>
   <mapper type="glob" from="foo*" to="bar*"/>
 </propertyset>
-
+

collects all properties whose name starts with "foo", but changes the names to start with "bar" instead.

diff --git a/manual/Types/regexp.html b/manual/Types/regexp.html index 5e01ec3e3..005be81c5 100644 --- a/manual/Types/regexp.html +++ b/manual/Types/regexp.html @@ -42,15 +42,11 @@ Regexp represents a regular expression.

Examples

-
-     <regexp id="myregexp" pattern="alpha(.+)beta"/>
-
+
<regexp id="myregexp" pattern="alpha(.+)beta"/>

Defines a regular expression for later use with id myregexp.

-
-     <regexp refid="myregexp"/>
-
+
<regexp refid="myregexp"/>

Use the regular expression with id myregexp.

@@ -67,15 +63,9 @@ See installation dependencies The property ant.regexp.regexpimpl governs which regular expression implementation will be chosen. Possible values for this property are:

It can also be another implementation of the interface org.apache.tools.ant.util.regexp.Regexp. If ant.regexp.regexpimpl is not defined, Ant uses Jdk14Regexp as this is always available.

diff --git a/manual/Types/resources.html b/manual/Types/resources.html index 7c0040c58..0222b6c7f 100644 --- a/manual/Types/resources.html +++ b/manual/Types/resources.html @@ -440,7 +440,6 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections: preserving the order of nested collections as well as duplicate resources (contrast with union).

-
@@ -453,7 +452,6 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections:
AttributeNo, default false
-

files

A group of files. These files are matched by absolute patterns diff --git a/manual/Types/selectors.html b/manual/Types/selectors.html index a302081db..be2da68d6 100644 --- a/manual/Types/selectors.html +++ b/manual/Types/selectors.html @@ -151,11 +151,11 @@

Here is an example of how to use the Contains Selector:

-
+    
 <fileset dir="${doc.path}" includes="**/*.html">
     <contains text="script" casesensitive="no"/>
 </fileset>
-
+

Selects all the HTML files that contain the string script.

@@ -232,11 +232,11 @@

Here is an example of how to use the Date Selector:

-
+    
 <fileset dir="${jar.path}" includes="**/*.jar">
     <date datetime="01/01/2001 12:00 AM" when="before"/>
 </fileset>
-
+

Selects all JAR files which were last modified before midnight January 1, 2001.

@@ -282,11 +282,11 @@

Here is an example of how to use the Depend Selector:

-
+    
 <fileset dir="${ant.1.5}/src/main" includes="**/*.java">
     <depend targetdir="${ant.1.4.1}/src/main"/>
 </fileset>
-
+

Selects all the Java source files which were modified in the 1.5 release. @@ -324,11 +324,11 @@

Here is an example of how to use the Depth Selector:

-
+    
 <fileset dir="${doc.path}" includes="**/*">
     <depth max="1"/>
 </fileset>
-
+

Selects all files in the base directory and one directory below that.

@@ -410,12 +410,12 @@

Here is an example of how to use the Different Selector:

-
+    
 <fileset dir="${ant.1.5}/src/main" includes="**/*.java">
     <different targetdir="${ant.1.4.1}/src/main"
         ignoreFileTimes="true"/>
 </fileset>
-
+

Compares all the Java source files between the 1.4.1 and the 1.5 release and selects those who are different, disregarding file times. @@ -470,11 +470,11 @@

Here is an example of how to use the Filename Selector:

-
+    
 <fileset dir="${doc.path}" includes="**/*">
     <filename name="**/*.css"/>
 </fileset>
-
+

Selects all the cascading style sheet files.

@@ -526,11 +526,11 @@

Here is an example of how to use the Present Selector:

-
+    
 <fileset dir="${ant.1.5}/src/main" includes="**/*.java">
     <present present="srconly" targetdir="${ant.1.4.1}/src/main"/>
 </fileset>
-
+

Selects all the Java source files which are new in the 1.5 release. @@ -585,11 +585,11 @@

Here is an example of how to use the regular expression Selector:

-
+    
 <fileset dir="${doc.path}" includes="*.txt">
     <containsregexp expression="[4-6]\.[0-9]"/>
 </fileset>
-
+

Selects all the text files that match the regular expression (have a 4,5 or 6 followed by a period and a number from 0 to 9). @@ -643,14 +643,14 @@

Here is an example of how to use the Size Selector:

-
+    
 <fileset dir="${jar.path}">
   <patternset>
     <include name="**/*.jar"/>
   </patternset>
   <size value="4" units="Ki" when="more"/>
 </fileset>
-
+

Selects all JAR files that are larger than 4096 bytes.

@@ -681,24 +681,24 @@

Here is an example of how to use the Type Selector to select only directories in ${src}

-
+    
 <fileset dir="${src}">
   <type type="dir"/>
 </fileset>
-
+

The Type Selector is often used in conjunction with other selectors. For example, to select files that also exist in a template directory, but avoid selecting empty directories, use: -

+
 <fileset dir="${src}">
     <and>
         <present targetdir="template"/>
         <type type="file"/>
     </and>
 </fileset>
-
+

Modified Selector

The <modified> selector computes a value for a file, compares that @@ -892,18 +892,18 @@

Examples

Here are some examples of how to use the Modified Selector:

-
+    
     <copy todir="dest">
         <fileset dir="src">
             <modified/>
         </fileset>
     </copy>
-    
+

This will copy all files from src to dest which content has changed. Using an updating PropertyfileCache with cache.properties and MD5-DigestAlgorithm.

-
+    
     <copy todir="dest">
         <fileset dir="src">
             <modified update="true"
@@ -916,11 +916,11 @@
             </modified>
         </fileset>
     </copy>
-    
+

This is the same example rewritten as CoreSelector with setting the all the values (same as defaults are).

-
+    
     <copy todir="dest">
         <fileset dir="src">
             <custom class="org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector">
@@ -934,10 +934,10 @@
             </custom>
         </fileset>
     </copy>
-    
+

And this is the same rewritten as CustomSelector.

-
+    
   <target name="generate-and-upload-site">
       <echo> generate the site using forrest </echo>
       <antcall target="site"/>
@@ -949,19 +949,19 @@
           </fileset>
       </ftp>
   </target>
-    
+

A useful scenario for this selector inside a build environment for homepage generation (e.g. with Apache Forrest). Here all changed files are uploaded to the server. The CacheSelector saves therefore much upload time.

-
+    
   <modified cacheclassname="com.mycompany.MyCache">
       <classpath>
           <pathelement location="lib/mycompany-antutil.jar"/>
       </classpath>
   </modified>
-    
+

Uses com.mycompany.MyCache from a jar outside of Ants own classpath as cache implementation

@@ -1277,14 +1277,14 @@ Select files whose filename length is even.

Here is an example of how to use the And Selector:

-
+    
 <fileset dir="${dist}" includes="**/*.jar">
     <and>
         <size value="4" units="Ki" when="more"/>
         <date datetime="01/01/2001 12:00 AM" when="before"/>
     </and>
 </fileset>
-
+

Selects all the JAR file larger than 4096 bytes which haven't been update since the last millennium. @@ -1315,7 +1315,7 @@ Select files whose filename length is even.

Here is an example of how to use the Majority Selector:

-
+    
 <fileset dir="${docs}" includes="**/*.html">
     <majority>
         <contains text="project" casesensitive="false"/>
@@ -1323,7 +1323,7 @@ Select files whose filename length is even.
         <contains text="IntrospectionHelper" casesensitive="true"/>
     </majority>
 </fileset>
-
+

Selects all the HTML files which contain at least two of the three phrases "project", "taskdef", and "IntrospectionHelper" (this last phrase must @@ -1340,7 +1340,7 @@ Select files whose filename length is even.

Here is an example of how to use the None Selector:

-
+    
 <fileset dir="${src}" includes="**/*.java">
     <none>
         <present targetdir="${dest}"/>
@@ -1349,7 +1349,7 @@ Select files whose filename length is even.
         </present>
     </none>
 </fileset>
-
+

Selects only Java files which do not have equivalent java or class files in the dest directory. @@ -1363,13 +1363,13 @@ Select files whose filename length is even.

Here is an example of how to use the Not Selector:

-
+    
 <fileset dir="${src}" includes="**/*.java">
     <not>
         <contains text="test"/>
     </not>
 </fileset>
-
+

Selects all the files in the src directory that do not contain the string "test". @@ -1385,7 +1385,7 @@ Select files whose filename length is even.

Here is an example of how to use the Or Selector:

-
+    
 <fileset dir="${basedir}">
     <or>
         <depth max="0"/>
@@ -1394,7 +1394,7 @@ Select files whose filename length is even.
         <filename name="*.jpg"/>
     </or>
 </fileset>
-
+

Selects all the files in the top directory along with all the image files below it. @@ -1442,7 +1442,7 @@ Select files whose filename length is even.

Here is an example of how to use the Selector Reference:

-
+    
 <project default="all" basedir="./ant">
 
     <selector id="completed">
@@ -1465,7 +1465,7 @@ Select files whose filename length is even.
     </target>
 
 </project>
-
+

Zips up all the Java files which have an up-to-date equivalent class file and javadoc file associated with them. @@ -1474,7 +1474,7 @@ Select files whose filename length is even.

And an example of selecting files conditionally, based on whether properties are set:

-
+    
 <fileset dir="${working.copy}">
     <or>
         <selector if="include.tests">
@@ -1492,7 +1492,7 @@ Select files whose filename length is even.
         </selector>
     </or>
 </fileset>
-
+

A fileset that conditionally contains Java source files and Test source and class files.

@@ -1550,13 +1550,13 @@ Select files whose filename length is even. use your class as a selector:

-
+    
 <fileset dir="${mydir}" includes="**/*">
     <custom classname="com.mydomain.MySelector">
         <param name="myattribute" value="myvalue"/>
     </custom>
 </fileset>
-
+

A number of core selectors can also be used as custom selectors by specifying their attributes using <param> elements. These @@ -1578,13 +1578,13 @@ Select files whose filename length is even.

Here is the example from the Depth Selector section rewritten to use the selector through <custom>.

-
+    
 <fileset dir="${doc.path}" includes="**/*">
     <custom classname="org.apache.tools.ant.types.selectors.DepthSelector">
         <param name="max" value="1"/>
     </custom>
 </fileset>
-
+

Selects all files in the base directory and one directory below that.

diff --git a/manual/Types/tarfileset.html b/manual/Types/tarfileset.html index 6a726ff4b..3224e7c3a 100644 --- a/manual/Types/tarfileset.html +++ b/manual/Types/tarfileset.html @@ -159,7 +159,7 @@ resource collection

The specified resource will be used as src.

Examples

-
+
   <copy todir="some-dir">
     <tarfileset includes="lib/**">
@@ -168,7 +168,7 @@ resource collection
       </bzip2resource>
     </tarfileset>
   </copy>
-      
+

downloads the archive some-archive.tar.bz2, uncompresses and extracts it on the fly, copies the contents of the lib directory into diff --git a/manual/Types/xmlcatalog.html b/manual/Types/xmlcatalog.html index 5c8bc14fc..bd2415d33 100644 --- a/manual/Types/xmlcatalog.html +++ b/manual/Types/xmlcatalog.html @@ -241,17 +241,17 @@ resolver library from xml-commons is not available in the classpath, all

Set up an XMLCatalog with a single dtd referenced locally in a user's home directory:

-
+
     <xmlcatalog>
         <dtd
             publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
             location="/home/dion/downloads/docbook/docbookx.dtd"/>
     </xmlcatalog>
-
+

Set up an XMLCatalog with a multiple dtds to be found either in the filesystem (relative to the Ant project basedir) or in the classpath:

-
+
     <xmlcatalog id="commonDTDs">
         <dtd
             publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
@@ -260,13 +260,13 @@ filesystem (relative to the Ant project basedir) or in the classpath:
             publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
             location="web-app_2_2.dtd"/>
     </xmlcatalog>
-
+

Set up an XMLCatalog with a combination of DTDs and entities as well as a nested XMLCatalog and external catalog files in both formats:

-
+
     <xmlcatalog id="allcatalogs">
         <dtd
             publicId="-//ArielPartners//DTD XML Article V1.0//EN"
@@ -286,9 +286,9 @@ formats:

</catalogpath> </xmlcatalog> </xmlcatalog> -
+

To reference the above XMLCatalog in an xslt task:

-

+
     <xslt basedir="${source.doc}"
            destdir="${dest.xdocs}"
            extension=".xml"
@@ -297,7 +297,7 @@ formats:

force="true"> <xmlcatalog refid="allcatalogs"/> </xslt> -
+ diff --git a/manual/Types/zipfileset.html b/manual/Types/zipfileset.html index 3e28a00b1..45a421dae 100644 --- a/manual/Types/zipfileset.html +++ b/manual/Types/zipfileset.html @@ -130,21 +130,19 @@ single element resource collection

The specified resource will be used as src.

Examples

-
-
  <zip destfile="${dist}/manual.zip">
+
  <zip destfile="${dist}/manual.zip">
     <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
     <zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
     <zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
   </zip>
-

zips all files in the htdocs/manual directory into +

zips all files in the htdocs/manual directory into the docs/user-guide directory in the archive, adds the file ChangeLog27.txt in the current directory as docs/ChangeLog.txt, and includes all the html files in examples.zip under docs/examples. The archive might end up containing the files:

- docs/user-guide/html/index.html
-docs/ChangeLog.txt
-docs/examples/index.html
-
+
docs/user-guide/html/index.html
+docs/ChangeLog.txt
+docs/examples/index.html
diff --git a/manual/develop.html b/manual/develop.html index 65b711d31..4d1cacd3c 100644 --- a/manual/develop.html +++ b/manual/develop.html @@ -275,7 +275,6 @@ If your task needs to nest an arbitrary type that has been defined org.apache.tools.ant.taskdefs.condition.Condition, one may have a class:

-
 public class MyTask extends Task {
     private List conditions = new ArrayList();
@@ -287,25 +286,21 @@ public class MyTask extends Task {
     }
 }
   
-

One may define and use this class like this:

-
-
+
 <taskdef name="mytask" classname="MyTask" classpath="classes"/>
 <typedef name="condition.equals"
          classname="org.apache.tools.ant.taskdefs.conditions.Equals"/>
 <mytask>
     <condition.equals arg1="${debug}" arg2="true"/>
 </mytask>
-    
-
+

A more complicated example follows:

-
-
+
 public class Sample {
     public static class MyFileSelector implements FileSelector {
          public void setAttrA(int a) {}
@@ -334,14 +329,13 @@ public class Sample {
         public void setCount(int c) {}
     }
 }
-    
-
+

This class defines a number of static classes that implement/extend Path, MyFileSelector and MyInterface. These may be defined and used as follows:

-
+
 <typedef name="myfileselector" classname="Sample$MyFileSelector"
          classpath="classes" loaderref="classes"/>
 <typedef name="buildpath" classname="Sample$BuildPath"
@@ -358,7 +352,7 @@ public class Sample {
       </myfileselector>
    </fileset>
 </copy>
-  
+

TaskContainer

@@ -382,7 +376,7 @@ invoke perform on these instances instead of

Let's write our own task, which prints a message on the System.out stream. The task has one attribute, called message.

-
+
 package com.mydomain;
 
@@ -403,7 +397,7 @@ public class MyVeryOwnTask extends Task {
     }
 }
 
-
+

It's really this simple ;-)

Adding your task to the system is rather simple too:

    @@ -415,7 +409,7 @@ public class MyVeryOwnTask extends Task {

Example

-
+
 <?xml version="1.0"?>
 
@@ -427,7 +421,6 @@ public class MyVeryOwnTask extends Task {
   </target>
 </project>
 
-

Example 2

To use a task directly from the buildfile which created it, place the @@ -435,7 +428,7 @@ To use a task directly from the buildfile which created it, place the after the compilation. Use the classpath attribute of <taskdef> to point to where the code has just been compiled. -
+
 <?xml version="1.0"?>
 
@@ -457,7 +450,6 @@ compiled.
   </target>
 </project>
 
-

Another way to add a task (more permanently), is to add the task name and implementing class name to the default.properties file in the @@ -502,9 +494,9 @@ listener, of course).

If you wish to attach a listener from the command line you may use the -listener option. For example:

-
-
ant -listener org.apache.tools.ant.XmlLogger
-
+ +
ant -listener org.apache.tools.ant.XmlLogger
+

will run Ant with a listener that generates an XML representation of the build progress. This listener is included with Ant, as is the default listener, which generates the logging to standard output.

@@ -528,7 +520,6 @@ When starting your build provide your adapter class and the log library to the build classpath and activate your logger via -listener option as described above. -
 public class MyLogAdapter implements BuildListener {
 
@@ -555,7 +546,6 @@ public class MyLogAdapter implements BuildListener {
     // implement all methods in that way
 }
 
-

Source code integration

diff --git a/manual/ifunless.html b/manual/ifunless.html index 8d0da2eb3..03e970cff 100644 --- a/manual/ifunless.html +++ b/manual/ifunless.html @@ -28,11 +28,10 @@

Since Ant 1.9.1, it is possible to add if and unless attributes on all tasks and nested elements using special namespaces.

In order to use this feature you need to add the following namespace declarations

-
+  
     xmlns:if="ant:if"
     xmlns:unless="ant:unless"
     
-

The if and unless namespaces support the following 3 conditions:

- -
 <project name="tryit"
  xmlns:if="ant:if"
@@ -58,7 +55,6 @@
  <echo unless:set="onmac">not running on MacOS</echo>
 </project>
 
-
diff --git a/manual/install.html b/manual/install.html index 7051546ca..9c0c034e8 100644 --- a/manual/install.html +++ b/manual/install.html @@ -418,9 +418,7 @@ the optional Ant tasks need. To do so, change to the ANT_HOME directory and execute the command:

-
-
ant -f fetch.xml -Ddest=[option]
-
+
ant -f fetch.xml -Ddest=[option]

where option is one of the following, as described above: @@ -528,21 +526,15 @@ laptop, you have to change these settings as you roam. To set ANT_OPTS For csh/tcsh:

-
-    setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
-
+
setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

For bash:

-
-    export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
-
+
export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

For Windows, set the environment variable in the appropriate dialog box and open a new console or, by hand

-
-    set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
-
+
set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
@@ -757,9 +749,9 @@ reasons why the chmod task might fail (like when different user than the one who installed Ant initially). In this case you can set the Ant property chmod.fail to false when starting the build like in

-
-

sh build.sh install -Dchmod.fail=false

-
+ +
sh build.sh install -Dchmod.fail=false
+

and any error to change permission will not result in a build failure.

diff --git a/manual/listeners.html b/manual/listeners.html index f21fe1ab7..222ad688a 100644 --- a/manual/listeners.html +++ b/manual/listeners.html @@ -134,15 +134,13 @@ listeners and loggers.

DefaultLogger

Simply run Ant normally, or:

-
-

ant -logger org.apache.tools.ant.DefaultLogger

-
+ +
ant -logger org.apache.tools.ant.DefaultLogger

NoBannerLogger

Removes output of empty target output.

-
-

ant -logger org.apache.tools.ant.NoBannerLogger

-
+ +
ant -logger org.apache.tools.ant.NoBannerLogger

MailLogger

The MailLogger captures all output logged through DefaultLogger (standard Ant @@ -280,9 +278,7 @@ control for turning off success or failure messages individually.

-
-

ant -logger org.apache.tools.ant.listener.MailLogger

-
+
ant -logger org.apache.tools.ant.listener.MailLogger

AnsiColorLogger

@@ -353,9 +349,7 @@ Background is one of the following: 46 -> Cyan 47 -> White -
ant -logger org.apache.tools.ant.listener.AnsiColorLogger
-

Log4jListener

Deprecated: Apache Log4j (1) is not developed any more. Last @@ -374,24 +368,19 @@ INFO or ERROR depending on whether the build failed during that stage. Message events are logged according to their Ant logging level, mapping directly to a corresponding Log4j level.

-
ant -listener org.apache.tools.ant.listener.Log4jListener
-

To use Log4j you will need the Log4j JAR file and a 'log4j.properties' configuration file. Both should be placed somewhere in your Ant classpath. If the log4j.properties is in your project root folder you can add this with -lib option:

-
ant -listener org.apache.tools.ant.listener.Log4jListener -lib .
-

If, for example, you wanted to capture the same information output to the console by the DefaultLogger and send it to a file named 'build.log', you could use the following configuration:

-
log4j.rootLogger=ERROR, LogFile
 log4j.logger.org.apache.tools.ant.Project=INFO
 log4j.logger.org.apache.tools.ant.Target=INFO
@@ -403,7 +392,6 @@ log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout
 log4j.appender.LogFile.layout.ConversionPattern=[%6r] %8c{1} : %m%n
 log4j.appender.LogFile.file=build.log
 
-

For more information about configuring Log4J see its documentation page.

@@ -421,7 +409,6 @@ For using the bridge with Ant you have to add to your classpath (e.g. via the -lib option). (For using the bridge Ant 1.9.10/1.10.2 or higher is required.) Translating the 1.x properties file into the 2.x xml syntax would result in -
<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="WARN">
   <Appenders>
@@ -442,7 +429,6 @@ Translating the 1.x properties file into the 2.x xml syntax would result in
   </Loggers>
 </Configuration>
 
-

XmlLogger

Writes all build information out to an XML file named log.xml, or the value @@ -459,10 +445,8 @@ this can be a relative or absolute file path, or an http URL. If you set the property to the empty string, "", no XSLT transform is declared at all.

-
ant -listener org.apache.tools.ant.XmlLogger
 ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml
-

TimestampedLogger

@@ -474,9 +458,7 @@ ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml

To use this listener, use the command:

-
ant  -logger org.apache.tools.ant.listener.TimestampedLogger
-

BigProjectLogger

@@ -528,9 +510,7 @@ Exiting project "junit" are in charge -or more importantly, which project is failing.

To use this listener, use the command:

-
ant  -logger org.apache.tools.ant.listener.BigProjectLogger
-

SimpleBigProjectLogger

Like BigProjectLogger, project-qualified target names are printed, @@ -558,9 +538,7 @@ Total time: 1 second

since Ant 1.8.1

To use this listener, use the command:

-
ant -logger org.apache.tools.ant.listener.SimpleBigProjectLogger
-

ProfileLogger

This logger stores the time needed for executing a task, target and the whole build and prints diff --git a/manual/running.html b/manual/running.html index 56b03b275..dbd781091 100644 --- a/manual/running.html +++ b/manual/running.html @@ -191,41 +191,30 @@ JVM documentation for more details.

Examples

-
-
ant
-
+ +
ant

runs Ant using the build.xml file in the current directory, on the default target.

-
-
ant -buildfile test.xml
-
+
ant -buildfile test.xml

runs Ant using the test.xml file in the current directory, on the default target.

-
-
ant -buildfile test.xml dist
-
+
ant -buildfile test.xml dist

runs Ant using the test.xml file in the current directory, on the target called dist.

-
-
ant -buildfile test.xml -Dbuild=build/classes dist
-
+
ant -buildfile test.xml -Dbuild=build/classes dist

runs Ant using the test.xml file in the current directory, on the target called dist, setting the build property to the value build/classes.

-
-
ant -lib /home/ant/extras
-
+
ant -lib /home/ant/extras

runs Ant picking up additional task and support jars from the /home/ant/extras location

-
-
ant -lib one.jar;another.jar
-
ant -lib one.jar -lib another.jar
-
+
ant -lib one.jar;another.jar
+
ant -lib one.jar -lib another.jar

adds two jars to Ants classpath.

Files

@@ -262,9 +251,7 @@ set):

Some of Ant's core classes can be configured via system properties.

Here is the result of a search through the codebase. Because system properties are available via Project instance, I searched for them with a

-
-    grep -r -n "getPropert" * > ..\grep.txt
-
+
grep -r -n "getPropert" * > ..\grep.txt

command. After that I filtered out the often-used but not-so-important values (most of them read-only values): path.separator, ant.home, basedir, user.dir, os.name, line.separator, java.home, java.version, java.version, user.home, java.class.path
@@ -565,13 +552,9 @@ have some documentation inside.

Running Ant via Java

If you have installed Ant in the do-it-yourself way, Ant can be started from one of two entry points:

-
-
java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]
-
-
-
java -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] [target]
-
+
java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]
+
java -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] [target]

The first method runs Ant's traditional entry point. The second method uses diff --git a/manual/stylesheets/style.css b/manual/stylesheets/style.css index a77379e32..0b474aca3 100644 --- a/manual/stylesheets/style.css +++ b/manual/stylesheets/style.css @@ -84,11 +84,13 @@ code { pre { background-color: #efefef; + margin-right: 4rem; + margin-left: 4rem; } /* code snippets in examples and tutorials */ .code { - background: #EFEFEF; + background: #efefef; } /* highlight console output */ diff --git a/manual/targets.html b/manual/targets.html index 6501660d6..4c1c891c0 100644 --- a/manual/targets.html +++ b/manual/targets.html @@ -40,12 +40,10 @@ mind that it is possible that a target can get executed earlier when an earlier target depends on it:

-
-
<target name="A"/>
+  
<target name="A"/>
 <target name="B" depends="A"/>
 <target name="C" depends="B"/>
 <target name="D" depends="C,B,A"/>
-

Suppose we want to execute target D. From its depends attribute, you might think that first target @@ -53,7 +51,7 @@ depends on A, so first A is executed, then B, then C, and finally D.

-
Call-Graph:  A --> B --> C --> D
+
Call-Graph:  A --> B --> C --> D

In a chain of dependencies stretching back from a given target such as D above, each target gets executed only once, even when @@ -81,10 +79,8 @@ the properties page for more details. For example:

-
<target name="build-module-A" if="module-A-present"/>
<target name="build-own-fake-module-A" unless="module-A-present"/>
-

In the first example, if the module-A-present property is set (to any value, e.g. false), the target will @@ -96,7 +92,7 @@ clause. If you want to check multiple conditions, you can use a dependent target for computing the result for the check:

-
+
 <target name="myTarget" depends="myTarget.check" if="myTarget.run">
     <echo>Files foo.txt and bar.txt are present.</echo>
 </target>
@@ -109,9 +105,9 @@
         </and>
     </condition>
 </target>
-
+ -
Call-Graph:  myTarget.check --> maybe(myTarget)
+
Call-Graph:  myTarget.check --> maybe(myTarget)

If no if and no unless attribute is present, the target will always be executed.

@@ -136,7 +132,7 @@ depend. Make sure that target is always the first one in the depends list of the other targets. In this manual, most initialization targets have the name "init".

-
+    
     <project>
         <target name="init">
             <tstamp/>
@@ -145,15 +141,15 @@
             ...
         </target>
     </project>
-    
+

Especially if you only have a few tasks you also could place these tasks directly under the project tag (since Ant 1.6.0):

-
+    
     <project>
         <tstamp/>
     </project>
-    
+

If the depends attribute and the if/unless attribute are set, the depends attribute is executed first.

@@ -263,7 +259,7 @@

For example your imported build file may need to compile code, it might look like:

-
+
 <target name="create-directory-layout">
    ...
 </target>
@@ -272,20 +268,20 @@
 <target name="compile" depends="ready-to-compile">
    ...
 </target>
-
+ -
Call-Graph:  create-directory-layout --> 'empty slot' --> compile
+
Call-Graph:  create-directory-layout --> 'empty slot' --> compile

And you need to generate some source before compilation, then in your main build file you may use something like

-
+
 <target name="generate-sources"
         extensionOf="ready-to-compile">
    ...
 </target>
-
+ -
Call-Graph:  create-directory-layout --> generate-sources  --> compile
+
Call-Graph:  create-directory-layout --> generate-sources  --> compile

This will ensure that the generate-sources target is executed before the compile target.

diff --git a/manual/tutorial-HelloWorldWithAnt.html b/manual/tutorial-HelloWorldWithAnt.html index 938204593..916ca7a74 100644 --- a/manual/tutorial-HelloWorldWithAnt.html +++ b/manual/tutorial-HelloWorldWithAnt.html @@ -486,11 +486,11 @@ need the HTML report just for testing, e.g. if you are fixing an error or a inte

Resources

-
-    [1] http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip
-    [2] http://logging.apache.org/log4j/docs/manual.html
-    [3] http://www.junit.org/index.htm
-
+
    +
  1. http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip
  2. +
  3. http://logging.apache.org/log4j/docs/manual.html
  4. +
  5. http://www.junit.org/index.htm
  6. +
diff --git a/manual/using.html b/manual/using.html index 898488aa3..c1b330084 100644 --- a/manual/using.html +++ b/manual/using.html @@ -99,9 +99,9 @@ executed if the dependent target(s) did not (need to) run. of an attribute might contain references to a property. These references will be resolved before the task is executed.

Tasks have a common structure:

-
-
<name attribute1="value1" attribute2="value2" ... />
-
+ +
<name attribute1="value1" attribute2="value2" ... />
+

where name is the name of the task, attributeN is the attribute name, and valueN is the value for this attribute.

@@ -111,21 +111,21 @@ easy to write your own.

this attribute will be used in the logging messages generated by Ant.

Tasks can be assigned an id attribute: -
+
<taskname id="taskID" ... />
-
+ where taskname is the name of the task, and taskID is a unique identifier for this task. You can refer to the corresponding task object in scripts or other tasks via this name. For example, in scripts you could do: -
+
 <script ... >
   task1.setFoo("bar");
 </script>
 
-
+ to set the foo attribute of this particular task instance. In another task (written in Java), you can access the instance via project.getReference("task1"). @@ -356,18 +356,15 @@ via nested <path> elements:

</path> can be written as: -
-    <path id="base.path" path="${classpath}"/>
-
- -

Path Shortcut

-

+

<path id="base.path" path="${classpath}"/>
+

Path Shortcut

+

In Ant 1.6 a shortcut for converting paths to OS specific strings in properties has been added. One can use the expression ${toString:pathreference} to convert a path element reference to a string that can be used for a path argument. For example: -

+

   <path id="lib.path.ref">
     <fileset dir="lib" includes="*.jar"/>
@@ -438,18 +435,18 @@ similar to what a (Unix) shell would do, but may create something that
 is very different from what you expect under some circumstances.

Examples

-
+
   <arg value="-l -a"/>
-
+

is a single command-line argument containing a space character, not separate commands "-l" and "-a".

-
+
   <arg line="-l -a"/>
-
+

This is a command line with two separate arguments, "-l" and "-a".

-
+
   <arg path="/dir;/dir2:\dir3"/>
-
+

is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems.

@@ -463,7 +460,7 @@ element of the same type. This can be useful if you are going to replicate the same snippet of XML over and over again--using a <classpath> structure more than once, for example.

The following example:

-
+
 <project ... >
   <target ... >
     <rmic ...>
@@ -485,9 +482,9 @@ replicate the same snippet of XML over and over again--using a
     </javac>
   </target>
 </project>
-
+

could be rewritten as:

-
+
 <project ... >
   <path id="project.class.path">
     <pathelement location="lib/"/>
@@ -507,7 +504,7 @@ replicate the same snippet of XML over and over again--using a
     </javac>
   </target>
 </project>
-
+

All tasks that use nested elements for PatternSets, FileSets,