diff --git a/manual/Integration/jext-plugin.html b/manual/Integration/jext-plugin.html index cf0734fc8..7cd2482cb 100644 --- a/manual/Integration/jext-plugin.html +++ b/manual/Integration/jext-plugin.html @@ -30,25 +30,24 @@ by

You can download the plugin - at: http://sourceforge.net/projects/jext/files/OldFiles/antwork_plugin.zip/download

+at: http://sourceforge.net/projects/jext/files/OldFiles/antwork_plugin.zip/download

Installation instructions from the Readme.txt

You have to enable the Jext Console to see the Apache Ant output (menu: -Edit→Options…–General Panel), because Ant messages are -redirected to the Jext console.

+Edit→Options…–General Panel), because Ant messages are redirected to the Jext +console.

-

You can configure the Ant call in the Jext menu: Edit→Options…– -Plugin Options–Antwork Plugin Panel; here you can set Ant home -directory and the path to your build file.

+

You can configure the Ant call in the Jext menu: Edit→Options…– Plugin +Options–Antwork Plugin Panel; here you can set Ant home directory and the path to your build +file.

-

You can start AntWork in the menu: Plugins→Ant→Work Now! In the -appearing dialog box you can enter the target which you want to -compile.

+

You can start AntWork in the menu: Plugins→Ant→Work Now! In the appearing dialog box +you can enter the target which you want to compile.

-

If a javac error occurs in the Ant run, an error list opens within -Jext. With a double click on the error message you jump to the error -in the specified Java source file.

+

If a javac error occurs in the Ant run, an error list opens within Jext. With a +double click on the error message you jump to the error in the specified Java source file.

diff --git a/manual/Tasks/BorlandEJBTasks.html b/manual/Tasks/BorlandEJBTasks.html index a4015276b..4bf59763f 100644 --- a/manual/Tasks/BorlandEJBTasks.html +++ b/manual/Tasks/BorlandEJBTasks.html @@ -36,8 +36,8 @@ Deployment Descriptor, builds the jar file including the support files and verif produced jar is valid or not.

Benoit Moussaud maintains a -separate FAQ -for this task at his homepage.

+separate FAQ for this task at his homepage.

Borland element

diff --git a/manual/Tasks/cab.html b/manual/Tasks/cab.html index 1934cd5fe..d83487cd5 100644 --- a/manual/Tasks/cab.html +++ b/manual/Tasks/cab.html @@ -31,7 +31,8 @@ the jar or zip t will work on Windows using the external cabarc tool (provided by Microsoft) which must be located in your executable path.

To use this task on other platforms you need to download and compile libcabinet -from https://www.freshports.org/archivers/libcabinet/.

+from https://www.freshports.org/archivers/libcabinet/.

See the section on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

This task forms an implicit FileSet and supports most diff --git a/manual/Tasks/changelog.html b/manual/Tasks/changelog.html index a6852261c..58c17b190 100644 --- a/manual/Tasks/changelog.html +++ b/manual/Tasks/changelog.html @@ -28,12 +28,12 @@

Description

Generates an XML-formatted report file of the change logs recorded in a CVS repository.

-

Important: This task needs cvs on the path. If it isn't, you will get -an error (such as error 2 on Windows). If <cvs> doesn't work, try to -execute cvs.exe from the command line in the target directory in which you are working. -Also note that this task assumes that the cvs executable is compatible with the Unix version, this -is not completely true for certain other CVS clients—like CVSNT for example—and some -operation may fail when using such an incompatible client.

+

Important: This task needs cvs on the path. If it isn't, you will +get an error (such as error=2 on Windows). If <cvs> doesn't work, +try to execute cvs.exe from the command line in the target directory in which you are +working. Also note that this task assumes that the cvs executable is compatible with the Unix +version, this is not completely true for certain other CVS clients—like CVSNT for +example—and some operation may fail when using such an incompatible client.

Parameters

diff --git a/manual/Tasks/checksum.html b/manual/Tasks/checksum.html index 0970dea4c..627e6345b 100644 --- a/manual/Tasks/checksum.html +++ b/manual/Tasks/checksum.html @@ -31,19 +31,19 @@

Note that many popular message digest functions—including MD5 and SHA-1—have been broken recently. If you are going to use the task to create checksums used in an environment where security is important, please take some time to investigate the algorithms offered by your JCE -provider. Note also that some JCE providers like the one -by The Legion of the Bouncy Castle, -the GNU project -or the Technical University Graz offer more -digest algorithms than those built-in into your JDK.

+provider. Note also that some JCE providers like the one by The Legion of the Bouncy Castle, +the GNU project +or the Technical University Graz +offer more digest algorithms than those built-in into your JDK.

Warning: the case of the extension is that of the algorithm used. If you ask for SHA1, you get a .SHA1 extension; if you ask for sha1, you get a file ending in .sha1. The Java Crypto Engines are case-insensitive in matching algorithms, so choose a name to match your desired output extension, or set the fileext -attribute. The names of common hashing algorithms can be located on the Cryptography -Architecture Standard Algorithm Name Documentation

+attribute. The names of common hashing algorithms can be located on +the Cryptography Architecture Standard Algorithm Name Documentation

Parameters

@@ -66,10 +66,10 @@ Architecture Standard Algorithm Name Documentation

- @@ -101,12 +101,12 @@ Architecture Standard Algorithm Name Documentation

+ for MessageFormat where {0} is replaced with the checksum + and {1} with the file name. Since Ant 1.7.0
Since Ant + 1.8.2{2} is replaced by the path of the file relative to the checksum file + being written, {3} with the path of the file relative to the + project's basedir and {4} with the absolute path of the file. diff --git a/manual/Tasks/concat.html b/manual/Tasks/concat.html index a7e6aaff1..cccacc61d 100644 --- a/manual/Tasks/concat.html +++ b/manual/Tasks/concat.html @@ -81,8 +81,8 @@ + see Supported Encodings for a list of possible values. diff --git a/manual/Tasks/conditions.html b/manual/Tasks/conditions.html index 42d48732e..0efbb69e3 100644 --- a/manual/Tasks/conditions.html +++ b/manual/Tasks/conditions.html @@ -28,7 +28,7 @@

Conditions are nested elements of the <condition> and <waitfor> tasks. There are core conditions and custom conditions. Custom conditions are described -in Custom Conditions. Core +in Custom Conditions. Core Conditions are described below.

Core Conditions

@@ -440,8 +440,8 @@ include tasks, datatypes, scriptdefs, macrodefs and presetdefs.

Evaluate a condition based on a script in any Apache BSF -or JSR -223 supported language.

+or JSR 223 supported language.

See the Script task for an explanation of scripts and dependencies.

diff --git a/manual/Tasks/cvs.html b/manual/Tasks/cvs.html index 9d63ae304..3e18376f7 100644 --- a/manual/Tasks/cvs.html +++ b/manual/Tasks/cvs.html @@ -29,7 +29,7 @@

Handles packages/modules retrieved from a CVS repository.

Important: This task needs cvs binary on the path. If it isn't, you -will get an error (such as error 2 on Windows). If <cvs> doesn't +will get an error (such as error=2 on Windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working. Also note that this task assumes that the cvs executable is compatible with the Unix version, this is not completely true for certain other CVS clients—like CVSNT for @@ -38,8 +38,8 @@ example—and some operation may fail when using such an incompatible client

CVSNT Note: CVSNT prefers users to store the passwords inside the registry. If the cvspass task and the passfile attribute don't seem to work for you, the most likely reason is that CVSNT ignores your .cvspass file completely. -See bugzilla report 21657 -for recommended workarounds.

+See bugzilla +report 21657 for recommended workarounds.

Parameters

algorithmSpecifies the algorithm to be used to compute the checksum. Please check the - documentation - for available algorithm names, like SHA-1 or SHA-512. + Specifies the algorithm to be used to compute the checksum. Please check + the documentation for available algorithm names, like SHA-1 + or SHA-512. No; defaults to MD5
pattern Specifies the pattern to use as a pattern suitable - for MessageFormat - where {0} is replaced with the checksum and {1} with the file - name. Since Ant 1.7.0
Since Ant 1.8.2 {2} is replaced by the - path of the file relative to the checksum file being written, {3} with tha path of - the file relative to the project's basedir and {4} with the absolute - path of the file.
No; default is {0}
encoding Specifies the encoding for the input files. Please - see Supported - Encodings for a list of possible values. No; defaults to default JVM character encoding
diff --git a/manual/Tasks/cvspass.html b/manual/Tasks/cvspass.html index 89816c598..64ed090fc 100644 --- a/manual/Tasks/cvspass.html +++ b/manual/Tasks/cvspass.html @@ -32,8 +32,8 @@ a cvs login command.

CVSNT Note: CVSNT prefers users to store the passwords inside the registry. If the task doesn't seem to work for you, the most likely reason is that CVSNT ignores your .cvspass file -completely. See bugzilla -report 21657 for recommended workarounds.

+completely. See bugzilla report 21657 for recommended workarounds.

Parameters

diff --git a/manual/Tasks/cvstagdiff.html b/manual/Tasks/cvstagdiff.html index 3605c493a..7b4c358e3 100644 --- a/manual/Tasks/cvstagdiff.html +++ b/manual/Tasks/cvstagdiff.html @@ -26,7 +26,7 @@

Generates an XML-formatted report file of the changes between two tags or dates recorded in a CVS repository.

Important: This task needs cvs on the path. If it isn't, you will -get an error (such as error 2 on Windows). If <cvs> doesn't work, +get an error (such as error=2 on Windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working. Also note that this task assumes that the cvs executable is compatible with the Unix version, this is not completely true for certain other CVS clients—like CVSNT for diff --git a/manual/Tasks/defaultexcludes.html b/manual/Tasks/defaultexcludes.html index 5afac3920..b26ed19f6 100644 --- a/manual/Tasks/defaultexcludes.html +++ b/manual/Tasks/defaultexcludes.html @@ -84,12 +84,12 @@ normal behavior

Notes

By default the pattern **/.svn and **/.svn/** are set as default -excludes. Since version 1.3, Subversion supports the "_svn -hack". That means, that the svn-libraries evaluate environment variables and -use .svn or _svn directory regarding to that value. We had chosen not to -evaluate environment variables to get a more reliable build. Instead you have to change the settings -by yourself by changing the exclude patterns:

+excludes. Since version 1.3, Subversion supports +the "_svn hack". That means, that the svn-libraries evaluate environment +variables and use .svn or _svn directory regarding to that value. We had +chosen not to evaluate environment variables to get a more reliable build. Instead you have to +change the settings by yourself by changing the exclude patterns:

 <defaultexcludes remove="**/.svn"/>
 <defaultexcludes remove="**/.svn/**"/>
diff --git a/manual/Tasks/delete.html b/manual/Tasks/delete.html
index 783625c98..81d14602d 100644
--- a/manual/Tasks/delete.html
+++ b/manual/Tasks/delete.html
@@ -124,7 +124,7 @@ nested <fileset>.

+ use default excludes. diff --git a/manual/Tasks/depend.html b/manual/Tasks/depend.html index 1d5b58c0e..a000010df 100644 --- a/manual/Tasks/depend.html +++ b/manual/Tasks/depend.html @@ -40,7 +40,8 @@ class references encoded into the class files by the compiler. This is generally the Java source files.

To learn more about how this information is obtained from the class files, please refer -to the Java Virtual Machine Specification

+to the Java Virtual Machine +Specification

Since a class' dependencies only change when the class itself changes, the depend task is able to cache dependency information. Only those class files which have diff --git a/manual/Tasks/ear.html b/manual/Tasks/ear.html index 67969825c..60c1a698f 100644 --- a/manual/Tasks/ear.html +++ b/manual/Tasks/ear.html @@ -122,10 +122,10 @@ attribute to a value other than its default, add.

+ or zipgroupfileset file. Valid values are skip, merge, + and mergewithoutmain. merge will merge all of the manifests together, and merge + this into any other specified manifests. mergewithoutmain merges everything but the + Main section of the manifests. @@ -142,10 +142,11 @@ attribute to a value other than its default, add.

+ an index list to speed up classloading. This is a JDK 1.3+ specific feature. + Unless you specify additional jars with + nested indexjars elements, only the contents of + this jar will be included in the index. @@ -153,9 +154,10 @@ attribute to a value other than its default, add.

+ changed with Java + 5. In order to avoid problems with Ant generated jars on Java 1.4 or earlier, Ant will + not include META-INF unless explicitly asked to.
Since Ant + 1.8.0. diff --git a/manual/Tasks/echo.html b/manual/Tasks/echo.html index 5a0c383fe..3294854a4 100644 --- a/manual/Tasks/echo.html +++ b/manual/Tasks/echo.html @@ -59,7 +59,7 @@ file is available, and the level option is ignored

@@ -96,8 +96,8 @@ three lines; the first line is a blank </echo>

The newline immediately following the <echo> tag will be part of the output. Newlines in character data within the content of an element are not discarded by XML -parsers.
See W3C Recommendation 26 November -2008 / End of Line handling for more details.

+parsers.
See W3C Recommendation +26 November 2008 / End of Line handling for more details.

<echo message="Deleting drive C:" level="debug"/>

A message which only appears in -debug mode.

diff --git a/manual/Tasks/ejb.html b/manual/Tasks/ejb.html index 303cb01d5..e45f08ef7 100644 --- a/manual/Tasks/ejb.html +++ b/manual/Tasks/ejb.html @@ -56,13 +56,15 @@ Server.

The tasks support:

Vendors such as BEA and IBM now provide custom Ant tasks to work with their particular products. More importantly, EJB 3.0 renders this whole process obsolete. Accordingly, development @@ -74,16 +76,20 @@ applications and definitely not new EJB 2.x servers.

EJB Tasks

defaultexcludes Deprecated. Use resource collections. Whether to - use default excludes. No; default true
filesetmanifest behavior when a manifest file is found in a zipfileset - or zipgroupfileset file. Valid values are skip, merge, - and mergewithoutmain. merge will merge all of the manifests together, and merge - this into any other specified manifests. mergewithoutmain merges everything but the Main - section of the manifests. No; defaults to skip
index whether to create - an index - list to speed up classloading. This is a JDK 1.3+ specific feature. Unless you specify - additional jars with nested indexjars elements, - only the contents of this jar will be included in the index. No; defaults to false
whether to include META-INF and its children in the index. Doesn't have any effect if index is false.
Oracle's jar implementation used to skip the META-INF directory and Ant followed that example. The behavior has been - changed with Java 5. In order - to avoid problems with Ant generated jars on Java 1.4 or earlier, Ant will not - include META-INF unless explicitly asked to.
Since Ant 1.8.0.
No; defaults to false
append Append to an existing file (or open a new file / overwrite an existing file)? + target="_top"> open a new file / overwrite an existing file)? No; ignored unless output indicates a filesystem destination, default is false
- - + + - + - +
TaskApplication Servers
blgenclientBorland Application Server 4.5 and 5.x
iplanet-ejbciPlanet Application Server 6.0
blgenclientBorland + Application Server 4.5 and 5.x
iplanet-ejbciPlanet Application Server + 6.0
ejbjarNested Elements
borlandBorland Application Server 4.5 and 5.x
borlandBorland Application Server 4.5 and + 5.x
iPlanetiPlanet Application Server 6.0
jbossJBoss
jonasJOnAS 2.4.x and 2.5
weblogicWebLogic 5.1 to 7.0
websphereIBM WebSphere 4.0
orionIronFlare (Oracle) Orion Application Server 2.0.6
orionIronFlare (Oracle) Orion Application Server + 2.0.6

@@ -504,7 +510,8 @@ specific deployment tools. These currently include:

  • WebLogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool
  • IBM WebSphere 4.0
  • TOPLink for WebLogic 2.5.1-enabled entity beans
  • -
  • JOnAS 2.4.x and 2.5 Open Source EJB server
  • +
  • JOnAS 2.4.x and 2.5 Open Source EJB + server
  • IronFlare Orion Application Server 2.0
  • @@ -528,11 +535,10 @@ its target jar file and determine if it is out of date with respect to the class deployment descriptors that make up the bean. If any of these files are newer than the jar file the jar will be rebuilt otherwise a message is logged that the jar file is up to date.

    -

    The task uses -the BCEL library -to extract all dependent classes. This means that, in addition to the classes that are mentioned in -the deployment descriptor, any classes that these depend on are also automatically included in the -jar file.

    +

    The task uses the BCEL library to extract all +dependent classes. This means that, in addition to the classes that are mentioned in the deployment +descriptor, any classes that these depend on are also automatically included in the jar file.

    Naming convention

    @@ -596,10 +602,10 @@ classes or as parameters to the bean's methods.

    super classes and super interfaces of the bean classes. For this technique to work the bean classes had to be loaded into Ant's JVM. This was not always possible due to class dependencies.

    -

    Since Ant 1.5 the task uses the BCEL -library to analyze the bean's class files directly, rather than loading them into the JVM. This also -allows ejbjar to add all of the required support classes for a bean and not just super -classes.

    +

    Since Ant 1.5 the task uses the BCEL library to analyze the bean's class files directly, rather than loading them +into the JVM. This also allows ejbjar to add all of the required support classes for a +bean and not just super classes.

    Since Ant 1.5, a dependency attribute allows the buildfile to control what additional classes are added to the generated jar. It takes three possible values

    @@ -611,9 +617,9 @@ additional classes are added to the generated jar. It takes three possible value
  • full—In this mode all classes used by the bean's classes and interfaces are added to the jar
  • -

    The super and full values require -the BCEL library to be available. If it is -not, ejbjar will drop back to the behaviour corresponding to the value none.

    +

    The super and full values require the BCEL library to be available. If it is not, ejbjar will drop back to +the behaviour corresponding to the value none.

    Parameters

    diff --git a/manual/Tasks/exec.html b/manual/Tasks/exec.html index 1dde4157b..edc8725d8 100644 --- a/manual/Tasks/exec.html +++ b/manual/Tasks/exec.html @@ -46,11 +46,11 @@ should be more reliable, as would be something like

    Windows Users

    The <exec> task delegates to Runtime.exec which in turn apparently -calls ::CreateProcess. It -is the latter Win32 function that defines the exact semantics of the call. In particular, if you do -not put a file extension on the executable, only .EXE files are looked for, -not .COM, .CMD or other file types listed in the environment -variable PATHEXT. That is only used by the shell.

    +calls ::CreateProcess. It is the latter Win32 function that defines the +exact semantics of the call. In particular, if you do not put a file extension on the executable, +only .EXE files are looked for, not .COM, .CMD or other file +types listed in the environment variable PATHEXT. That is only used by the shell.

    Note that .bat files cannot in general by executed directly. One normally needs to execute the command shell executable cmd using the /c switch.

    @@ -75,8 +75,8 @@ the executable attribute in your buildfile.

    executable parameter. This is because JVM in which Ant is running is a standard Windows executable and is not aware of the Cygwin environment (i.e., doesn't load cygwin1.dll). The only work-around for this is to compile a JVM under Cygwin (at your own risk). See for -instance OpenJDK -build instructions for cygwin.

    +instance OpenJDK build instructions for cygwin.

    OpenVMS Users

    The command specified using executable and <arg> elements is @@ -98,9 +98,9 @@ the fork attribute set to true instead as this task will follo interpretation of exit codes.

    RedHat S/390 Users

    -

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

    +

    It has been reported on linux-390 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:

    @@ -323,10 +323,10 @@ property and have it assigned to the result code (barring immutability, of cours then <exec> halts the build unless failifexecutionfails is set to false. You can use that to run a program if it exists, but otherwise do nothing.

    What do those error codes mean? Well, they are OS dependent. On Windows boxes you have to look -at the -documentation; error=2 means 'no such program', which usually means 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.

    +at the documentation; error=2 means 'no such program', which usually +means 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

    diff --git a/manual/Tasks/ftp.html b/manual/Tasks/ftp.html
    index 0ded19d2f..d47bb57ca 100644
    --- a/manual/Tasks/ftp.html
    +++ b/manual/Tasks/ftp.html
    @@ -223,8 +223,8 @@ connection.

    + Java TimeZone identifier, (e.g. GMT, America/Chicago + or Asia/Jakarta) the timezone used by the server for timestamps. This enables + timestamp dependency checking even when the server is in a different time zone from the + client. Time Zones know, also, about daylight savings time, and do not require you to + calculate milliseconds of difference. If not specified, (or specified as ), the time + zone of the client is assumed.
    Since Ant 1.7 + Java SimpleDateFormat notation, (e.g. yyyy-MM-dd), the date format + generally used by the FTP server to parse dates. In some cases this will be the only date + format used. In others, (unix for example) this will be used for dates older than a + year old. (See recentDateFormatConfig). When specified as , default value + will be used.
    Since Ant 1.7 + Java SimpleDateFormat notation, (e.g. MMM dd hh:mm) the date format used + by the FTP server to parse dates less than a year old. If not specified (or specified + as ), and if the system type indicated by the systemTypeKey uses a recent + date format, its standard format will be used.
    Since Ant 1.7 - + an index list to speed up classloading. This is a JDK 1.3+ specific feature. + Unless you specify additional jars with nested indexjars + elements, only the contents of this jar will be included in the index. @@ -213,8 +212,8 @@ e.g. decreasing the size by deleting 'same' classes from the versions-branches, @@ -355,10 +354,11 @@ to true.

    Since Ant 1.7.0

    The nested service element specifies a service. Services are described in -the service -provider overview. The approach is to have providers JARs include files named by the service -provided, for example, META-INF/services/javax.script.ScriptEngineFactory which can -include implementation class names, one per line (usually just one per JAR).

    +the service provider overview. The approach is to have providers JARs include files +named by the service provided, for +example, META-INF/services/javax.script.ScriptEngineFactory which can include +implementation class names, one per line (usually just one per JAR).

    The name of the service is set by the type attribute. The classname implementing the service is the the provider attribute, or if one wants to specify a number of classes @@ -464,7 +464,7 @@ embeds all the classes from all the jars in lib/main.

    <include name="build"/> <manifest> <!-- If this is an Applet or Web Start application, include - the proper attributes from https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html --> + the proper attributes from https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html --> <attribute name="Permissions" value="sandbox"/> <attribute name="Codebase" value="example.com"/> <!-- Who is building this jar? --> @@ -521,7 +521,7 @@ JDK 6 scripting interface:

    JEP 238 example: a Multi-Release JAR Files

    Here we want to create a Multi-Release JAR File according the -specification JEP 238. It defines on +specification JEP 238. It defines on top of a JAR the possibility to place additional or overwriting classes in a jar, which are available according to the Java version you run.
    Basically it says, that you have to set the manifest entry Multi-Release: true and place all additional or overwriting classes diff --git a/manual/Tasks/jarlib-available.html b/manual/Tasks/jarlib-available.html index 5efd19652..9122c999f 100644 --- a/manual/Tasks/jarlib-available.html +++ b/manual/Tasks/jarlib-available.html @@ -31,10 +31,10 @@ If the extension is present then a property is set.

    Note that this task works with extensions as defined by the "Optional Package" specification. For more information about optional packages, see the document Optional Package Versioning -in the documentation bundle for your Java Standard Edition package, in file -guide/extensions/versioning.html or the online Extension -and ExtensionSet documentation for further details.

    +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

    Parameters

    The following attributes - require jakarta-commons-net-1.4.0 or - greater.

    + require jakarta-commons-net-1.4.0 or greater.

    Use these options when the standard options don't work, because

    • the server is in a different timezone and you need timestamp dependency checking
    • @@ -259,44 +259,45 @@ connection.

    serverTimeZoneConfig Specify as a - Java TimeZone - identifier, (e.g. GMT, America/Chicago or Asia/Jakarta) the timezone used - by the server for timestamps. This enables timestamp dependency checking even when the server - is in a different time zone from the client. Time Zones know, also, about daylight savings - time, and do not require you to calculate milliseconds of difference. If not specified, (or - specified as ), the time zone of the client is assumed.
    Since Ant 1.7
    No
    defaultDateFormatConfig Specify in - Java SimpleDateFormat - notation, (e.g. yyyy-MM-dd), the date format generally used by the FTP server to parse - dates. In some cases this will be the only date format used. In others, (unix for - example) this will be used for dates older than a year - old. (See recentDateFormatConfig). When specified as , default value will - be used.
    Since Ant 1.7
    No; defaults to default date format for the system type indicated by systemTypeKey
    recentDateFormatConfig Specify in - Java SimpleDateFormat - notation, (e.g. MMM dd hh:mm) the date format used by the FTP server to parse dates - less than a year old. If not specified (or specified as ), and if the system type - indicated by the systemTypeKey uses a recent date format, its standard format will - be used.
    Since Ant 1.7
    No
    serverLanguageCodeConfiga two-letter ISO-639 language - code used to specify the language used by the server to format month names. This only - needs to be specified when the server uses non-numeric abbreviations for months in its date - listings in a language other than English. This appears to be becoming rarer and rarer, as - commonly distributed FTP servers seem increasingly to use English or all-numeric formats. - Languages supported are: + a two-letter + ISO-639 language code used to specify the language used by the server to format month + names. This only needs to be specified when the server uses non-numeric abbreviations for + months in its date listings in a language other than English. This appears to be becoming + rarer and rarer, as commonly distributed FTP servers seem increasingly to use English or + all-numeric formats. Languages supported are:
    • en—English
    • fr—French
    • diff --git a/manual/Tasks/import.html b/manual/Tasks/import.html index c01b1bddb..ebdd394c2 100644 --- a/manual/Tasks/import.html +++ b/manual/Tasks/import.html @@ -34,9 +34,9 @@ Ant to use a ProjectHelper other than Ant's default, this task may or may not work.

      In the common use case where only Ant's default project helper is used, it basically works like - the Entity Includes as explained in - the Ant FAQ, as if the imported file was contained in the importing file, minus the - top <project> tag.

      + the Entity Includes + as explained in the Ant FAQ, as if the imported file was contained in the importing file, + minus the top <project> tag.

      The import task may only be used as a top-level task. This means that it may not be used in a target.

      diff --git a/manual/Tasks/include.html b/manual/Tasks/include.html index 100ce18be..620e71ed5 100644 --- a/manual/Tasks/include.html +++ b/manual/Tasks/include.html @@ -32,8 +32,8 @@

      On execution it will read another Ant file into the same project rewriting the included target names and depends lists. This is different - from Entity Includes as explained - in the Ant FAQ insofar as the target names get prefixed by the included + from Entity Includes + as explained in the Ant FAQ insofar as the target names get prefixed by the included project's name or as attribute and do not appear as if the file was contained in the including file.

      diff --git a/manual/Tasks/jar.html b/manual/Tasks/jar.html index 1664bbc60..4df78e45b 100644 --- a/manual/Tasks/jar.html +++ b/manual/Tasks/jar.html @@ -71,15 +71,14 @@ a zipfileset in a Zip task. The one difference is that the manifest attribute is not specified, the Jar task will include an empty one for you.)

      -

      Manifests are processed by the Jar task according to the Jar file -specification. Note in particular that this may result in manifest lines greater than 72 bytes -being wrapped and continued on the next line.

      +

      Manifests are processed by the Jar task according to +the Jar +file specification. Note in particular that this may result in manifest lines greater than 72 +bytes being wrapped and continued on the next line.

      The Jar task checks whether you specified package information according to -the -versioning specification.

      +the versioning specification.

      Please note that the ZIP format allows multiple files of the same fully-qualified name to exist within a single archive. This has been documented as causing various problems for unsuspecting @@ -89,7 +88,7 @@ other than its default, add.

      To cryptographically sign your JAR file, use the SignJar task on the JAR that you create from this task.

      -

      For creating a simple version of a JEP +

      For creating a simple version of a JEP 238 multi-release jar, you don't need any special tools. Just set the required manifest entry and place the files where required, as you could see in the JEP 238 example. If you want to tune this kind of jar, @@ -202,10 +201,10 @@ e.g. decreasing the size by deleting 'same' classes from the versions-branches,

    index whether to create - an index - list to speed up classloading. This is a JDK 1.3+ specific feature. Unless you specify - additional jars with nested indexjars elements, only the - contents of this jar will be included in the index. No; defaults to false
    whether to include META-INF and its children in the index. Doesn't have any effect if index is false.
    Sun's jar implementation used to skip the META-INF directory and Ant followed that example. The behavior has been - changed with Java 5. In order - to avoid problems with Ant generated jars on Java 1.4 or earlier Ant will not + changed with Java + 5. In order to avoid problems with Ant generated jars on Java 1.4 or earlier Ant will not include META-INF unless explicitly asked to. Since Ant 1.8.0
    No; defaults to false
    @@ -121,3 +121,4 @@ extension in.

    + diff --git a/manual/Tasks/jarlib-display.html b/manual/Tasks/jarlib-display.html index 2da3ba583..c5ee3a4ba 100644 --- a/manual/Tasks/jarlib-display.html +++ b/manual/Tasks/jarlib-display.html @@ -31,10 +31,10 @@ specified jars.

    Note that this task works with extensions as defined by the "Optional Package" specification. For more information about optional packages, see the document Optional Package Versioning -in the documentation bundle for your Java Standard Edition package, in file -guide/extensions/versioning.html or the online Extension -and ExtensionSet documentation for further details.

    +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

    Parameters

    diff --git a/manual/Tasks/jarlib-manifest.html b/manual/Tasks/jarlib-manifest.html index 7811784f0..490d20449 100644 --- a/manual/Tasks/jarlib-manifest.html +++ b/manual/Tasks/jarlib-manifest.html @@ -32,10 +32,10 @@ specifications in the manifests of the jars.

    Note that this task works with extensions as defined by the "Optional Package" specification. For more information about optional packages, see the document Optional Package Versioning -in the documentation bundle for your Java Standard Edition package, in file -guide/extensions/versioning.html or the online Extension -and ExtensionSet documentation for further details.

    +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

    Parameters

    diff --git a/manual/Tasks/jarlib-resolve.html b/manual/Tasks/jarlib-resolve.html index 6cf3e192b..0c2cf65fc 100644 --- a/manual/Tasks/jarlib-resolve.html +++ b/manual/Tasks/jarlib-resolve.html @@ -34,10 +34,10 @@ thrown.

    Note that this task works with extensions as defined by the "Optional Package" specification. For more information about optional packages, see the document Optional Package Versioning -in the documentation bundle for your Java Standard Edition package, in file -guide/extensions/versioning.html or the online Extension -and ExtensionSet documentation for further details.

    +in the documentation bundle for your Java Standard Edition package, in +file guide/extensions/versioning.html or the +online Extension and ExtensionSet documentation for further details.

    Parameters

    diff --git a/manual/Tasks/java.html b/manual/Tasks/java.html index 46459c3c6..ac1829f24 100644 --- a/manual/Tasks/java.html +++ b/manual/Tasks/java.html @@ -311,8 +311,8 @@ project, not the directory in which the Java task is run. If you need t relative to the directory the task will be run in, you need to explicitly create the full path to the JAR file.

    When using the jar attribute, all classpath settings are ignored according -to Oracle's -specification. +to Oracle's specification.

    Examples

    diff --git a/manual/Tasks/javac.html b/manual/Tasks/javac.html
    index 7a8764256..951937b6e 100644
    --- a/manual/Tasks/javac.html
    +++ b/manual/Tasks/javac.html
    @@ -69,7 +69,7 @@ for either the build.compiler property or the compiler a
         (the kopi compiler).
       
  • gcj (the gcj compiler - from GCC).
  • + from GCC).
  • sj (Symantec Java compiler) – symantec can be used as an alias.
  • extJavac (run either modern or classic in a JVM of its own).
  • @@ -309,8 +309,9 @@ file will not get compiled even if a native header file generated for it would b magic ant.build.javac.target property is set
    Note that the default value depends on JDK that is running Ant and on source - (see Cross-Compilation - Options). We highly recommend to always specify this attribute. + (see Cross-Compilation Options). We highly recommend to always specify this + attribute.
    @@ -345,9 +346,10 @@ file will not get compiled even if a native header file generated for it would b compiler for doing unnecessary work. However, for some edge cases, involving generics, the javac compiler needs to compile the dependent classes to get the generics information. One example is documented in the bug - report: Bug 40776 - a - problem compiling a Java 5 project with generics. Setting the attribute to false - will cause the compiler to recompile dependent classes. Since Ant 1.7.1. + report: Bug + 40776 - a problem compiling a Java 5 project with generics. Setting the attribute + to false will cause the compiler to recompile dependent classes. Since Ant + 1.7.1. @@ -578,8 +580,8 @@ certain packages below a common root, use the include/exclude<include>/<exclude> nested elements to filter for these packages. Do not include part of your package structure in the srcdir attribute (or nested <src> elements), or Ant will recompile your source files every time you -run your compile target. See the Ant -FAQ for additional information.

    +run your compile target. See the Ant FAQ for additional information.

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

    @@ -734,9 +736,9 @@ references to strings that can by used in an OS independent fashion </javac>

    OpenJDK notes

    -

    The openjdk project has provided -the javac compiler as an open -source project. The output of this project is a javac.jar which contains +

    The OpenJDK project has provided +the javac compiler +as an open source project. The output of this project is a javac.jar which contains the javac compiler. This compiler may be used with the <javac> task with the use of a -Xbootclasspath/p Java argument. The argument needs to be given to the runtime system of the javac executable, so it needs to be prepended with diff --git a/manual/Tasks/javadoc.html b/manual/Tasks/javadoc.html index 3a2184d3b..829faecea 100644 --- a/manual/Tasks/javadoc.html +++ b/manual/Tasks/javadoc.html @@ -57,7 +57,7 @@ attribute it is up to you to ensure that this command supports the attributes yo

    Note: When generating the JavaDocs for classes which contains annotations you maybe get a java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl. This is -due bug-6442982. The +due bug-6442982. The cause is that JavaDoc cannot find the implementations of used annotations. The workaround is providing the jars with these implementations (like JAXBs @XmlType, ...) to <javadoc> using classpath, classpathref attributes or @@ -493,8 +493,8 @@ with the exclude patterns of the packageset (and vice ve CVE-2013-1571. Since Ant 1.9.2
    There is a frame injection attack possible in javadocs generated by Oracle JDKs prior to Java 7 update 25 (details). When this flag is set to true, Ant will check whether - the docs are vulnerable and will try to fix them. + target="_top">details). When this flag is set to true, Ant will check whether the + docs are vulnerable and will try to fix them.

    @@ -678,12 +678,12 @@ task.

    doclet

    The doclet nested element is used to specify -the doclet -that javadoc will use to process the input source files. A number of the -standard javadoc arguments are actually arguments of the standard doclet. If these are -specified in the javadoc task's attributes, they will be passed to the doclet specified -in the <doclet> nested element. Such attributes should only be specified, -therefore, if they can be interpreted by the doclet in use.

    +the doclet that javadoc will use to process the input source files. A +number of the standard javadoc arguments are actually arguments of the standard +doclet. If these are specified in the javadoc task's attributes, they will be passed to +the doclet specified in the <doclet> nested element. Such attributes should only +be specified, therefore, if they can be interpreted by the doclet in use.

    If the doclet requires additional parameters, these can be specified with <param> elements within the <doclet> element. These @@ -742,8 +742,8 @@ those tags.

    compiler No; default is true
    1.4 No; defaults to true
    If this attribute is specified, this element will behave as an implicit fileset. The files included by this fileset should contain each tag definition on a separate line, as described in - the Javadoc - reference guide: + the Javadoc reference guide:
    ejb.bean:t:XDoclet EJB Tag
     todo:a:To Do
    Note: The Javadoc reference quide has double quotes around the description @@ -757,9 +757,10 @@ todo:a:To Do

    taglet

    The taglet nested element is used to specify -custom taglets +custom taglets beyond the default taglets.

    +target="_top">the default taglets.

    Parameters
    @@ -771,7 +772,8 @@ target="_blank">the default taglets.

    + (e.g. com.sun.tools.doclets.ToDoTaglet) diff --git a/manual/Tasks/javah.html b/manual/Tasks/javah.html index cc0815f39..ec767ddd6 100644 --- a/manual/Tasks/javah.html +++ b/manual/Tasks/javah.html @@ -29,10 +29,10 @@

    Generates JNI headers from a Java class.

    When this task executes, it will generate the C header and source files that are needed to implement native methods. JNI operates differently depending on -whether JDK -1.2+ -or pre-1.2 -JDK systems are used.

    +whether JDK 1.2+ +or pre-1.2 JDK systems are used.

    If you are building with Java 8 or above consider using javac's nativeheaderdir attribute instead @@ -47,7 +47,8 @@ attribute:

    • default—the default compiler for the platform.
    • sun—the standard compiler of the JDK.
    • -
    • kaffeh—the native standard compiler of Kaffe.
    • +
    • kaffeh—the native standard compiler of Kaffe.
    • gcjh—the native standard compiler of gcj and gij. Since Apache Ant 1.8.2
    • diff --git a/manual/Tasks/jdepend.html b/manual/Tasks/jdepend.html index 2263689d9..627333204 100644 --- a/manual/Tasks/jdepend.html +++ b/manual/Tasks/jdepend.html @@ -27,7 +27,8 @@

      Description

      -

      Invokes the JDepend parser.

      +

      Invokes the JDepend +parser.

      This parser "traverses a set of Java source file directories and generates design quality metrics for each Java package". It allows to "automatically measure the quality of a diff --git a/manual/Tasks/jjdoc.html b/manual/Tasks/jjdoc.html index c61e892f7..a202ea836 100644 --- a/manual/Tasks/jjdoc.html +++ b/manual/Tasks/jjdoc.html @@ -26,9 +26,9 @@

      Since Apache Ant 1.6

      Description

      -

      Invokes the JJDoc preprocessor for the JavaCC compiler -compiler. It takes a JavaCC parser specification and produces documentation for the BNF grammar. It -can operate in three modes, determined by command line options. +

      Invokes the JJDoc preprocessor for the JavaCC +compiler compiler. It takes a JavaCC parser specification and produces documentation for the BNF +grammar. It can operate in three modes, determined by command line options.

      To use the jjdoc task, set the target attribute to the name of the JavaCC grammar file to process. You also need to specify the directory containing the JavaCC installation using the javacchome attribute, so that Ant can find the JavaCC classes. Optionally, you diff --git a/manual/Tasks/jjtree.html b/manual/Tasks/jjtree.html index 9e691deef..5ef0f3935 100644 --- a/manual/Tasks/jjtree.html +++ b/manual/Tasks/jjtree.html @@ -25,9 +25,9 @@

      JJTree

      Description

      -

      Invokes the JJTree preprocessor for the JavaCC compiler -compiler. It inserts parse tree building actions at various places in the JavaCC source that it -generates. The output of JJTree is run through JavaCC to create the parser.

      +

      Invokes the JJTree preprocessor for the JavaCC +compiler compiler. It inserts parse tree building actions at various places in the JavaCC source +that it generates. The output of JJTree is run through JavaCC to create the parser.

      To use the jjtree task, set the target attribute to the name of the JJTree grammar file to process. You also need to specify the directory containing the JavaCC installation using the javacchome attribute, so that Ant can find the JavaCC diff --git a/manual/Tasks/jspc.html b/manual/Tasks/jspc.html index 02acd3d8f..6b68a24b6 100644 --- a/manual/Tasks/jspc.html +++ b/manual/Tasks/jspc.html @@ -31,9 +31,10 @@ the task shipping with Tomcat instead. This task is only tested against To known problems with Tomcat 5.x that won't get fixed in Ant, please use Tomcat's jspc task instead.
      Instead of relying on container-specific JSP compilers we suggest deploying the raw files (*.jsp) and use the container build-in functions: after deploying run a test -suite (e.g. with Cactus -or HttpUnit) against the deployed web application. So -you'll get the test result and the compiled JSPs.

      +suite (e.g. with Cactus or HttpUnit) +against the deployed web application. So you'll get the test result and the compiled +JSPs.

      Description

      Apache Ant task to run the JSP compiler and turn JSP pages into Java source files.

      @@ -47,8 +48,8 @@ dependencies, or <jsp:include> references.

      By default the task uses the Jasper JSP compiler. This means the task needs jasper.jar and jasper-runtime.jar, which come with builds of Tomcat -4/Catalina from the Apache Tomcat project, and any other -jar files which may be needed in future versions (it changes).

      +4/Catalina from the Apache Tomcat project, +and any other jar files which may be needed in future versions (it changes).

      We recommend (in March 2003) Tomcat version 4.1.x for the most robust version of Jasper.

      diff --git a/manual/Tasks/junit.html b/manual/Tasks/junit.html index 13828160f..e2e7a96cb 100644 --- a/manual/Tasks/junit.html +++ b/manual/Tasks/junit.html @@ -25,9 +25,10 @@

      Description

      This task runs tests from the JUnit testing framework. The latest version of the framework can be -found at https://junit.org. This task has been tested with JUnit -3.0 up to JUnit 3.8.2; it won't work with versions prior to JUnit 3.0. It also works with JUnit 4.x, -including "pure" JUnit 4 tests using only annotations and no JUnit4TestAdapter.

      +found at https://junit.org. This task has been tested +with JUnit 3.0 up to JUnit 3.8.2; it won't work with versions prior to JUnit 3.0. It also works with +JUnit 4.x, including "pure" JUnit 4 tests using only annotations and +no JUnit4TestAdapter.

      Note: This task depends on external libraries not included in the Apache Ant distribution. See Library Dependencies for more information.

      diff --git a/manual/Tasks/junitreport.html b/manual/Tasks/junitreport.html index 6f4b79e66..c81c2cf69 100644 --- a/manual/Tasks/junitreport.html +++ b/manual/Tasks/junitreport.html @@ -34,10 +34,10 @@ information.

      Requirements

      -

      The task needs Apache Xalan 2.4.1+ or Xalan XSLTC -(JDK 1.4 contains a version of Xalan 2.x, while JDK 1.5 ships with a version of XSLTC). JDK 1.4.2-01 -and later ships with a bundled Xalan 2.4.1+, meaning that JDKs prior to version 1.4.2-01 won't work -out of the box. The table below summarize the compatibility status.

      +

      The task needs Apache Xalan 2.4.1+ or +Xalan XSLTC (JDK 1.4 contains a version of Xalan 2.x, while JDK 1.5 ships with a version of +XSLTC). JDK 1.4.2-01 and later ships with a bundled Xalan 2.4.1+, meaning that JDKs prior to version +1.4.2-01 won't work out of the box. The table below summarize the compatibility status.

    name The name of the taglet class - (e.g. com.sun.tools.doclets.ToDoTaglet) Yes
    diff --git a/manual/Tasks/loadfile.html b/manual/Tasks/loadfile.html index 87d2c2c9a..4a251aebd 100644 --- a/manual/Tasks/loadfile.html +++ b/manual/Tasks/loadfile.html @@ -68,7 +68,7 @@ is not set.

    XalanSun JDK BundleStatus
    2.4.1+JDK 1.4.2-01+OK
    -

    The LoadFile task supports nested FilterChains.

    +

    The LoadFile task supports nested FilterChains.

    Examples

    diff --git a/manual/Tasks/loadresource.html b/manual/Tasks/loadresource.html
    index 2c8efa740..af8624809 100644
    --- a/manual/Tasks/loadresource.html
    +++ b/manual/Tasks/loadresource.html
    @@ -67,7 +67,7 @@ the property is not set.

    No; default is false
    -

    The LoadResource task supports nested FilterChains.

    +

    The LoadResource task supports nested FilterChains.

    Examples

    diff --git a/manual/Tasks/macrodef.html b/manual/Tasks/macrodef.html
    index bfdd851ae..ffde288b4 100644
    --- a/manual/Tasks/macrodef.html
    +++ b/manual/Tasks/macrodef.html
    @@ -107,9 +107,8 @@
           
             doubleexpanding
             Controls whether or not property references in the attribute are expanded twice or just
    -          once.  See
    -          the FAQ for
    -          details.  Since Ant 1.8.3
    +          once.  See the FAQ for details.  Since Ant 1.8.3
             No; default is true
           
         
    @@ -205,7 +204,8 @@
         

    The following fragment defines a task called <call-cc> which take the attributes target, link and target.dir and the nested element cc-elements. The body of the task uses the <cc> task - from the ant-contrib project.

    + from the ant-contrib + project.

     <macrodef name="call-cc">
         <attribute name="target"/>
    diff --git a/manual/Tasks/mail.html b/manual/Tasks/mail.html
    index 6c2c8318e..d09600479 100644
    --- a/manual/Tasks/mail.html
    +++ b/manual/Tasks/mail.html
    @@ -84,8 +84,8 @@ more information.

    messagefileinputencoding Specifies the encoding of the input file. Please - see Supported - Encodings for a list of possible values. Since Ant 1.9.4 + see Supported Encodings for a list of possible values. Since Ant 1.9.4 No; defaults to default JVM character encoding @@ -237,8 +237,8 @@ can contain email addresses of the form:

    inputencoding Specifies the encoding of the input file. Please - see Supported - Encodings for a list of possible values. Since Ant 1.9.4 + see Supported Encodings for a list of possible values. Since Ant 1.9.4 No; defaults to default JVM character encoding diff --git a/manual/Tasks/manifest.html b/manual/Tasks/manifest.html index 1c8a2053d..e11d306f3 100644 --- a/manual/Tasks/manifest.html +++ b/manual/Tasks/manifest.html @@ -32,8 +32,8 @@ file.

    Manifests are processed according to -the Jar file -specification. Specifically, a manifest element consists of a set of attributes and +the Jar +file specification. Specifically, a manifest element consists of a set of attributes and sections. These sections in turn may contain attributes. Note in particular that this may result in manifest lines greater than 72 bytes being wrapped and continued on the next line.

    @@ -151,8 +151,8 @@ sections.

    attribute will take the value of the Ant property ${user.name}. The same is true for the ${version} and ${TODAY} properties. This example produces a MANIFEST.MF that -contains package -version identification for the package common.

    +contains package version identification for the package common.

    The manifest produced by the above would look like this:

    diff --git a/manual/Tasks/mimemail.html b/manual/Tasks/mimemail.html index 9554d0080..f55863a8c 100644 --- a/manual/Tasks/mimemail.html +++ b/manual/Tasks/mimemail.html @@ -31,9 +31,10 @@

    Description

    Sends SMTP mail with MIME -attachments. JavaMail -and Java Activation -Framework are required for this task.

    +attachments. JavaMail +and Java +Activation Framework are required for this task.

    Multiple files can be attached using FileSets.

    Parameters

    diff --git a/manual/Tasks/parallel.html b/manual/Tasks/parallel.html index 82cbe8e26..b84cb1274 100644 --- a/manual/Tasks/parallel.html +++ b/manual/Tasks/parallel.html @@ -99,7 +99,7 @@ complete without waiting for other nested tasks to complete in other threads.

    parallel task will also fail.

    -

    The parallel task may be combined with the sequential +

    The parallel task may be combined with the sequential task to define sequences of tasks to be executed on each thread within the parallel block

    The threadCount attribute can be used to place a maximum number of available threads diff --git a/manual/Tasks/pathconvert.html b/manual/Tasks/pathconvert.html index 40b404514..b6478fe71 100644 --- a/manual/Tasks/pathconvert.html +++ b/manual/Tasks/pathconvert.html @@ -118,7 +118,7 @@ any from values are prefixes of other from values.

    If the refid attribute is not specified, then one or more nested resource collections must be supplied.

    mapper

    -

    A single nested <mapper> element can be +

    A single nested <mapper> element can be specified to perform any of various filename transformations (since Ant 1.6.2).

    Examples

    diff --git a/manual/Tasks/property.html b/manual/Tasks/property.html index 6a74890f5..0dcc263f6 100644 --- a/manual/Tasks/property.html +++ b/manual/Tasks/property.html @@ -58,8 +58,8 @@ from a property file.

    A list of predefined properties can be found here.

    Since Apache Ant 1.8.0, it is possible to load properties defined in XML according -to Sun DTD, when running on Java 5+. For this -the name of the file, resource or url has to end with .xml.

    +to Sun DTD, when running on Java +5+. For this the name of the file, resource or url has to end with .xml.

    Parameters

    @@ -166,8 +166,8 @@ local definition is available (the table priority order being PROCESS, JOB, GROU

    Since Ant 1.8.2, if Ant detects it is running on a Java 5 or newer, Ant will use System.getenv() rather than its own OS dependent native implementation. For some OSes this causes minor differences when compared to older versions of Ant. For a full list -see Bugzilla Issue 49366. In -particular:

    +see Bugzilla Issue +49366. In particular:

    diff --git a/manual/Tasks/pvcstask.html b/manual/Tasks/pvcstask.html index 84db7d063..fb45b360a 100644 --- a/manual/Tasks/pvcstask.html +++ b/manual/Tasks/pvcstask.html @@ -54,7 +54,7 @@ an updateonly argument introduced.

    Introduction

    The pvcs task allows the user of Ant to extract the latest edition of the source code from a PVCS repository. PVCS is a version control system developed -by Merant.

    +by Merant.

    This version has been tested against PVCS version 6.5 and 6.6 under Windows and Solaris.


    diff --git a/manual/Tasks/rmic.html b/manual/Tasks/rmic.html index 151653800..8e82cc31f 100644 --- a/manual/Tasks/rmic.html +++ b/manual/Tasks/rmic.html @@ -66,16 +66,16 @@ are the choices:

    platform is chosen. If build.rmic is set to this, you get the default. -

    The miniRMI -project contains a compiler implementation for this task as well, please consult miniRMI's -documentation to learn how to use it.

    +

    The miniRMI project contains a compiler implementation for this task as well, please +consult miniRMI's documentation to learn how to use it.

    CORBA support

    -

    Java 11 removes the CORBA and JavaEE packages and rmic no longer supports -either iiop nor idl. Starting with Ant 1.10.3, the rmic task -will fail when using either while running Java 11+ unless you fork the task and explicitly specify an -executable.

    +

    Java 11 removes the Java EE and +CORBA packages and rmic no longer supports either iiop +or idl. Starting with Ant 1.10.3, the rmic task will fail when using +either while running Java 11+ unless you fork the task and explicitly specify an executable.

    Parameters

    diff --git a/manual/Tasks/schemavalidate.html b/manual/Tasks/schemavalidate.html index 628dc14cc..8b1964d76 100644 --- a/manual/Tasks/schemavalidate.html +++ b/manual/Tasks/schemavalidate.html @@ -49,12 +49,13 @@ their URL equivalents.

  • <dtd> elements which are used to resolve DTDs and entities.
  • <attribute> elements which are used to set features on the parser. These can be any number - of http://xml.org/sax/features/ - or other features that your parser may support.
  • + of http://xml.org/sax/features/ or other features that your parser + may support.
  • <property> elements, containing string properties
  • -

    The task only supports SAX2 or later parsers: it is an error to specify a esSAX1 parser.

    +

    The task only supports SAX2 or later parsers: it is an error to specify a SAX1 parser.

    Parameters

    @@ -168,10 +169,10 @@ their URL equivalents.

    perform entity resolution.

    attribute

    The <attribute> element is used to set parser features.
    Features usable -with the xerces parser are defined -here: Setting features
    SAX features -are defined -here: http://xml.org/sax/features/

    +with the xerces parser are defined here: Setting features
    SAX features are defined +here: http://xml.org/sax/features/

    @@ -193,8 +194,8 @@ here: XML Parser properties -Properties can be used to set the schema used to validate the XML file. +implementation: XML Parser +properties. Properties can be used to set the schema used to validate the XML file.

    Attribute
    @@ -237,7 +238,7 @@ is why the noNamespaceFile is needed.

    documents against the relevant specifications. To validate XSD documents, you also need XMLSchema.dtd and datatypes.dtd in the same directory as XMLSchema.xsd, or pointed to via the catalog. All these files can be fetched -from W3C.

    +from W3C.

    <validate-soap file="xml/test.xsd"/>

    Use the preset task defined above to validate an XML Schema document.

    diff --git a/manual/Tasks/script.html b/manual/Tasks/script.html index 3c48c55e7..a53870f1c 100644 --- a/manual/Tasks/script.html +++ b/manual/Tasks/script.html @@ -27,8 +27,8 @@

    Script

    Description

    Execute a script in a Apache BSF -or JSR -223 supported language. +or JSR 223 supported language.

    Note: This task depends on external libraries not included in the Apache Ant distribution. See Library Dependencies for more @@ -46,15 +46,16 @@ Java API, see the JavaDoc (especially for Project and Script) for more information.

    -

    If you are using JavaScript under BSF, a good resource is https://www.mozilla.org/rhino/doc.html as we are -using their JavaScript interpreter.

    +

    If you are using JavaScript under BSF, a good resource +is https://www.mozilla.org/rhino/doc.html as we are using their JavaScript +interpreter.

    Scripts can do almost anything a task written in Java could do.

    Rhino provides a special construct—the JavaAdapter. With that you can create an object which implements several interfaces, extends classes and for which you can overwrite methods. Because this is an undocumented feature (yet), here is the link to an -explanation: Google -Groups: "Rhino, enum.js, JavaAdapter?" by Norris Boyd in the +explanation: Google Groups: "Rhino, enum.js, JavaAdapter?" by Norris Boyd in the newsgroup netscape.public.mozilla.jseng.

    If you are creating Targets programmatically, make sure you set the Location to a useful value. @@ -273,9 +274,9 @@ with importClass(Packages.org.apache.tools.ant.util.FileU The <script> task populates the Project instance under the name project, so we can use that reference. Another way is to use its given name or getting its reference from the task itself.
    The Project provides methods for accessing and -setting properties, creating DataTypes and Tasks and much more.
    After creating a FileSet object -we initialize that by calling its set-methods. Then we can use that object like a normal Ant task -(<copy> for example).
    For getting the size of a file we instantiate +setting properties, creating DataTypes and Tasks and much more.
    After creating a FileSet +object we initialize that by calling its set-methods. Then we can use that object like a normal Ant +task (<copy> for example).
    For getting the size of a file we instantiate a java.io.File. So we are using normal Java API here.
    Finally we use the <echo> task for producing the output. The task is not executed by its execute() method, because the perform() method (implemented in Task @@ -312,8 +313,8 @@ paths to a referenced path. If the path does not exist, it will be created.

    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:

    +ant-contrib's <for> task) follows:

     <path id="main.path">
       <fileset dir="build/classes"/>
    diff --git a/manual/Tasks/scriptdef.html b/manual/Tasks/scriptdef.html
    index 0029ee960..8b497ffa8 100644
    --- a/manual/Tasks/scriptdef.html
    +++ b/manual/Tasks/scriptdef.html
    @@ -28,14 +28,13 @@
     

    Description

    Scriptdef can be used to define an Apache Ant task using a scripting language. Ant scripting languages supported by Apache -BSF -or JSR -223 may be used to define the script. Scriptdef provides a mechanism to encapsulate -control logic from a build within an Ant task minimizing the need for providing control style tasks -in Ant itself. Complex logic can be made available while retaining the simple structure of an Ant -build file. Scriptdef is also useful for prototyping new custom tasks. Certainly as the -complexity of the script increases it would be better to migrate the task definition into a Java -based custom task.

    +BSF or JSR 223 may be used to define the script. Scriptdef provides a +mechanism to encapsulate control logic from a build within an Ant task minimizing the need for +providing control style tasks in Ant itself. Complex logic can be made available while retaining the +simple structure of an Ant build file. Scriptdef is also useful for prototyping new +custom tasks. Certainly as the complexity of the script increases it would be better to migrate the +task definition into a Java based custom task.

    Note: This task depends on external libraries not included in the Ant distribution. See Library Dependencies for more @@ -282,9 +281,9 @@ beanshell jar.

    Testing scripts

    -

    The easiest way to test scripts is to use -the AntUnit Ant library. This will run all -targets in a script that begin with test (and their dependencies).

    +

    The easiest way to test scripts is to use the AntUnit Ant library. This will run all targets in a script that begin +with test (and their dependencies).

    diff --git a/manual/Tasks/setpermissions.html b/manual/Tasks/setpermissions.html index b9c6a1beb..74c099eff 100644 --- a/manual/Tasks/setpermissions.html +++ b/manual/Tasks/setpermissions.html @@ -49,8 +49,8 @@ different sets of permissions to apply to either type of resource.

    + of PosixFilePermission values. diff --git a/manual/Tasks/signjar.html b/manual/Tasks/signjar.html index d4d3c5c88..2dde1244b 100644 --- a/manual/Tasks/signjar.html +++ b/manual/Tasks/signjar.html @@ -27,12 +27,13 @@

    SignJar

    Description

    Signing a jar allows users to authenticate the publisher.

    -

    Signs JAR files with the jarsigner -command line tool. It will take a named file in the jar attribute, and an -optional destDir or signedJar attribute. Nested paths are also supported; here -only an (optional) destDir is allowed. If a destination directory or explicit JAR file -name is not provided, JARs are signed in place.

    +

    Signs JAR files with +the jarsigner command line tool. It will take a named file in +the jar attribute, and an optional destDir or signedJar +attribute. Nested paths are also supported; here only an (optional) destDir is +allowed. If a destination directory or explicit JAR file name is not provided, JARs are signed in +place.

    Dependency rules

    • Nonexistent destination JARs are created/signed
    • @@ -207,9 +208,9 @@ name is not provided, JARs are signed in place.

    permissions The permissions to set as comma separated list of names - of PosixFilePermission - values.No

    Examples

    -

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

    +

    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"/>
    diff --git a/manual/Tasks/sos.html b/manual/Tasks/sos.html index 9b40ded5c..4d242a3ea 100644 --- a/manual/Tasks/sos.html +++ b/manual/Tasks/sos.html @@ -40,8 +40,8 @@

    These tasks provide an interface to the Microsoft Visual SourceSafe SCM -via SourceGear's SourceOffSite +target="_top">Microsoft Visual SourceSafe SCM via SourceGear's SourceOffSite product. SourceOffSite is an add-on to Microsoft's VSS, that allows remote development teams and tele-commuters that need fast and secure read/write access to a centralized SourceSafe database via any TCP/IP connection. SOS provides Linux, Solaris & Windows diff --git a/manual/Tasks/sql.html b/manual/Tasks/sql.html index 22c94b211..764eaea81 100644 --- a/manual/Tasks/sql.html +++ b/manual/Tasks/sql.html @@ -173,8 +173,8 @@ disabled with -noproxy option.

    escapeprocessing Control whether the Java statement object will perform escape substitution.
    - See Statement's - API docs for details. Since Ant 1.6. + See Statement's API docs for details. Since Ant 1.6. No; defaults to true diff --git a/manual/Tasks/style.html b/manual/Tasks/style.html index 267d52497..f8de21a87 100644 --- a/manual/Tasks/style.html +++ b/manual/Tasks/style.html @@ -319,7 +319,7 @@ for primitive types).

    outputproperty (trax processors only)

    Used to specify how you wish the result tree to be output as specified in -the XSLT specifications. +the XSLT specifications.

    Parameters
    diff --git a/manual/Tasks/tar.html b/manual/Tasks/tar.html index 8a7cf268f..98518ce62 100644 --- a/manual/Tasks/tar.html +++ b/manual/Tasks/tar.html @@ -131,8 +131,8 @@ to gzip, bzip2, or xz.

    encoding The character encoding to use for filenames inside the tar file. For a list of possible values see - the Supported - Encodings.
    Since Ant 1.9.5 + the Supported Encodings.
    Since Ant 1.9.5
    No; defaults to default JVM character encoding
    diff --git a/manual/Tasks/touch.html b/manual/Tasks/touch.html index 08c76c0c5..d4ed96bf3 100644 --- a/manual/Tasks/touch.html +++ b/manual/Tasks/touch.html @@ -98,7 +98,7 @@ a type selector to suppress this. This only applies to filesets nest directly, not to filesets nested into a path or any other resource collection.

    mapper

    -

    Since Ant 1.6.3, a nested mapper can be specified. +

    Since Ant 1.6.3, a nested mapper can be specified. Files specified via nested filesets, filelists, or the file attribute are mapped using the specified mapper. For each file mapped, the resulting files are touched. If no time has been specified and the original file exists its timestamp will be used. If diff --git a/manual/Tasks/tstamp.html b/manual/Tasks/tstamp.html index e2086d102..ad175d3b9 100644 --- a/manual/Tasks/tstamp.html +++ b/manual/Tasks/tstamp.html @@ -59,12 +59,11 @@ ignored.

    Parameters specified as nested elements

    -

    The task supports a <format> nested element that allows a -property to be set to the current date and time in a given format. The date/time patterns are as -defined in the -Java SimpleDateFormat -class. The format element also allows offsets to be applied to the time to generate different time -values.

    +

    The task supports a <format> nested element that allows a property to be set +to the current date and time in a given format. The date/time patterns are as defined in the +Java SimpleDateFormat class. The format element also allows offsets to be applied to +the time to generate different time values.

    @@ -85,8 +84,8 @@ values.

    + Java TimeZone class. @@ -115,8 +114,8 @@ values.

    + the Locale class.
    Attribute
    timezone The timezone to use for displaying time. The values are as defined by the - Java TimeZone - class. No
    The locale used to create date/time string. The general form is language[, country[, variant]] (either variant or both variant and country may be omitted). For more information please refer to documentation for - the Locale - class. No
    diff --git a/manual/Tasks/typedef.html b/manual/Tasks/typedef.html index a756cc051..39084472c 100644 --- a/manual/Tasks/typedef.html +++ b/manual/Tasks/typedef.html @@ -45,17 +45,18 @@ attributes point to files in the format of Java property files or an xml format.

    If you are defining tasks or types that share the same classpath with multiple taskdef or typedef tasks, the corresponding classes will be loaded by different -Java ClassLoaders. -Two classes with the same name loaded via different ClassLoaders are not the same class from the -point of view of JVM, they don't share static variables and instances of these classes can't access -private methods or attributes of instances defined by "the other class" of the same name. They -don't even belong to the same Java package and can't access package private code, either.

    +Java ClassLoaders. Two classes with the same name loaded via different ClassLoaders +are not the same class from the point of view of JVM, they don't share static variables and +instances of these classes can't access private methods or attributes of instances defined by "the +other class" of the same name. They don't even belong to the same Java package and can't access +package private code, either.

    The best way to load several tasks/types that are supposed to cooperate with each other via shared Java code is to use the resource attribute and an antlib descriptor. If this is not possible, the second best option is to use the loaderref attribute and -specify the same name for each and every typedef/taskdef -- this way the -classes will share the same ClassLoader. Note that +specify the same name for each and every typedef/taskdef—this way +the classes will share the same ClassLoader. Note that the typedef/taskdef tasks must use identical classpath definitions (this includes the order of path components) for the loaderref attribute to work.

    diff --git a/manual/Tasks/unzip.html b/manual/Tasks/unzip.html index 33061277f..d62436610 100644 --- a/manual/Tasks/unzip.html +++ b/manual/Tasks/unzip.html @@ -90,10 +90,10 @@ extract an Ant generated ZIP archive.

    encoding The character encoding that has been used for filenames inside the zip file. For a list of possible values see - the Supported - Encodings.
    Use the magic value native-encoding for default JVM character - encoding.
    See also the discussion in the zip task - page + the Supported Encodings.
    Use the magic value native-encoding for + default JVM character encoding.
    See also the discussion in + the zip task page No; defaults to UTF8 for unzip and default JVM character encoding for untar task diff --git a/manual/Tasks/xmlvalidate.html b/manual/Tasks/xmlvalidate.html index 236401fcb..fe3572b26 100644 --- a/manual/Tasks/xmlvalidate.html +++ b/manual/Tasks/xmlvalidate.html @@ -36,8 +36,9 @@ one can specify any SAX1/2 parser if needed.

  • <dtd> elements which are used to resolve DTDs and entities
  • <attribute> elements which are used to set features on the parser. These can be any number - of http://xml.org/sax/features/ - or other features that your parser may support.
  • + of http://xml.org/sax/features/ or other features that your parser + may support.
  • <property> elements, containing string properties
  • @@ -117,9 +118,10 @@ perform entity resolution.

    attribute

    The <attribute> element is used to set parser features.

    Features usable with the Xerces parser are defined -here: Setting features

    +here: Setting features

    SAX features are defined -here: http://xml.org/sax/features/

    +here: http://xml.org/sax/features/

    @@ -141,8 +143,8 @@ here: XML Parser properties -Properties can be used to set the schema used to validate the XML file.

    +implementation: XML Parser +properties. Properties can be used to set the schema used to validate the XML file.

    Attribute
    diff --git a/manual/Tasks/zip.html b/manual/Tasks/zip.html index a3de99ffb..28fc209e2 100644 --- a/manual/Tasks/zip.html +++ b/manual/Tasks/zip.html @@ -81,10 +81,10 @@ see below

    Since Ant 1.5.2, <zip> can store Unix permissions inside the archive (see description of the filemode and dirmode attributes for <zipfileset>). Unfortunately there is no portable -way to store these permissions. Ant uses the algorithm used -by Info-Zip's implementation of the zip -and unzip commands—these are the default versions of zip -and unzip for many Unix(-like) systems.

    +way to store these permissions. Ant uses the algorithm used by Info-Zip's implementation of the zip and unzip +commands—these are the default versions of zip and unzip for many +Unix(-like) systems.

    Please note that the zip format allows multiple files of the same fully-qualified name to exist within a single archive. This has been documented as causing various problems for @@ -143,8 +143,8 @@ extract an Ant generated ZIP archive.

    + the Supported Encodings. diff --git a/manual/Types/assertions.html b/manual/Types/assertions.html index a24d83a4d..ed91a7d00 100644 --- a/manual/Types/assertions.html +++ b/manual/Types/assertions.html @@ -29,32 +29,31 @@ The assertions type enables or disables the Java 1.4 assertions feature, on a whole Java program, or components of a program. It can be used in <java> -and <junit> to add extra validation to -code. +and <junit> to add extra validation to code.

    Assertions are covered in -the Java -SE documentation, and -the Java -Language Specification. +the Java SE documentation, and +the Java Language Specification.

    -The key points to note are that a java.lang.AssertionError is thrown when an -assertion fails, and that the facility is only available on Java 1.4 and later. To enable -assertions one must set source=1.4 (or later) in <javac> -when the source is being compiled, and that the code must contain assert statements -to be tested. The result of such an action is code that neither compiles or runs on earlier -versions of Java. For this reason Apache Ant itself currently contains no assertions. +The key points to note are that a java.lang.AssertionError is thrown when an assertion +fails, and that the facility is only available on Java 1.4 and later. To enable assertions one must +set source=1.4 (or later) in <javac> when the source is being +compiled, and that the code must contain assert statements to be tested. The result of +such an action is code that neither compiles or runs on earlier versions of Java. For this reason +Apache Ant itself currently contains no assertions.

    -When assertions are enabled (or disabled) in a task through nested assertions elements, the -class loader or command line is modified with the appropriate options. This means that the JVM -executed must be of version 1.4 or later, even if there are no assertions in the -code. Attempting to enable assertions on earlier JVMs will result in an "Unrecognized option" -error and the JVM will not start. -

    +When assertions are enabled (or disabled) in a task through nested assertions elements, the class +loader or command line is modified with the appropriate options. This means that the JVM executed +must be of version 1.4 or later, even if there are no assertions in the code. Attempting to enable +assertions on earlier JVMs will result in an "Unrecognized option" error and the JVM will not start. +

    +

    Attributes

    Attribute encoding The character encoding to use for filenames inside the zip file. For a list of possible values see - the Supported - Encodings.No; defaults to default JVM character encoding
    @@ -70,18 +69,19 @@ error and the JVM will not start.

    When system assertions have been neither enabled nor disabled, then the JVM is not given any -assertion information—the default action of the current JVMs is to disable system -assertions. +assertion information—the default action of the current JVMs is to disable system assertions. +

    Note also that there is no apparent documentation for what parts of the JRE come with useful assertions. +

    Nested elements

    enable

    -Enable assertions in portions of code. If neither a package nor class is specified, assertions -are turned on in all (user) code. +Enable assertions in portions of code. If neither a package nor class is specified, assertions are +turned on in all (user) code.

    @@ -96,10 +96,8 @@ are turned on in all (user) code. - +
    package - The name of a package in which to enable assertions on all classes. (Includes subpackages.) - Use ... for the anonymous package. - The name of a package in which to enable assertions on all classes. (Includes subpackages.) + Use ... for the anonymous package. No
    @@ -121,10 +119,8 @@ Disable assertions in portions of code. package - - The name of a package in which to disable assertions on all classes. (Includes subpackages.) - Use ... for the anonymous package. - + The name of a package in which to disable assertions on all classes. (Includes subpackages.) + Use ... for the anonymous package. No @@ -136,63 +132,57 @@ have been enabled in a parent package.
    Example: enable assertions in all user classes
    -All classes not in the JRE (i.e. all non-system classes) will have assertions turned on. +

    All classes not in the JRE (i.e. all non-system classes) will have assertions turned on.

     <assertions>
       <enable/>
    -</assertions>
    -
    +</assertions>
    Example: enable a single class
    -Enable assertions in a class called Test +

    Enable assertions in a class called Test

     <assertions>
       <enable class="Test"/>
    -</assertions>
    -
    +</assertions>
    Example: enable a package
    -Enable assertions in the org.apache package and all packages starting with -the org.apache. prefix +

    Enable assertions in the org.apache package and all packages starting with +the org.apache. prefix

     <assertions>
       <enable package="org.apache"/>
    -</assertions>
    -
    +</assertions>
    Example: System assertions
    -Enable system assertions and assertions in all org.apache packages except for Ant -(but including org.apache.tools.ant.Main) +

    Enable system assertions and assertions in all org.apache packages except for Ant +(but including org.apache.tools.ant.Main)

     <assertions enableSystemAssertions="true">
       <enable package="org.apache"/>
       <disable package="org.apache.tools.ant"/>
       <enable class="org.apache.tools.ant.Main"/>
    -</assertions>
    -
    +</assertions>
    Example: disabled and anonymous package assertions
    -Disable system assertions; enable those in the anonymous package +

    Disable system assertions; enable those in the anonymous package

     <assertions enableSystemAssertions="false">
       <enable package="..."/>
    -</assertions>
    -
    +</assertions>
    Example: referenced assertions
    -This type is a datatype, so you can declare assertions and use them later +

    This type is a datatype, so you can declare assertions and use them later

     <assertions id="project.assertions">
       <enable package="org.apache.test"/>
     </assertions>
     
    -<assertions refid="project.assertions"/>
    -
    +<assertions refid="project.assertions"/> diff --git a/manual/Types/extension.html b/manual/Types/extension.html index 5cf94f7e1..5c033ef84 100644 --- a/manual/Types/extension.html +++ b/manual/Types/extension.html @@ -23,15 +23,15 @@

    Extension

    -

    Utility type that represents either an available "Optional Package" (formerly known as - "Standard Extension") as described in the manifest of a JAR file, or the requirement for such - an optional package.

    +

    Utility type that represents either an available "Optional Package" (formerly known as "Standard +Extension") as described in the manifest of a JAR file, or the requirement for such an optional +package.

    Note that this type works with extensions as defined by the "Optional Package" specification. -For more information about optional packages, see the document Optional Package -Versioning in the documentation bundle for your Java Standard Edition package, in +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in file guide/extensions/versioning.html or the -online Package -Versioning documentation.

    +online Package Versioning documentation.

    Attributes

    The extension type supports the following attributes:

    @@ -50,7 +50,7 @@ Versioning documentation.

    specificationVersion The version of extension specification (must be in dewey decimal aka dotted decimal - notation, eg 3.2.4) + notation, eg 3.2.4) no @@ -61,7 +61,7 @@ Versioning documentation.

    implementationVersion The version of extension implementation (must be in dewey decimal aka dotted decimal - notation, eg 3.2.4) + notation, eg 3.2.4) no diff --git a/manual/Types/extensionset.html b/manual/Types/extensionset.html index ae14d0566..8b077a067 100644 --- a/manual/Types/extensionset.html +++ b/manual/Types/extensionset.html @@ -25,11 +25,11 @@

    ExtensionSet

    Utility type that represents a set of Extensions.

    Note that this type works with extensions as defined by the "Optional Package" specification. -For more information about optional packages, see the document Optional Package -Versioning in the documentation bundle for your Java Standard Edition package, in +For more information about optional packages, see the document Optional Package Versioning +in the documentation bundle for your Java Standard Edition package, in file guide/extensions/versioning.html or online -at Package -Versioning documentation.

    +at Package Versioning documentation.

    Nested elements

    @@ -37,13 +37,12 @@ Versioning documentation.

    Extension object to add to set.

    fileset

    -

    FileSets all files contained contained within set that are jars -and implement an extension are added to extension set.

    +

    FileSets all files contained contained within set that are jars and +implement an extension are added to extension set.

    libfileset

    -

    All files contained contained within set that are jars and implement an extension are added -to extension set. However, the extension information may be modified by attributes of -libfileset.

    +

    All files contained contained within set that are jars and implement an extension are added to +extension set. However, the extension information may be modified by attributes of libfileset.

    Examples

    diff --git a/manual/Types/filterchain.html b/manual/Types/filterchain.html
    index b4327c2f6..cf5b090b1 100644
    --- a/manual/Types/filterchain.html
    +++ b/manual/Types/filterchain.html
    @@ -28,22 +28,22 @@ that contained the string blee from the first 10 lines of a text file you wouldn't want to filter a binary file) to a file bar, you would do
     something like:

    cat foo|head -n10|grep blee > bar
    -

    Apache Ant was not flexible enough. There was no way for the <copy> task -to do something similar. If you wanted the <copy> task to get the first 10 -lines, you would have had to create special attributes:

    +

    Apache Ant was not flexible enough. There was no way for the <copy> task to +do something similar. If you wanted the <copy> task to get the first 10 lines, +you would have had to create special attributes:

    <copy file="foo" tofile="bar" head="10" contains="blee"/>

    The obvious problem thus surfaced: Ant tasks would not be able to accommodate such data transformation attributes as they would be endless. The task would also not know in which order these attributes were to be interpreted. That is, must the task execute the contains attribute first and then the head attribute or vice-versa? What Ant tasks needed was a mechanism to allow -pluggable filter (data transformer) chains. Ant would provide a few filters for which there -have been repeated requests. Users with special filtering needs would be able to easily write -their own and plug them in.

    +pluggable filter (data transformer) chains. Ant would provide a few filters for which there have +been repeated requests. Users with special filtering needs would be able to easily write their own +and plug them in.

    The solution was to refactor data transformation oriented tasks to support FilterChains. A -FilterChain is a group of ordered FilterReaders. Users can define their own FilterReaders by -just extending the java.io.FilterReader class. Such custom FilterReaders can be -easily plugged in as nested elements of <filterchain> by +FilterChain is a group of ordered FilterReaders. Users can define their own FilterReaders by just +extending the java.io.FilterReader class. Such custom FilterReaders can be easily +plugged in as nested elements of <filterchain> by using <filterreader> elements.

    Example:

    @@ -114,14 +114,13 @@ also.

    FilterReader

    -

    The filterreader element is the generic way to define a filter. User defined -filter elements are defined in the build file using this. Please note that built in filter -readers can also be defined using this syntax.

    +

    The filterreader element is the generic way to define a filter. User defined filter +elements are defined in the build file using this. Please note that built in filter readers can +also be defined using this syntax.

    A FilterReader element must be supplied with a class name as an attribute value. The class -resolved by this name must extend java.io.FilterReader. If the custom filter -reader needs to be parameterized, it must -implement org.apache.tools.type.Parameterizable.

    +resolved by this name must extend java.io.FilterReader. If the custom filter reader +needs to be parameterized, it must implement org.apache.tools.type.Parameterizable.

    @@ -138,23 +137,22 @@ implement org.apache.tools.type.Parameterizable.

    Nested elements

    <filterreader> supports <classpath> -and <param> as nested elements. Each <param> element may -take in the following attributes—name, type and value.

    +and <param> as nested elements. Each <param> element may take +in the following attributes—name, type and value.

    The following FilterReaders are supplied with the default distribution.

    ClassConstants

    -

    This filters basic constants defined in a Java Class, and outputs them in lines composed of -the format name=value. This filter uses the BCEL library to understand the -Java Class file. See Library Dependencies.

    -

    Important: This filter is different from most of the other filters. Most of -the filters operate on a sequence of characters. This filter operates on the sequence of bytes -that makes up a class. However the bytes arrive to the filter as a sequence of characters. This -means that one must be careful on the choice of character encoding to use. Most encodings lose -information on conversion from an arbitrary sequence of bytes to characters and back again to -bytes. In particular, the usual default character encodings (CP1252 and UTF-8) do. For this -reason, since Ant 1.7, the character encoding ISO-8859-1 is used to -convert from characters back to bytes, so one has to use this encoding for -reading the java class file.

    +

    This filters basic constants defined in a Java Class, and outputs them in lines composed of the +format name=value. This filter uses the BCEL library to understand the Java Class +file. See Library Dependencies.

    +

    Important: This filter is different from most of the other filters. Most of the +filters operate on a sequence of characters. This filter operates on the sequence of bytes that +makes up a class. However the bytes arrive to the filter as a sequence of characters. This means +that one must be careful on the choice of character encoding to use. Most encodings lose information +on conversion from an arbitrary sequence of bytes to characters and back again to bytes. In +particular, the usual default character encodings (CP1252 and UTF-8) do. For this reason, since +Ant 1.7, the character encoding ISO-8859-1 is used to convert from characters +back to bytes, so one has to use this encoding for reading the Java class file.

    Example

    This loads the basic constants defined in a Java class as Ant properties.

    @@ -203,8 +201,8 @@ Unicode escape backslash u plus 4 digits.

    </loadproperties>

    ExpandProperties

    -

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

    +

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

    Example

    @@ -663,8 +661,8 @@ them.

    StripLineComments

    -

    This filter removes all those lines that begin with strings that represent comments as -specified by the user.

    +

    This filter removes all those lines that begin with strings that represent comments as specified +by the user.

    @@ -764,8 +762,8 @@ and //

    Background

    -

    With HeadFilter and TailFilter you can extract each part of a text file you want. This -graphic shows the dependencies:

    +

    With HeadFilter and TailFilter you can extract each part of a text file you want. This graphic +shows the dependencies:

    @@ -1120,15 +1118,14 @@ following are understood: \n, \r, \f, \t and \\

    Some of the filters may be used directly within a filterchain. In this case -a tokenfilter is created implicitly. An extra attribute byline is added -to the filter to specify whether to use a linetokenizer -(byline=true) or a filetokenizer -(byline=false). The default is true. +a tokenfilter is created implicitly. An extra attribute byline is added to +the filter to specify whether to use a linetokenizer (byline=true) or +a filetokenizer (byline=false). The default is true.

    LineTokenizer

    -

    This tokenizer splits the input into lines. The tokenizer delimits lines -by \r, \n or \r\n. This is the default tokenizer.

    +

    This tokenizer splits the input into lines. The tokenizer delimits lines by \r, \n +or \r\n. This is the default tokenizer.

    @@ -1451,8 +1448,8 @@ the native2ascii task.

    This is an optional filter that executes a script in a Apache BSF -or JSR -223 supported language. +or JSR 223 supported language.

    See the Script task for an explanation of scripts and @@ -1460,8 +1457,8 @@ dependencies.

    The script is provided with an object self that has getToken() -and setToken(String) methods. The getToken() method returns the -current token. The setToken(String) method replaces the current token. +and setToken(String) methods. The getToken() method returns the current +token. The setToken(String) method replaces the current token.

    This filter may be used directly within a filterchain. @@ -1474,14 +1471,14 @@ This filter may be used directly within a filterchain.

    - + - + @@ -1507,8 +1504,8 @@ This filter may be used directly within a filterchain. -
    Attribute
    languageProgramming language the script is written in. Must be a supported Apache BSF or - JSR 223 languageProgramming language the script is written in. Must be a supported Apache BSF or JSR 223 + language Yes
    managerScript engine manager to use. See the script - task for using this attribute.Script engine manager to use. See the script task for + using this attribute. No; default is auto
    classpathrefThe classpath to use, given as a reference to a - path defined elsewhere. + The classpath to use, given as a reference to a path + defined elsewhere. No
    diff --git a/manual/Types/mapper.html b/manual/Types/mapper.html index 7dfeee15a..a4e014b40 100644 --- a/manual/Types/mapper.html +++ b/manual/Types/mapper.html @@ -26,16 +26,15 @@

    Mapping File Names

    Some tasks take source files and create target files. Depending on the task, it may be quite -obvious which name a target file will have (using javac, you -know there will be .class files for your .java files)—in other -cases you may want to specify the target files, either to help Apache Ant or to get an extra bit -of functionality.

    +obvious which name a target file will have (using javac, you know +there will be .class files for your .java files)—in other cases you +may want to specify the target files, either to help Apache Ant or to get an extra bit of +functionality.

    While source files are usually specified as filesets, you don't specify target files directly—instead, you tell Ant how to find the target file(s) for one -source file. An instance of org.apache.tools.ant.util.FileNameMapper is responsible -for this. It constructs target file names based on rules that can be parameterized -with from and to attributes—the exact meaning of which is -implementation-dependent.

    +source file. An instance of org.apache.tools.ant.util.FileNameMapper is responsible for +this. It constructs target file names based on rules that can be parameterized with from +and to attributes—the exact meaning of which is implementation-dependent.

    These instances are defined in <mapper> elements with the following attributes:

    @@ -76,37 +75,37 @@ attributes:

    Depends on implementation
    -

    Note that Ant will not automatically convert / or \ characters in -the to and from attributes to the correct directory separator of your -current platform. If you need to specify this separator, use ${file.separator} -instead. For the regexp mapper, ${file.separator} will not work, as on Windows it -is the \ character, and this is an escape character for regular expressions, one should -use the handledirsep attribute instead. +

    Note that Ant will not automatically convert / or \ characters in the to +and from attributes to the correct directory separator of your current platform. If you +need to specify this separator, use ${file.separator} instead. For the regexp +mapper, ${file.separator} will not work, as on Windows it is the \ character, +and this is an escape character for regular expressions, one should use +the handledirsep attribute instead.

    Parameters specified as nested elements

    -

    The classpath can be specified via a nested <classpath>, as -well—that is, a path-like structure.

    +

    The classpath can be specified via a nested <classpath>, as well—that +is, a path-like structure.

    Since Ant 1.7.0, nested File Mappers can be supplied via either <mapper> elements or <typedef>'d implementations -of org.apache.tools.ant.util.FileNameMapper. If nested File Mappers are specified -by either means, the mapper will be implicitly configured as -a composite mapper.

    +of org.apache.tools.ant.util.FileNameMapper. If nested File Mappers are specified by +either means, the mapper will be implicitly configured as a composite +mapper.

    The built-in mapper types

    All built-in mappers are case-sensitive.

    -

    Since Ant 1.7.0, each of the built-in mapper implementation types is directly -accessible using a specific tagname. This makes it possible for filename mappers to support -attributes in addition to the generally available to and from.
    -The <mapper type|classname="..."> usage form remains valid for -reasons of backward compatibility.

    +

    Since Ant 1.7.0, each of the built-in mapper implementation types is directly accessible +using a specific tagname. This makes it possible for filename mappers to support attributes in +addition to the generally available to and from.
    The <mapper +type|classname="..."> usage form remains valid for reasons of backward +compatibility.

    identity

    -

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

    +

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

    Examples
     <mapper type="identity"/>
    @@ -139,8 +138,8 @@ and from will be ignored.

    flatten

    -

    The target file name is identical to the source file name, with all leading directory -information stripped off. Both to and from will be ignored.

    +

    The target file name is identical to the source file name, with all leading directory information +stripped off. Both to and from will be ignored.

    Examples
     <mapper type="flatten"/>
    @@ -173,8 +172,8 @@ information stripped off. Both to and from will be ignored
         
     
     

    merge

    -

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

    +

    The target file name will always be the same, as defined by tofrom +will be ignored.

    Examples
     <mapper type="merge" to="archive.tar"/>
    @@ -207,11 +206,11 @@ by tofrom will be ignored.

    glob

    -

    Both to and from are required and define patterns that may contain at -most one *. For each source file that matches the from pattern, a target file -name will be constructed from the to pattern by substituting the * in -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.

    +

    Both to and from are required and define patterns that may contain at most +one *. For each source file that matches the from pattern, a target file name will +be constructed from the to pattern by substituting the * in 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"/>
    @@ -273,9 +272,8 @@ pattern. Source file names that don't match the from pattern will be
       
         casesensitive
         
    -      This attribute can be true or false.  If this is false, the mapper
    -      will ignore case when matching the glob pattern.
    -      Since Ant 1.6.3
    +      This attribute can be true or false.  If this is false, the mapper will
    +      ignore case when matching the glob pattern.  Since Ant 1.6.3
         
         No; default is true
       
    @@ -284,8 +282,8 @@ pattern. Source file names that don't match the from pattern will be
         
           This attribute can be true or false.  If this is specified, the mapper will
           ignore the difference between the normal directory separator characters—\
    -      and /.  This attribute is useful for cross-platform build files.
    -      Since Ant 1.6.3
    +      and /.  This attribute is useful for cross-platform build files.  Since Ant
    +      1.6.3
         No; default is false
       
     
    @@ -318,14 +316,14 @@ pattern. Source file names that don't match the from pattern will be
     
     

    regexp

    -

    Both to and from are required and define regular expressions. If the -source file name (as a whole or in part) matches the from pattern, the target file -name will be constructed from the to pattern, using \0 -to \9 as back-references for the full match (\0) or the matches of the -subexpressions in parentheses. The to pattern determines the whole -file name, so if you wanted to replace the extension of a file you should not -use from="\.old$" to=".new" but rather from="(.*)\.old$" to="\1.new" -(or rather use a glob mapper in this case).

    +

    Both to and from are required and define regular expressions. If the source +file name (as a whole or in part) matches the from pattern, the target file name will be +constructed from the to pattern, using \0 to \9 as +back-references for the full match (\0) or the matches of the subexpressions in +parentheses. The to pattern determines the whole file name, so if you +wanted to replace the extension of a file you should not use from="\.old$" to=".new" +but rather from="(.*)\.old$" to="\1.new" (or rather use a glob mapper in this +case).

    Source files not matching the from pattern will be ignored.

    @@ -334,30 +332,29 @@ use from="\.old$" to=".new" but rather from="(.*)\.old$" to="

    The regexp mapper needs a supporting library and an implementation of org.apache.tools.ant.util.regexp.RegexpMatcher that hides the specifics of the library. Since Ant 1.8.0, Java 1.4 or later is required, so the implementation based on -the java.util.regex package is always be available. You can still use the now -retired Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in +the java.util.regex package is always be available. You can still use the now retired +Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in your CLASSPATH.

    For information about using gnu.regexp or gnu.rex with Ant, -see this -article. Please keep in mind that your -mileage may vary with different regexp engines.

    - -

    If you want to use one of the regular -expression libraries other than java.util.regex you need to also use the -corresponding ant-[apache-oro, apache-regexp].jar from the Ant release you are -using. Make sure that both will be loaded from the same classpath, that is either put them into +target="_top">gnu.regexp or gnu.rex +with Ant, see this +article. Please keep in mind that your mileage may vary with different regexp engines.

    + +

    If you want to use one of the regular expression +libraries other than java.util.regex you need to also use the +corresponding ant-[apache-oro, apache-regexp].jar from the Ant release you are using. +Make sure that both will be loaded from the same classpath, that is either put them into your CLASSPATH, ANT_HOME/lib directory or a nested <classpath> element of the mapper—you cannot -have ant-[apache-oro, apache-regexp].jar in ANT_HOME/lib and the -library in a nested <classpath>.

    +have ant-[apache-oro, apache-regexp].jar in ANT_HOME/lib and the library +in a nested <classpath>.

    Ant will choose the regular expression library based on the following algorithm:

      -
    • If the system property ant.regexp.matcherimpl has been set, it is taken as the -name of the class implementing org.apache.tools.ant.util.regexp.RegexpMatcher that -should be used.
    • +
    • If the system property ant.regexp.matcherimpl has been set, it is taken as the name +of the class implementing org.apache.tools.ant.util.regexp.RegexpMatcher that should be +used.
    • If it has not been set, uses the JDK 1.4 classes.
    @@ -472,8 +469,8 @@ should be used. casesensitive - This attribute can be true or false. If this is false, the mapper - will ignore case when matching the pattern. + This attribute can be true or false. If this is false, the mapper will + ignore case when matching the pattern. Since Ant 1.6.3 No; default is true @@ -514,9 +511,9 @@ should be used.

    package

    Sharing the same syntax as the glob mapper, the package mapper -replaces directory separators found in the matched source pattern with dots in the target -pattern placeholder. This mapper is particularly useful in combination -with <uptodate> and <junit> output.

    +replaces directory separators found in the matched source pattern with dots in the target pattern +placeholder. This mapper is particularly useful in combination with <uptodate> +and <junit> output.

    The to and from attributes are both required.

    Example
    @@ -543,9 +540,9 @@ with <uptodate> and <junit> output.

    unpackage

    Since Ant 1.6.0

    -

    This mapper is the inverse of the package mapper. It replaces -the dots in a package name with directory separators. This is useful for matching XML formatter -results against their JUnit test test cases. The mapper shares the sample syntax as +

    This mapper is the inverse of the package mapper. It replaces the +dots in a package name with directory separators. This is useful for matching XML formatter results +against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.

    The to and from attributes are both required.

    Example
    @@ -572,8 +569,8 @@ the glob mapper.

    This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to each nested <mapper> in turn, returning all results. The to and from attributes are ignored.

    -

    Since Ant 1.8.0, the order of the mapped results is the same as the order of the -nested mappers; prior to Ant 1.8.0 the order has been undefined.

    +

    Since Ant 1.8.0, the order of the mapped results is the same as the order of the nested +mappers; prior to Ant 1.8.0 the order has been undefined.

    Examples
     <compositemapper>
    @@ -603,9 +600,9 @@ attribute.

    chained

    Since Ant 1.7.0

    This mapper implementation can contain multiple nested mappers. File mapping is performed by -passing the source filename to the first nested mapper, its results to the second, and so on. -The target filenames generated by the last nested mapper comprise the ultimate results of the -mapping operation. The to and from attributes are ignored.

    +passing the source filename to the first nested mapper, its results to the second, and so on. The +target filenames generated by the last nested mapper comprise the ultimate results of the mapping +operation. The to and from attributes are ignored.

    Examples
     <chainedmapper>
    @@ -693,8 +690,8 @@ file name.

    Since Ant 1.7

    This mapper executes a script written in Apache BSF -or JSR -223 supported language, once per file to map.

    +or JSR 223 supported language, once per file to map.

    The script can be declared inline or in a specified file.

    See the Script task for an explanation of scripts and dependencies.

    @@ -800,9 +797,9 @@ every source file, with the list of mapped names reset after every invocation.firstmatchmapper

    Since Ant 1.8.0

    -

    This mapper supports an arbitrary number of nested mappers and returns the results of the -first mapper that matches. This is different from composite -mapper which collects the results of all matching children.

    +

    This mapper supports an arbitrary number of nested mappers and returns the results of the first +mapper that matches. This is different from composite mapper which +collects the results of all matching children.

    Examples
     <firstmatchmapper>
    @@ -846,8 +843,7 @@ attribute.

    -

    The cutdirsmapper has no corresponding <mapper type> -attribute.

    +

    The cutdirsmapper has no corresponding <mapper type> attribute.

    diff --git a/manual/Types/regexp.html b/manual/Types/regexp.html index 77bbab7ba..48d387054 100644 --- a/manual/Types/regexp.html +++ b/manual/Types/regexp.html @@ -43,25 +43,18 @@ Regexp represents a regular expression.

    Examples

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

    -Defines a regular expression for later use with id myregexp. -

    +

    Defines a regular expression for later use with id myregexp.

    <regexp refid="myregexp"/>
    -

    -Use the regular expression with id myregexp. -

    +

    Use the regular expression with id myregexp.

    Choice of regular expression implementation

    -

    -Apache Ant comes with wrappers for +

    Apache Ant comes with wrappers for the java.util.regex package, jakarta-regexp -and jakarta-ORO, -see installation dependencies concerning the -supporting libraries.

    -

    -The property ant.regexp.regexpimpl governs which regular expression implementation +target="_top">jakarta-regexp and jakarta-ORO, see installation +dependencies concerning the supporting libraries.

    +

    The property ant.regexp.regexpimpl governs which regular expression implementation will be chosen. Possible values for this property are:

    • org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
    • @@ -76,27 +69,23 @@ available.

      There are cross-platform issues for matches related to line terminator. For example if you use $ to anchor your regular expression on the end of a line the results might be very different depending on both your platform and the regular expression library you use. It -is highly recommended that you test your pattern on both Unix and Windows platforms -before you rely on it.

      +is highly recommended that you test your pattern on both Unix and Windows platforms before +you rely on it.

      • Jakarta Oro defines a line terminator as \n and is consistent with Perl.
      • Jakarta RegExp uses a system-dependent line terminator.
      • JDK 1.4 uses \n, \r\n, \u0085, \u2028, \u2029 as a default but is configured in the wrapper to use only \n (UNIX_LINE)
      -

      -We used to recommend that you use Jakarta ORO but since its development has been retired -Java's built-in regex package is likely the best choice going forward. -

      +

      We used to recommend that you use Jakarta ORO but since its development has been retired +Java's built-in regex package is likely the best choice going forward.

      Usage

      The following tasks and types use the Regexp type: -

      -These string filters also use the mechanism of regexp to choose a regular expression -implementation: -

      +

      These string filters also use the mechanism of regexp to choose a regular expression +implementation:

      • ContainsRegex string filter
      • ReplaceRegex string filter
      • diff --git a/manual/Types/selectors.html b/manual/Types/selectors.html index 657bfbcbb..2c59d5955 100644 --- a/manual/Types/selectors.html +++ b/manual/Types/selectors.html @@ -24,21 +24,20 @@

        Selectors

        -

        Selectors are a mechanism whereby the files that make up a <fileset> - can be selected based on criteria other than filename as provided by +

        Selectors are a mechanism whereby the files that make up a <fileset> can + be selected based on criteria other than filename as provided by the <include> and <exclude> tags.

        How to use a Selector

        -

        A selector is an element of FileSet, and appears within it. It can also be defined - outside of any target by using the <selector> tag and then using it as a - reference.

        +

        A selector is an element of FileSet, and appears within it. It can also be defined outside of + any target by using the <selector> tag and then using it as a reference.

        -

        Different selectors have different attributes. Some selectors can contain other - selectors, and these are called Selector - Containers. There is also a category of selectors that allow user-defined - extensions, called Custom Selectors. The ones - built in to Apache Ant are called Core Selectors.

        +

        Different selectors have different attributes. Some selectors can contain other selectors, + and these are called Selector Containers. There is + also a category of selectors that allow user-defined extensions, + called Custom Selectors. The ones built in to Apache + Ant are called Core Selectors.

        Core Selectors

        @@ -52,29 +51,29 @@ contain a particular text string
      • <date>—Select files that have been modified either before or after a particular date and time
      • -
      • <depend>—Select files that have - been modified more recently than equivalent files elsewhere
      • -
      • <depth>—Select files that appear - so many directories down in a directory tree
      • -
      • <different>—Select files that - are different from those elsewhere
      • -
      • <filename>—Select files whose - name matches a particular pattern. Equivalent to the include and exclude elements of a +
      • <depend>—Select files that have been + modified more recently than equivalent files elsewhere
      • +
      • <depth>—Select files that appear so + many directories down in a directory tree
      • +
      • <different>—Select files that are + different from those elsewhere
      • +
      • <filename>—Select files whose name + matches a particular pattern. Equivalent to the include and exclude elements of a patternset.
      • -
      • <present>—Select files that - either do or do not exist in some other location
      • -
      • <containsregexp>—Select files - that match a regular expression
      • -
      • <size>—Select files that are larger - or smaller than a particular number of bytes.
      • +
      • <present>—Select files that either + do or do not exist in some other location
      • +
      • <containsregexp>—Select files that + match a regular expression
      • +
      • <size>—Select files that are larger or + smaller than a particular number of bytes.
      • <type>—Select files that are either regular files or directories.
      • <modified>—Select files if the return value of the configured algorithm is different from that stored in a cache.
      • -
      • <signedselector>—Select files - if they are signed, and optionally if they have a signature of a certain name.
      • -
      • <scriptselector>—Use a BSF or - JSR 223 scripting language to create your own selector
      • +
      • <signedselector>—Select files if + they are signed, and optionally if they have a signature of a certain name.
      • +
      • <scriptselector>—Use a BSF or JSR + 223 scripting language to create your own selector
      • <readable>—Select files if they are readable.
      • <writable>—Select files if they are @@ -82,16 +81,15 @@
      • <executable>—Select files if they are executable.
      • <symlink>—Select files if they are - symlink.
      • -
      • <ownedBy>—Select files if they are - owned by a given user.
      • + symlinks. +
      • <ownedBy>—Select files if they are owned + by a given user.

      Contains Selector

      -

      The <contains> tag in a FileSet limits the files defined by that - fileset to only those which contain the string specified by the text - attribute.

      +

      The <contains> tag in a FileSet limits the files defined by that fileset + to only those which contain the string specified by the text attribute.

      The <contains> selector can be used as a ResourceSelector (see the <restrict> ResourceCollection).

      @@ -115,8 +113,8 @@
    - + @@ -139,9 +137,9 @@

    Date Selector

    -

    The <date> tag in a FileSet will put a limit on the files specified by - the include tag, so that tags whose last modified date does not meet the date limits - specified by the selector will not end up being selected.

    +

    The <date> tag in a FileSet will put a limit on the files specified by the + include tag, so that tags whose last modified date does not meet the date limits specified by + the selector will not end up being selected.

    ignorewhitespaceWhether to eliminate whitespace before checking for the string in - the text attribute.Whether to eliminate whitespace before checking for the string in the text + attribute. No; default is false
    @@ -151,9 +149,9 @@ - @@ -169,17 +167,19 @@ whose last modified times should be before, after, or equal to the specified value. Acceptable values for this attribute are:
      -
    • before—select files whose last modified date is before the indicated date
    • -
    • after—select files whose last modified date is after the indicated date
    • -
    • equal—select files whose last modified date is this exact date
    • +
    • before—select files whose last modified date is before the indicated + date
    • +
    • after—select files whose last modified date is after the indicated + date
    • +
    • equal—select files whose last modified date is this exact date
    - + @@ -211,9 +211,9 @@ another, equivalent file in another location.

    The <depend> tag supports the use of a - contained <mapper> element to define the - location of the file to be compared against. If no <mapper> element is - specified, the identity type mapper is used.

    + contained <mapper> element to define the location + of the file to be compared against. If no <mapper> element is specified, + the identity type mapper is used.

    The <depend> selector is case-sensitive.

    @@ -226,15 +226,15 @@ + depends on a combination of this attribute and the <mapper> element, if + any. - +
    datetimeSpecifies the date and time to test for. Should be in the format MM/dd/yyyy - hh:mm a using the US locale, or an alternative pattern specified via - the pattern attribute. + Specifies the date and time to test for. Should be in the format MM/dd/yyyy hh:mm + a using the US locale, or an alternative pattern specified via the pattern + attribute. At least one of the two
    No; default is equal
    granularityThe number of milliseconds leeway to use when comparing file modification - times. This is needed because not every file system supports tracking the last - modified time to the millisecond level.The number of milliseconds leeway to use when comparing file modification times. This is + needed because not every file system supports tracking the last modified time to the + millisecond level. No; default is 0 milliseconds, or 2 seconds on DOS systems
    targetdir The base directory to look for the files to compare against. The precise location - depends on a combination of this attribute and the <mapper> - element, if any. Yes
    granularityThe number of milliseconds leeway to give before deciding a file is out of - date. This is needed because not every file system supports tracking the last modified - time to the millisecond level.The number of milliseconds leeway to give before deciding a file is out of date. This is + needed because not every file system supports tracking the last modified time to the + millisecond level. No; default is 0 milliseconds, or 2 seconds on DOS systems
    @@ -250,8 +250,8 @@

    Depth Selector

    -

    The <depth> tag selects files based on how many directory levels deep - they are in relation to the base directory of the fileset.

    +

    The <depth> tag selects files based on how many directory levels deep they + are in relation to the base directory of the fileset.

    @@ -261,14 +261,14 @@ - + - +
    minThe minimum number of directory levels below the base directory that a file must be - in order to be selected.The minimum number of directory levels below the base directory that a file must be in + order to be selected. At least one of the two; default is no limit
    maxThe maximum number of directory levels below the base directory that a - file can be and still be selected.The maximum number of directory levels below the base directory that a file + can be and still be selected.
    @@ -279,14 +279,13 @@ <depth max="1"/> </fileset>
    -

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

    +

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

    Different Selector

    The <different> selector will select a file if it is deemed to be - 'different' from an equivalent file in another location. The rules for determining - difference between the two files are as follows:

    + 'different' from an equivalent file in another location. The rules for determining difference + between the two files are as follows:

    1. If a file is only present in the resource collection you apply the selector to but not in targetdir (or after applying the mapper) the file is selected.
    2. @@ -295,22 +294,21 @@
    3. Files with different lengths are different.
    4. If ignoreFileTimes is turned off, then differing file timestamps will cause files to be regarded as different.
    5. -
    6. Unless ignoreContents is set to true, a byte-for-byte check is run - against the two files.
    7. +
    8. Unless ignoreContents is set to true, a byte-for-byte check is run against + the two files.

    This is a useful selector to work with programs and tasks that don't handle dependency - checking properly; even if a predecessor task always creates its output files, followup - tasks can be driven off copies made with a different selector, so their dependencies are - driven on the absolute state of the files, not just a timestamp. For example: anything - fetched from a web site, or the output of some program. To reduce the amount of checking, - when using this task inside a <copy> task, - set preservelastmodified to true to propagate the timestamp from the - source file to the destination file.

    + checking properly; even if a predecessor task always creates its output files, followup tasks + can be driven off copies made with a different selector, so their dependencies are driven on the + absolute state of the files, not just a timestamp. For example: anything fetched from a web + site, or the output of some program. To reduce the amount of checking, when using this task + inside a <copy> task, set preservelastmodified to true to + propagate the timestamp from the source file to the destination file.

    The <different> selector supports the use of a - contained <mapper> element to define the - location of the file to be compared against. If no <mapper> element is - specified, the identity type mapper is used.

    + contained <mapper> element to define the location + of the file to be compared against. If no <mapper> element is specified, + the identity type mapper is used.

    @@ -321,8 +319,8 @@ + depends on a combination of this attribute and the <mapper> element, if + any. @@ -338,9 +336,9 @@ - +
    targetdir The base directory to look for the files to compare against. The precise location - depends on a combination of this attribute and the <mapper> - element, if any. Yes
    granularityThe number of milliseconds leeway to give before deciding a file is out of - date. This is needed because not every file system supports tracking the last modified - time to the millisecond level.The number of milliseconds leeway to give before deciding a file is out of date. This is + needed because not every file system supports tracking the last modified time to the + millisecond level. No; default is 0 milliseconds, or 2 seconds on DOS systems
    @@ -353,14 +351,14 @@ 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.

    +

    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.

    Filename Selector

    The <filename> tag acts like the <include> - and <exclude> tags within a fileset. By using a selector instead, - however, one can combine it with all the other selectors using + and <exclude> tags within a fileset. By using a selector instead, however, + one can combine it with all the other selectors using whatever selector container is desired.

    The <filename> selector is case-sensitive.

    @@ -373,8 +371,8 @@ name - The name of files to select. The name parameter can contain the standard Ant - wildcard characters. + The name of files to select. The name parameter can contain the standard Ant wildcard + characters. Exactly one of the two @@ -388,8 +386,8 @@ negate - Whether to reverse the effects of this filename selection, therefore emulating an - exclude rather than include tag. + Whether to reverse the effects of this filename selection, therefore emulating + an exclude rather than include tag. No; default is false @@ -409,9 +407,9 @@ another directory tree.

    The <present> tag supports the use of a - contained <mapper> element to define the - location of the file to be tested against. If no <mapper> element is - specified, the identity type mapper is used.

    + contained <mapper> element to define the location + of the file to be tested against. If no <mapper> element is specified, + the identity type mapper is used.

    The <present> selector is case-sensitive.

    @@ -424,19 +422,19 @@ targetdir The base directory to look for the files to compare against. The precise location - depends on a combination of this attribute and the <mapper> - element, if any. + depends on a combination of this attribute and the <mapper> element, if + any. Yes present - Whether we are requiring that a file is present in the source directory tree only, - or in both the source and the target directory tree. Valid values are: + Whether we are requiring that a file is present in the source directory tree only, or in + both the source and the target directory tree. Valid values are:
      -
    • srconly—select files only if they are in the source directory tree - but not in the target directory tree
    • -
    • both-- select files only if they are present both in the source and - target directory trees
    • +
    • srconly—select files only if they are in the source directory tree but + not in the target directory tree
    • +
    • both-- select files only if they are present both in the source and target + directory trees
    Setting this attribute to srconly is equivalent to wrapping the selector in the <not> selector container. @@ -499,14 +497,14 @@ <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). +

    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).

    Size Selector

    -

    The <size> tag in a FileSet will put a limit on the files specified by - the include tag, so that tags which do not meet the size limits specified by the selector - will not end up being selected.

    +

    The <size> tag in a FileSet will put a limit on the files specified by the + include tag, so that tags which do not meet the size limits specified by the selector will not + end up being selected.

    @@ -522,17 +520,17 @@ - + - - - + @@ -788,23 +787,24 @@ documentation.

    - + - + @@ -813,8 +813,7 @@ documentation.

    - + - + - + - + diff --git a/manual/tutorial-HelloWorldWithAnt.html b/manual/tutorial-HelloWorldWithAnt.html index 186f84e10..45c301aad 100644 --- a/manual/tutorial-HelloWorldWithAnt.html +++ b/manual/tutorial-HelloWorldWithAnt.html @@ -244,13 +244,13 @@ because

  • it's from Apache ;-)
  • We store our external libraries in a new directory lib. Log4J can -be downloaded [1] from -Logging's Homepage. Create the lib directory and extract the log4j-1.2.17.jar into that -directory. After that we have to modify our Java source file to use that library and our buildfile so that this library -could be accessed during compilation and run.

    -

    Working with Log4J is documented inside its manual. Here we use the MyApp-example from -the Short Manual [2]. First we have to modify the java -source to use the logging framework:

    +be downloaded +[1] from Logging's Homepage. Create the lib directory and extract the log4j-1.2.17.jar +into that directory. After that we have to modify our Java source file to use that library and our buildfile so that +this library could be accessed during compilation and run.

    +

    Working with Log4J is documented inside its manual. Here we use the MyApp-example from +the Short Manual [2]. First we have to +modify the java source to use the logging framework:

     package oata;
    @@ -413,9 +413,9 @@ junit instruction to our buildfile:

    ...

    We reuse the path to our own jar file as defined in run-target by giving it an ID and making it globally available. -The printsummary=yes lets us see more detailed information than just a "FAILED" or "PASSED" message. How -much tests failed? Some errors? printsummary lets us know. The classpath is set up to find our classes. To -run tests the batchtest here is used, so you could easily add more test classes in the future just by +The printsummary=yes lets us see more detailed information than just a "FAILED" or "PASSED" message. +How much tests failed? Some errors? printsummary lets us know. The classpath is set up to find our classes. +To run tests the batchtest here is used, so you could easily add more test classes in the future just by naming them *Test.java. This is a common naming scheme.

    After a ant junit you'll get:

    @@ -470,9 +470,11 @@ don't need the HTML report just for testing, e.g. if you are fixing an error or

    Resources

      -
    1. https://archive.apache.org/dist/logging/log4j/1.2.17/logging-log4j-1.2.17.zip
    2. -
    3. https://logging.apache.org/log4j/1.2/manual.html
    4. -
    5. https://junit.org/junit4
    6. +
    7. https://archive.apache.org/dist/logging/log4j/1.2.17/logging-log4j-1.2.17.zip
    8. +
    9. https://logging.apache.org/log4j/1.2/manual.html
    10. +
    11. https://junit.org/junit4
    diff --git a/manual/tutorial-tasks-filesets-properties.html b/manual/tutorial-tasks-filesets-properties.html index ac9a80b88..8df706f6e 100644 --- a/manual/tutorial-tasks-filesets-properties.html +++ b/manual/tutorial-tasks-filesets-properties.html @@ -322,8 +322,8 @@ the <path>. Filesets are easy if the files are all under a co the case, you have a problem. Another disadvantage is its speed: if you have only a few files in a huge directory structure, why not use a <filelist> instead? <path>s combines these datatypes in that way that a path contains other paths, filesets, dirsets and filelists. This is -why Ant-Contrib [4]<foreach> task is modified to -support paths instead of filesets. So we want that, too.

    +why Ant-Contrib [4]<foreach> task is +modified to support paths instead of filesets. So we want that, too.

    Changing from fileset to path support is very easy:

    Change Java code from: @@ -659,8 +659,8 @@ After that it prints out the result (e.g. <samp>C:/ant-1.5.4/bin/ant.jar;C
  • create a patch file
  • publishing that patch file
  • -

    The Ant Task Guidelines [6] support additional -information on that.

    +

    The Ant Task Guidelines [6] support +additional information on that.

    Now we will check the "Checklist before submitting a new task" described in that guideline.

      @@ -762,7 +762,7 @@ after git clone (without our modifications).

      Test on JDK 5

      Ant 1.10 uses Java 8 for development, but Ant 1.9 is actively maintained, too. That means that Ant code must be able to run on a JDK 5. So we have to test that. You can download older JDKs -from Oracle [8].

      +from Oracle [8].

      Clean the ANT_HOME variable, delete the build, bootstrap and dist directories, and point JAVA_HOME to the JDK 5 home directory. Then create the patch with your commit, @@ -773,11 +773,11 @@ run ant test (like above).

      Checkstyle

      There are many things we have to ensure. Indentation with 4 spaces, blanks here and there, ... (all described in -the Ant Task Guidelines [6] which includes -the Sun code style [9]). Because there are -so many things we would be happy to have a tool for do the checks. There is one: checkstyle. Checkstyle is available -at Sourceforge [10] and Ant provides with the check.xml a -buildfile which will do the job for us.

      +the Ant Task Guidelines [6] which includes +the Sun code style +[9]). Because there are so many things we would be happy to have a tool for do the checks. There is one: +checkstyle. Checkstyle is available at Sourceforge [10] +and Ant provides with the check.xml a buildfile which will do the job for us.

      Download it and put the checkstyle-*-all.jar into your %USERPROFILE%\.ant\lib directory. All jar's stored there are available to Ant so you haven't to add it to you %ANT_HOME%\lib directory (this @@ -796,9 +796,9 @@ will find the next error place much more easier without redoing the checkstyle.< run. Now our task isn't listed. That's fine :-)

      Publish the task

      -

      Finally we publish that archive. As described in the Ant -Task Guidelines [7] we can announce it on the developer mailing list, create a BugZilla entry and open a GitHub pull -request. For both we need some information:

      +

      Finally we publish that archive. As described in the Ant Task Guidelines [7] we can announce it on the developer mailing list, create a BugZilla entry and +open a GitHub pull request. For both we need some information:

    unitsThe units that the value attribute is expressed in. When using the - standard single letter SI designations, such as k, M, or G, - multiples of 1000 are used. If you want to use power of 2 units, use the IEC - standard: Ki for 1024, Mi for 1048576, and so on. The default is no units, - which means the value attribute expresses the exact number of bytes.The units that the value attribute is expressed in. When using the standard + single letter SI designations, such as k, M, or G, multiples of 1000 + are used. If you want to use power of 2 units, use the IEC standard: Ki for + 1024, Mi for 1048576, and so on. The default is no units, which means + the value attribute expresses the exact number of bytes. No
    whenIndicates how to interpret the size, whether the files to be selected should be - larger, smaller, or equal to that value. Acceptable values for this attribute are: + Indicates how to interpret the size, whether the files to be selected should be larger, + smaller, or equal to that value. Acceptable values for this attribute are:
    • less—select files less than the indicated size
    • more—select files greater than the indicated size
    • @@ -584,8 +582,8 @@ <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 +

      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:

      @@ -597,10 +595,9 @@
       </fileset>

      Modified Selector

      -

      The <modified> selector computes a value for a file, compares that to - the value stored in a cache and select the file, if these two values differ.

      -

      Because this selector is highly configurable the order in which the selection is done - is:

      +

      The <modified> selector computes a value for a file, compares that to the + value stored in a cache and select the file, if these two values differ.

      +

      Because this selector is highly configurable the order in which the selection is done is:

      1. get the absolute path for the file
      2. get the cached value from the configured cache (absolute path as key)
      3. @@ -609,15 +606,14 @@
      4. update the cache if needed and requested
      5. do the selection according to the comparison result
      -

      The comparison, computing of the hashvalue and the store is done by implementation of - special interfaces. Therefore they may provide additional parameters.

      +

      The comparison, computing of the hashvalue and the store is done by implementation of special + interfaces. Therefore they may provide additional parameters.

      The <modified> selector can be used as a ResourceSelector (see - the <restrict> ResourceCollection). In that - case it maps simple file resources to files and does its job. If the resource is from - another type, the <modified> selector tries to - (attention!) copy the content into a local file for computing the - hashvalue.

      + the <restrict> ResourceCollection). In that case it + maps simple file resources to files and does its job. If the resource is from another type, + the <modified> selector tries to (attention!) copy the + content into a local file for computing the hashvalue.

      @@ -688,27 +684,26 @@ - + - +
      selresShould Resources without an InputStream, and therefore without checking, be - selected? (boolean)Should Resources without an InputStream, and therefore without checking, be selected? + (boolean) No; defaults to true. Only relevant when used as ResourceSelector.
      delayupdateIf set to true, the storage of the cache will be delayed until the next - finished BuildEvent; task finished, target finished or build finished, whichever comes - first. This is provided for increased performance. If set to false, the - storage of the cache will happen with each change. This attribute depends upon - the update attribute. (boolean)If set to true, the storage of the cache will be delayed until the next finished + BuildEvent; task finished, target finished or build finished, whichever comes first. This + is provided for increased performance. If set to false, the storage of the cache + will happen with each change. This attribute depends upon the update + attribute. (boolean) No; defaults to true
      Parameters specified as nested elements
      -

      The <modified> selector supports a - nested <classpath> element that represents - a path-like structure for finding custom interface - implementations.

      +

      The <modified> selector supports a nested <classpath> + element that represents a path-like structure for finding + custom interface implementations.

      All attributes of a <modified> selector an be set with nested <param/> tags. Additional values can be set @@ -758,8 +753,8 @@

    propertyfileUse the java.util.Properties class and its possibility to load and store - to file. This Cache implementation supports the following attributes: + Use the java.util.Properties class and its possibility to load and store to + file. This Cache implementation supports the following attributes:
    - ReplaceRegExpReplaceRegExp

    Replaces the occurrence of a given regular expression with a substitution pattern in a file or set of files.

    JJDoc

    Invokes the JJDoc - documentation generator for the JavaCC compiler-compiler. JJDoc - takes a JavaCC parser specification and produces documentation - for the BNF grammar. It can operate in three modes, determined - by command line options. This task only invokes JJDoc if the - grammar file is newer than the generated BNF grammar - documentation.

    Invokes the JJDoc documentation generator for the JavaCC + compiler-compiler. JJDoc takes a JavaCC parser specification and + produces documentation for the BNF grammar. It can operate in + three modes, determined by command line options. This task only + invokes JJDoc if the grammar file is newer than the generated BNF + grammar documentation.

    JJTree

    Invokes the JJTree - preprocessor for the JavaCC compiler-compiler. It inserts - parse-tree building actions at various places in the JavaCC - source that it generates. The output of JJTree is run through - JavaCC to create the parser. This task only invokes JJTree if the - grammar file is newer than the generated JavaCC file.

    Invokes the JJTree preprocessor for the JavaCC + compiler-compiler. It inserts parse-tree building actions at + various places in the JavaCC source that it generates. The output + of JJTree is run through JavaCC to create the parser. This task + only invokes JJTree if the grammar file is newer than the + generated JavaCC file.

    - Native2AsciiNative2Ascii

    Converts files from native encodings to ASCII with escaped Unicode. A common usage is to convert source files maintained in a native operating system encoding to ASCII, prior to @@ -919,8 +918,7 @@ documentation.

    - PropertyFilePropertyFile

    Creates or modifies property files. Useful when wanting to make unattended modifications to configuration files for application servers and applications. Typically used for things @@ -1050,8 +1048,7 @@ documentation.

    - Microsoft Visual SourceSafeMicrosoft Visual SourceSafe

    Tasks to perform the Visual SourceSafe vssget, vsslabel, vsshistory, vsscheckin, vsscheckout, vssadd, vsscp, @@ -1084,9 +1081,10 @@ documentation.

    Junit

    Runs tests from the Junit - testing framework. This task has been tested with JUnit 3.0 and - later; it won't work with versions prior to JUnit 3.0.

    Runs tests from the Junit testing framework. This task has been + tested with JUnit 3.0 and later; it won't work with versions + prior to JUnit 3.0.

    @@ -826,13 +826,14 @@ request. For both we need some information:

    more difficult. But the advantage is that entries will not be forgotten (a report is generated once every weekend). So I will describe the process.

    -

    First, you must have a BugZilla account. So open the BugZilla Main Page -[11] and follow the link Open a new Bugzilla account -[12] and the steps described there if you haven't one.

    +

    First, you must have a BugZilla account. So open the BugZilla Main Page [11] and follow the +link Open a new Bugzilla account [12] +and the steps described there if you haven't one.

      -
    1. From the BugZilla main page choose Enter a new bug report - [13]
    2. +
    3. From the BugZilla main page choose Enter a + new bug report [13]
    4. Choose "Ant" as product
    5. Version is the last "Alpha (nightly)" (at this time 1.10)
    6. Component is "Core tasks"
    7. @@ -854,16 +855,21 @@ I will describe the process.

    8. tutorial-writing-tasks.html
    9. tutorial-tasks-filesets-properties.zip
    10. properties.html#built-in-props
    11. -
    12. http://ant-contrib.sourceforge.net/
    13. +
    14. http://ant-contrib.sourceforge.net/
    15. Tasks/java.html
    16. -
    17. https://ant.apache.org/ant_task_guidelines.html
    18. -
    19. https://github.com/apache/ant
    20. -
    21. https://www.oracle.com/technetwork/java/archive-139210.html
    22. -
    23. https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    24. -
    25. http://checkstyle.sourceforge.net/
    26. -
    27. https://issues.apache.org/bugzilla/
    28. -
    29. https://issues.apache.org/bugzilla/createaccount.cgi
    30. -
    31. https://issues.apache.org/bugzilla/enter_bug.cgi
    32. +
    33. https://ant.apache.org/ant_task_guidelines.html
    34. +
    35. https://github.com/apache/ant
    36. +
    37. https://www.oracle.com/technetwork/java/archive-139210.html
    38. +
    39. https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    40. +
    41. http://checkstyle.sourceforge.net/
    42. +
    43. https://issues.apache.org/bugzilla/
    44. +
    45. https://issues.apache.org/bugzilla/createaccount.cgi
    46. +
    47. https://issues.apache.org/bugzilla/enter_bug.cgi
    diff --git a/manual/tutorial-writing-tasks.html b/manual/tutorial-writing-tasks.html index e14e32b52..a1dee0288 100644 --- a/manual/tutorial-writing-tasks.html +++ b/manual/tutorial-writing-tasks.html @@ -99,7 +99,7 @@ fail; jar requires the execution of some steps before. So the refactored </target> </project> -

    ant.project.name is one of the build-in +

    ant.project.name is one of the build-in properties [1] of Ant.

    Write the Task

    @@ -117,7 +117,7 @@ attribute the compile is executed before).

    Use the Task

    But after creating the jar we want to use our new Task. Therefore we need a new target use. Before we can use -our new task we have to declare it with <taskdef> +our new task we have to declare it with <taskdef> [2]. And for easier process we change the default attribute:

     <?xml version="1.0" encoding="UTF-8"?>
    @@ -724,9 +724,8 @@ of your custom task.  Then set breakpoints in other methods.  This will ensure t
     JVM.

    Resources

    -

    This tutorial and its resources are available -via BugZilla [5]. The ZIP provided there -contains

    +

    This tutorial and its resources are available via BugZilla [5]. The ZIP provided there contains

    - - - +
    default the default target to use when no target is supplied.No; however, since Ant 1.6.0, - every project includes an implicit target that contains any and - all top-level tasks and/or types. This target will always be - executed as part of the project's initialization, even when Ant is - run with the -projecthelp option. + No; however, since Ant 1.6.0, every project includes an implicit target that contains any and all + top-level tasks and/or types. This target will always be executed as part of the project's initialization, even + when Ant is run with the -projecthelp option.
    basedirthe base directory from which all path calculations are - done. A relative path is resolved relative to the directory containing - the buildfile. + the base directory from which all path calculations are done. A relative path is resolved relative to the + directory containing the buildfile. No; defaults to the parent directory of the buildfile, - unless overridden by the project's basedir or the basedir - propertyNo; defaults to the parent directory of the buildfile, unless overridden by the project's basedir or + the basedir property
    -

    Optionally, a description for the project can be provided as a -top-level <description> element (see the description type).

    +

    Optionally, a description for the project can be provided as a top-level <description> element +(see the description type).

    -

    Each project defines one or more targets. -A target is a set of tasks you want -to be executed. When starting Ant, you can select which target(s) you -want to have executed. When no target is given, -the project's default is used.

    +

    Each project defines one or more targets. A target is a set of tasks you want to be executed. When +starting Ant, you can select which target(s) you want to have executed. When no target is given, the +project's default is used.

    Targets

    -

    A target can depend on other targets. You might have a target for compiling, -for example, and a target for creating a distributable. You can only build a -distributable when you have compiled first, so the distribute target +

    A target can depend on other targets. You might have a target for compiling, for example, and a target for creating a +distributable. You can only build a distributable when you have compiled first, so the distribute target depends on the compile target. Ant resolves these dependencies.

    -

    It should be noted, however, that Ant's depends attribute -only specifies the order in which targets should be executed—it -does not affect whether the target that specifies the dependency(s) gets -executed if the dependent target(s) did not (need to) run. -

    +

    It should be noted, however, that Ant's depends attribute only specifies the order in which +targets should be executed—it does not affect whether the target that specifies the dependency(s) gets executed if +the dependent target(s) did not (need to) run.

    More information can be found in the dedicated manual page.

    Tasks

    A task is a piece of code that can be executed.

    -

    A task can have multiple attributes (or arguments, if you prefer). The value -of an attribute might contain references to a property. These references will be -resolved before the task is executed.

    +

    A task can have multiple attributes (or arguments, if you prefer). The value 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" ... />
    -

    where name is the name of the task, -attributeN is the attribute name, and -valueN is the value for this attribute.

    -

    There is a set of built-in tasks, but it is also very -easy to write your own.

    -

    All tasks can have a name attribute. The value of -this attribute will be used in the logging messages generated by -Ant.

    -Tasks can be assigned an id attribute: +

    where name is the name of the task, attributeN is the attribute name, +and valueN is the value for this attribute.

    +

    There is a set of built-in tasks, but it is also very easy +to write your own.

    +

    All tasks can have a name attribute. The value of 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: +

    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"). -

    -Note 1: If task1 has not been run yet, then -it has not been configured (ie., no attributes have been set), and if it is -going to be configured later, anything you've done to the instance may -be overwritten. -

    -

    -Note 2: Future versions of Ant will most likely not -be backward-compatible with this behaviour, since there will likely be no -task instances at all, only proxies. -

    +

    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").

    +

    Note 1: If task1 has not been run yet, then it has not been configured (ie., no attributes have been set), and +if it is going to be configured later, anything you've done to the instance may be overwritten.

    +

    Note 2: Future versions of Ant will most likely not be backward-compatible with this behaviour, since there +will likely be no task instances at all, only proxies.

    Properties

    @@ -200,70 +174,49 @@ task instances at all, only proxies. </target> </project>
    -

    Notice that we are declaring properties outside any target. Since - Ant 1.6, all tasks can be declared outside targets (earlier version -only allowed <property>, <typedef> and -<taskdef>). When you do this they are evaluated before -any targets are executed. Some tasks will generate build failures if -they are used outside of targets as they may cause infinite loops -otherwise (<antcall> for example).

    - -

    -We have given some targets descriptions; this causes the -projecthelp -invocation option to list them as public targets with the descriptions; the -other target is internal and not listed. -

    -Finally, for this target to work the source in the src subdirectory -should be stored in a directory tree which matches the package names. Check the -<javac> task for details. +

    Notice that we are declaring properties outside any target. Since Ant 1.6, all tasks can be declared outside +targets (earlier version only allowed <property>, <typedef> +and <taskdef>). When you do this they are evaluated before any targets are executed. Some tasks +will generate build failures if they are used outside of targets as they may cause infinite loops otherwise +(<antcall> for example).

    + +

    We have given some targets descriptions; this causes the -projecthelp invocation option to list them as +public targets with the descriptions; the other target is internal and not listed.

    +

    Finally, for this target to work the source in the src subdirectory should be stored in a directory tree +which matches the package names. Check the <javac> task for details.

    Token Filters

    -

    A project can have a set of tokens that might be automatically expanded if -found when a file is copied, when the filtering-copy behavior is selected in the -tasks that support this. These might be set in the buildfile -by the filter task.

    -

    Since this can potentially be a very harmful behavior, -the tokens in the files must -be of the form @token@, where -token is the token name that is set -in the <filter> task. This token syntax matches the syntax of other build systems -that perform such filtering and remains sufficiently orthogonal to most -programming and scripting languages, as well as with documentation systems.

    -

    Note: If a token with the format @token@ -is found in a file, but no -filter is associated with that token, no changes take place; -therefore, no escaping -method is available—but as long as you choose appropriate names for your -tokens, this should not cause problems.

    -

    Warning: If you copy binary files with filtering turned on, you can corrupt the -files. This feature should be used with text files only.

    +

    A project can have a set of tokens that might be automatically expanded if found when a file is copied, when the +filtering-copy behavior is selected in the tasks that support this. These might be set in the buildfile by +the filter task.

    +

    Since this can potentially be a very harmful behavior, the tokens in the files must be of the +form @token@, where token is the token name that is set in +the <filter> task. This token syntax matches the syntax of other build systems that perform such +filtering and remains sufficiently orthogonal to most programming and scripting languages, as well as with documentation +systems.

    +

    Note: If a token with the format @token@ is found in a file, but no filter +is associated with that token, no changes take place; therefore, no escaping method is available—but as long as +you choose appropriate names for your tokens, this should not cause problems.

    +

    Warning: If you copy binary files with filtering turned on, you can corrupt the files. This feature +should be used with text files only.

    Path-like Structures

    -

    You can specify PATH- and CLASSPATH-type -references using both : and ; as separator -characters. Ant will -convert the separator to the correct character of the current operating -system.

    -

    Wherever path-like values need to be specified, a nested element can -be used. This takes the general form of:

    +

    You can specify PATH- and CLASSPATH-type references using both : and ; as +separator characters. Ant will convert the separator to the correct character of the current operating system.

    +

    Wherever path-like values need to be specified, a nested element can be used. This takes the general form of:

     <classpath>
       <pathelement path="${classpath}"/>
       <pathelement location="lib/helper.jar"/>
     </classpath>
    -

    The location attribute specifies a single file or -directory relative to the project's base directory (or an absolute -filename), while the path attribute accepts colon- -or semicolon-separated lists of locations. The path -attribute is intended to be used with predefined paths—in any other -case, multiple elements with location attributes should be -preferred.

    -

    Since Ant 1.8.2 the location attribute can also contain a - wildcard in its last path component (i.e. it can end in a - *) in order to support wildcard CLASSPATHs introduced - with Java 6. Ant will not expand or evaluate the wildcards and the - resulting path may not work as anything else but a CLASSPATH—or - even as a CLASSPATH for JVM prior to Java 6.

    +

    The location attribute specifies a single file or directory relative to the project's base directory (or +an absolute filename), while the path attribute accepts colon- or semicolon-separated lists of +locations. The path attribute is intended to be used with predefined paths—in any other case, multiple +elements with location attributes should be preferred.

    +

    Since Ant 1.8.2 the location attribute can also contain a wildcard in its last path component +(i.e. it can end in a *) in order to support wildcard CLASSPATHs introduced with Java 6. Ant will +not expand or evaluate the wildcards and the resulting path may not work as anything else but +a CLASSPATH—or even as a CLASSPATH for JVM prior to Java 6.

    As a shortcut, the <classpath> tag supports path and location attributes of its own, so:

    @@ -274,16 +227,11 @@ supports path and

    can be abbreviated to:

    <classpath path="${classpath}"/>
    -

    In addition, one or more -resource collections -can be specified as nested elements (these must consist of -file-type resources only). -Additionally, it should be noted that although resource collections are -processed in the order encountered, certain resource collection types -such as fileset, -dirset and -files -are undefined in terms of order.

    +

    In addition, one or more resource collections can be specified as +nested elements (these must consist of file-type resources only). Additionally, +it should be noted that although resource collections are processed in the order encountered, certain resource +collection types such as fileset, dirset +and files are undefined in terms of order.

     <classpath>
       <pathelement path="${classpath}"/>
    @@ -297,33 +245,24 @@ are undefined in terms of order.

    </dirset> <filelist refid="third-party_jars"/> </classpath>
    -

    This builds a path that holds the value of ${classpath}, -followed by all jar files in the lib directory, -the classes directory, all directories named -classes under the apps subdirectory of -${build.dir}, except those -that have the text Test in their name, and -the files specified in the referenced FileList.

    -

    If you want to use the same path-like structure for several tasks, -you can define them with a <path> element at the -same level as <target>s, and reference them via their +

    This builds a path that holds the value of ${classpath}, followed by all jar files in +the lib directory, the classes directory, all directories named classes under +the apps subdirectory of ${build.dir}, except those that have the text Test in +their name, and the files specified in the referenced FileList.

    +

    If you want to use the same path-like structure for several tasks, you can define them with +a <path> element at the same level as <target>s, and reference them via their id attribute—see References for an example.

    -

    By default a path-like structure will re-evaluate all nested - resource collections whenever it is used, which may lead to - unnecessary re-scanning of the filesystem. Since Ant 1.8.0, path has - an optional cache attribute, if it is set to true, the path - instance will only scan its nested resource collections once and - assume it doesn't change during the build anymore (the default - for cache still is false). Even if you are using the - path only in a single task it may improve overall performance to set - cache to true if you are using complex nested - constructs.

    - -

    A path-like structure can include a reference to another path-like -structure (a path being itself a resource collection) -via nested <path> elements:

    +

    By default a path-like structure will re-evaluate all nested resource collections whenever it is used, which may lead +to unnecessary re-scanning of the filesystem. Since Ant 1.8.0, path has an optional cache +attribute, if it is set to true, the path instance will only scan its nested resource collections once and assume +it doesn't change during the build anymore (the default for cache still is false). Even if you are +using the path only in a single task it may improve overall performance to set cache to true if you +are using complex nested constructs.

    + +

    A path-like structure can include a reference to another path-like structure (a path being itself a resource +collection) via nested <path> elements:

     <path id="base.path">
       <pathelement path="${classpath}"/>
    @@ -337,21 +276,18 @@ via nested <path> elements:

    <path refid="base.path"/> <pathelement location="testclasses"/> </path>
    - The shortcuts previously mentioned for <classpath> - are also valid for <path>. For example: +

    The shortcuts previously mentioned for <classpath> are also valid +for <path>. For example:

     <path id="base.path">
       <pathelement path="${classpath}"/>
     </path>
    -can be written as: +

    can be written as:

    <path id="base.path" path="${classpath}"/>

    Path Shortcut

    -

    - Since Ant 1.6, there is a shortcut for converting paths to OS specific - strings in properties. 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: -

    +

    Since Ant 1.6, there is a shortcut for converting paths to OS specific strings in properties. 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"/>
    @@ -361,9 +297,8 @@ can be written as:
     </javac>

    Command-line Arguments

    -

    Several tasks take arguments that will be passed to another -process on the command line. To make it easier to specify arguments -that contain space characters, nested arg elements can be used.

    +

    Several tasks take arguments that will be passed to another process on the command line. To make it easier to specify +arguments that contain space characters, nested arg elements can be used.

    @@ -372,28 +307,23 @@ that contain space characters, nested arg elements can be used.

    - + - + - + - + @@ -401,44 +331,38 @@ that contain space characters, nested arg elements can be used.

    - + -
    Attribute
    valuea single command-line argument; can contain space - characters.a single command-line argument; can contain space characters. Exactly one of these.
    fileThe name of a file as a single command-line - argument; will be replaced with the absolute filename of the file.The name of a file as a single command-line argument; will be replaced with the absolute filename + of the file.
    pathA string that will be treated as a path-like - string as a single command-line argument; you can use ; - or : as - path separators and Ant will convert it to the platform's local - conventions.A string that will be treated as a path-like string as a single command-line argument; you can + use ; or : as path separators and Ant will convert it to the platform's local conventions.
    pathrefReference to a path - defined elsewhere. Ant will convert it to the platform's local - conventions.Reference to a path defined elsewhere. Ant will convert it to the + platform's local conventions.
    line
    prefixA fixed string to be placed in front of the - argument. In the case of a line broken into parts, it will be - placed in front of every part. Since Ant 1.8.A fixed string to be placed in front of the argument. In the case of a line broken into parts, it will be placed + in front of every part. Since Ant 1.8. No
    suffixA fixed string to be placed immediately after the - argument. In the case of a line broken into parts, it will be + A fixed string to be placed immediately after the argument. In the case of a line broken into parts, it will be placed after every part. Since Ant 1.8. No
    -

    It is highly recommended to avoid the line version -when possible. Ant will try to split the command line in a way -similar to what a (Unix) shell would do, but may create something that -is very different from what you expect under some circumstances.

    +

    It is highly recommended to avoid the line version when possible. Ant will try to split the command line +in a way 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 options -l and -a.

    +

    is a single command-line argument containing a space character, not separate options -l +and -a.

    <arg line="-l -a"/>

    This is a command line with two separate options, -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.

    +

    is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems +and /dir:/dir2:/dir3 on Unix(-like) systems.

    References

    -

    Any project element can be assigned an identifier using its -id attribute. In most cases the element can subsequently -be referenced by specifying the refid attribute on an -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.

    +

    Any project element can be assigned an identifier using its id attribute. In most cases the element can +subsequently be referenced by specifying the refid attribute on an 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 ... >
    @@ -483,70 +407,56 @@ replicate the same snippet of XML over and over again—using a
         </javac>
       </target>
     </project>
    -

    All tasks that use nested elements for -PatternSets, -FileSets, -ZipFileSets or -path-like structures accept references to these structures -as shown in the examples. Using refid on a task will ordinarily -have the same effect (referencing a task already declared), but the user -should be aware that the interpretation of this attribute is dependent on the -implementation of the element upon which it is specified. Some tasks (the -property task is a handy example) +

    All tasks that use nested elements +for PatternSets, FileSets, ZipFileSets +or path-like structures accept references to these structures as shown in the +examples. Using refid on a task will ordinarily have the same effect (referencing a task already declared), +but the user should be aware that the interpretation of this attribute is dependent on the implementation of the element +upon which it is specified. Some tasks (the property task is a handy example) deliberately assign a different meaning to refid.

    Use of external tasks

    -Ant supports a plugin mechanism for using third party tasks. For using them you -have to do two steps: +

    Ant supports a plugin mechanism for using third party tasks. For using them you have to do two steps:

    1. place their implementation somewhere where Ant can find them.
    2. declare them.
    -Don't add anything to the CLASSPATH environment variable—this is often the -reason for very obscure errors. Use Ant's own mechanisms -for adding libraries: +

    Don't add anything to the CLASSPATH environment variable—this is often the reason for very obscure +errors. Use Ant's own mechanisms for adding libraries:

    • via command line argument -lib
    • adding to ${user.home}/.ant/lib
    • adding to ${ant.home}/lib
    -For the declaration there are several ways: +

    For the declaration there are several ways:

    • declare a single task per using instruction using - <taskdef name="taskname" - classname="ImplementationClass"/> -
      - <taskdef name="for" classname="net.sf.antcontrib.logic.For"/> - <for ... /> + <taskdef name="taskname" + classname="ImplementationClass"/>
      + <taskdef name="for" classname="net.sf.antcontrib.logic.For"/> <for + ... />
    • -
    • declare a bundle of tasks using a properties file holding these - taskname-ImplementationClass-pairs and <taskdef> -
      - <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> - <for ... /> +
    • declare a bundle of tasks using a properties file holding these taskname–ImplementationClass + pairs and <taskdef>
      + <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> <for ... />
    • -
    • declare a bundle of tasks using - an xml file holding these - taskname-ImplementationClass-pairs and <taskdef> -
      - <taskdef resource="net/sf/antcontrib/antlib.xml"/> - <for ... /> +
    • declare a bundle of tasks using an xml file holding these + taskname-ImplementationClass-pairs and <taskdef>
      + <taskdef resource="net/sf/antcontrib/antlib.xml"/> <for ... />
    • -
    • declare a bundle of tasks using an xml file named antlib.xml, XML namespace and - antlib: protocol handler -
      - <project xmlns:ac="antlib:net.sf.antcontrib"/> - <ac:for ... /> +
    • declare a bundle of tasks using an xml file named antlib.xml, XML namespace + and antlib: protocol handler
      + <project xmlns:ac="antlib:net.sf.antcontrib"/> <ac:for ... />
    If you need a special function, you should
    1. have a look at this manual, because Ant provides lot of tasks
    2. -
    3. have a look at the external task page online
    4. -
    5. have a look at the external task wiki - page
    6. -
    7. ask on the Ant user list
    8. +
    9. have a look at the external task page online
    10. +
    11. have a look at the external task wiki + page
    12. +
    13. ask on the Ant user list
    14. implement (and share) your own