diff --git a/manual/Integration/jext-plugin.html b/manual/Integration/jext-plugin.html index effb033bd..83628d5a2 100644 --- a/manual/Integration/jext-plugin.html +++ b/manual/Integration/jext-plugin.html @@ -29,26 +29,26 @@ by
-

You can download the plugin at: ftp://jext.sourceforge.net/pub/jext/plugins/AntWork.zip

+

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

-

Installation instructions from the Readme.txt:

+

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 the Ant messages are +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 the ant home +

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 +

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 text 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 e473d65b1..6a91c27e2 100644 --- a/manual/Tasks/BorlandEJBTasks.html +++ b/manual/Tasks/BorlandEJBTasks.html @@ -30,111 +30,107 @@

Description

The BorlandDeployTool is a vendor specific nested element for the Ejbjar optional task.

-

BorlandDeploymentTool is dedicated to the Borland Application Server 4.5.x and Borland - Enterprise Server 5.x. It generates and compiles the stubs and skeletons for all ejb described into the - Deployment Descriptor, builds the jar file including the support files and - verify whether the produced jar is valid or not.

+

BorlandDeploymentTool is dedicated to the Borland Application Server 4.5.x and Borland Enterprise +Server 5.x. It generates and compiles the stubs and skeletons for all EJBs described in the +Deployment Descriptor, builds the jar file including the support files and verifies whether the +produced jar is valid or not.

-

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

+

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

Borland element

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
destdirThe base directory into which the generated borland - ready jar files are depositedyesdestdirThe base directory in which the generated Borland ready jar files are storedYes
debugIf true, turn on the debug mode for each borland - tools (java2iiop, iastool ...) default = falsenodebugIf true, turn on the debug mode for each Borland tools + (java2iiop, iastool, ...)No; default false
verifyIf true, turn on the verification at the end - of the jar production (default = false)noverifyIf true, turn on the verification at the end of the jar production.No; default false
verifyargsextra parameter for verify commandnoverifyargsextra parameter for verify commandNo
suffixString value appended to the basename of the - deployment descriptor to create the filename of the Borland EJB jar file.No, defaults to '-ejb.jar'.suffixString value appended to the basename of the deployment descriptor to create the filename of + the Borland EJB jar file.No; defaults to -ejb.jar
basdtdDeprecated. Defines the location of the - DTD which covers the Borland specific deployment descriptors. - This should not be necessary if you have borland in your classpath. If you - do not, you should use a nested + basdtdDeprecated. Defines the location of the DTD which covers the Borland + specific deployment descriptors. This should not be necessary if you have borland in your + classpath. If you do not, you should use a nested <dtd> element, described in the ejbjar task documentation.noNo
ejbdtdDeprecated. Defines the location of the - ejb-jar DTD in the class hierarchy. This should not be necessary - if you have borland in your classpath. If you do not, you should use a - nested <dtd> element, - described in the ejbjar task - documentation.noejbdtdDeprecated. Defines the location of the ejb-jar DTD in the class + hierarchy. This should not be necessary if you have borland in your classpath. If you do not, + you should use a nested <dtd> element, + described in the ejbjar task documentation.No
generateclientIf true, turn on the generation of the corresponding - ejbjar (default = false)nogenerateclientIf true, turn on the generation of the corresponding EJB jar.No; default false
versionset the Borland Application Version. -
    -
  • 4 means B.A.S (Borland Application Server) 4.x, target will add ejb-inprise.xml file
  • -
  • 5 means B.E.S (Borland Application Server) 5.x, target will add ejb-borland.xml file
  • -
-
No, defaults to 4versionset the Borland Application Version. +
    +
  • 4 means B.A.S (Borland Application Server) 4.x, target will add ejb-inprise.xml file
  • +
  • 5 means B.E.S (Borland Application Server) 5.x, target will add ejb-borland.xml file
  • +
+
No; defaults to 4
java2iiopParamsIf filled, the params are added to the java2iiop command (ex: -no_warn_missing_define)nojava2iiopParamsIf filled, the params are added to the java2iiop command + (ex: -no_warn_missing_define)No

Examples

-

The following build.xml snippet is an example of how to use Borland element - into the ejbjar task

-
    <ejbjar srcdir="${build.classes}" basejarname="vsmp" descriptordir="${rsc.dir}/hrmanager">
-        <borland destdir="lib" verify="on" generateclient="on" version="5">
-          <classpath refid="classpath"/>
-        </borland>
-        <include name="**\ejb-jar.xml"/>
-        <support dir="${build.classes}">
-          <include name="demo\*.class"/>
-          <include name="demo\helper\*.class"/>
-         </support>
-     </ejbjar>
-
The borland element will generate into the lib dir an ejb jar file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory.
-The verify phase is turned on and the generate client phase as well.
-
+

The following build.xml snippet is an example of how to use Borland element in +the ejbjar task

+
+<ejbjar srcdir="${build.classes}" basejarname="vsmp" descriptordir="${rsc.dir}/hrmanager">
+    <borland destdir="lib" verify="on" generateclient="on" version="5">
+        <classpath refid="classpath"/>
+    </borland>
+    <include name="**\ejb-jar.xml"/>
+    <support dir="${build.classes}">
+        <include name="demo\*.class"/>
+        <include name="demo\helper\*.class"/>
+    </support>
+</ejbjar>
+

The borland element will generate into the lib directory an EJB jar +file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory. +The verify phase is turned on and the generate client phase as well.

diff --git a/manual/Tasks/BorlandGenerateClient.html b/manual/Tasks/BorlandGenerateClient.html index fe5021fb1..be616bf74 100644 --- a/manual/Tasks/BorlandGenerateClient.html +++ b/manual/Tasks/BorlandGenerateClient.html @@ -27,62 +27,61 @@

BorlandGenerateClient

by Benoit Moussaud (benoit.moussaud@criltelecom.com)

Description

-

The BorlandGenerateClient is a task dedicated to Borland Application Server - v 4.5. It offers to generate the client jar file corresponding to an ejb jar - file.

+

The BorlandGenerateClient is a task dedicated to Borland Application Server v 4.5. It offers to +generate the client jar file corresponding to an EJB jar file.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
ejbjarejb jar fileyesejbjarEJB jar fileyes
debugIf true, turn on the debug mode for each borland - tools (java2iiop, iastool ...) default = falsenodebugIf true, turn on the debug mode for each Borland tool + (java2iiop, iastool, ...)no; default false
clientjarclient jar file name. If missing the client jar - file name is build using the ejbjar file name: ejbjar = hellobean-ejb.jar - => hellobean-ejbclient.jarnoclientjarclient jar file name. If missing the client jar file name is build using + the ejbjar file name: ejbjar=hellobean-ejb.jar + ⇒ hellobean-ejbclient.jarno
modechoose the command launching mode. Two values: - java or fork. default = fork. java is not supported for version=5.Possibility to specify a classpath.nomodechoose the command launching mode. Two values: java or fork + (default). java is not supported for version=5. Possibility to + specify a classpath.no
versionset the Borland Application Version. -
    -
  • 4 means B.A.S (Borland Application Server 4.x)
  • -
  • 5 means B.E.S (Borland Application Server 5.x)
  • -
-
No, defaults to 4versionset the Borland Application Version. +
    +
  • 4 means B.A.S (Borland Application Server 4.x)
  • +
  • 5 means B.E.S (Borland Application Server 5.x)
  • +
+
No; defaults to 4

Examples

-

The following build.xml snippet is an example of how to use Borland element - into the ejbjar task using the java mode.

+

The following build.xml snippet is an example of how to use Borland element in +the ejbjar task using the fork mode.

-<blgenclient ejbjar="lib/secutest-ejb.jar" clientjar="lib/client.jar" debug="true" mode="fork"> version="5">
+<blgenclient ejbjar="lib/secutest-ejb.jar" clientjar="lib/client.jar" debug="true" mode="fork" version="5">
     <classpath>
         <pathelement location="mymodule.jar"/>
     </classpath>
-</blgenclient>
-
+</blgenclient> diff --git a/manual/Tasks/ant.html b/manual/Tasks/ant.html index 25f25a62b..3b06b1b94 100644 --- a/manual/Tasks/ant.html +++ b/manual/Tasks/ant.html @@ -27,307 +27,270 @@

Ant

Description

-

Runs Apache Ant on a supplied buildfile. This can be used to build -subprojects. This task must not be used outside of a -target if it invokes the same build file it is part +

Runs Apache Ant on a supplied buildfile. This can be used to build subprojects. This +task must not be used outside of a target if it invokes the same build file it is part of.

-

When the antfile attribute is omitted, the file "build.xml" -in the supplied directory (dir attribute) is used.

-

If no target attribute is supplied, the default target of the new project is -used.

-

By default, all of the properties of the current project will be -available in the new project. Alternatively, you can set the -inheritAll attribute to false and only -"user" properties (i.e., those passed on the command-line) -will be passed to the new project. In either case, the set of -properties passed to the new project will override the properties that -are set in the new project (See also the property task).

- -

You can also set properties in the new project from the old project -by using nested property tags. These properties are always passed -to the new project and any project created in that project -regardless of the setting of inheritAll. This allows you to -parameterize your subprojects.

- -

When more than one nested <property> element - would set a property of the same name, the one declared last will - win. This is for backwards compatibility reasons even so it is - different from the way <property> tasks in build - files behave.

+

When the antfile attribute is omitted, the file build.xml in the supplied +directory (dir attribute) is used.

+

If no target attribute is supplied, the default target of the new project is used.

+

By default, all of the properties of the current project will be available in the new project. +Alternatively, you can set the inheritAll attribute to false and only +"user" properties (i.e., those passed on the command-line) will be passed to the new +project. In either case, the set of properties passed to the new project will override the +properties that are set in the new project (See also the property +task).

+ +

You can also set properties in the new project from the old project by using +nested property tags. These properties are always passed to the new project and any +project created in that project regardless of the setting of inheritAll. This allows you +to parameterize your subprojects.

+ +

When more than one nested <property> element would set a property of the same +name, the one declared last will win. This is for backwards compatibility reasons even though it is +different from the way <property> tasks in build files behave.

Properties defined on the command line cannot be overridden by - nested <property> elements. Since Ant - 1.8.0 the same is true for nested structures - of <ant> tasks: if a build file A - invokes B via an <ant> task setting a - property with a nested <property> element - and B contains an <ant> tasks - invoking C, C will see the value set - in A, even if B used a - nested <property> element as well.

- -

References to data types can also be passed to the new project, but -by default they are not. If you set the inheritrefs attribute to -true, all references will be copied, but they will not override -references defined in the new project.

- -

Nested <reference> elements -can also be used to copy references from the calling project to the -new project, optionally under a different id. References taken from -nested elements will override existing references that have been -defined outside of targets in the new project - but not those defined -inside of targets.

+nested <property> elements. Since Ant 1.8.0, the same is true for +nested structures of <ant> tasks: if a build file A +invokes B via an <ant> task setting a property with a +nested <property> element and B contains an <ant> +tasks invoking C, C will see the value set in A, even +if B used a nested <property> element as well.

+ +

References to data types can also be passed to the new project, but by default they are not. If +you set the inheritrefs attribute to true, all references will be copied, but they +will not override references defined in the new project.

+ +

Nested <reference> elements can also be used to copy +references from the calling project to the new project, optionally under a different id. +References taken from nested elements will override existing references that have been defined +outside of targets in the new project—but not those defined inside of targets.

Parameters

- +
- - - + + + - - - + + + - - + - + - - - + + + - - + - + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
antfilethe buildfile to use. Defaults to - "build.xml". This file is expected to be a filename - relative to the dir attribute given.Noantfilethe buildfile to use. This file is expected to be a filename relative to the dir + attribute given.No; defaults to build.xml
dirthe directory to use as a basedir for the new Ant - project (unless useNativeBasedir is set to true). - Defaults to the current project's basedir, unless - inheritall has been set to false, in which case it doesn't - have a default value. This will override the basedir - setting of the called project.
- Also serves as the directory to resolve the antfile and output - attribute's values (if any). +
dirthe directory to use as a basedir for the new Ant project + (unless useNativeBasedir is set to true). This will override + the basedir setting of the called project.
Also serves as the directory to + resolve the antfile and output attribute's values (if any).
NoNo; defaults to the current project's basedir, unless inheritall has + been set to false, in which case it doesn't have a default value
targetthe target of the new Ant project that should be executed. - Defaults to the new project's default target.Notargetthe target of the new Ant project that should be executed.No; defaults to the new project's default target
outputFilename to write the Ant output to. This is - relative to the value of the dir attribute if it has been set or - to the base directory of the current project otherwise. + outputFilename to write the Ant output to. This is relative to the value of the dir + attribute if it has been set or to the basedir of the current project otherwise. NoNo
inheritAllIf true, pass all properties to the - new Ant project. Defaults to true.NoinheritAllIf true, pass all properties to the new Ant project.No; defaults to true
inheritRefsIf true, pass all references to the - new Ant project. Defaults to false.NoinheritRefsIf true, pass all references to the new Ant project.No; defaults to false
useNativeBasedirIf set to true, the child build will use the same - basedir as it would have used when run from the command line - (i.e. the basedir one would expect when looking at the child - build's buildfile). Defaults to false. since - Ant 1.8.0NouseNativeBasedirIf set to true, the child build will use the same basedir as it would have + used when run from the command line (i.e. the basedir one would expect when looking + at the child build's buildfile). Since Ant 1.8.0No; defaults to false

Parameters specified as nested elements

property

-

See the description of the property -task.
-These properties become equivalent to properties you define on -the command line. These are special properties and they will always get passed -down, even through additional <*ant*> tasks with inheritall set to -false (see above).
-Note that the refid attribute points to a -reference in the calling project, not in the new one.

+

See the description of the property task.
These properties +become equivalent to properties you define on the command line. These are special properties and +they will always get passed down, even through additional <*ant*> tasks +with inheritAll set to false (see above).
Note that the refid +attribute points to a reference in the calling project, not in the new one.

reference

-

Used to choose references that shall be copied into the new project, -optionally changing their id.

+

Used to choose references that shall be copied into the new project, optionally changing +their id.

- +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
refidThe id of the reference in the calling project.YesrefidThe id of the reference in the calling project.Yes
torefidThe id of the reference in the new project.No, defaults to the value of refid.torefidThe id of the reference in the new project.No; defaults to the value of refid

propertyset

-

You can specify a set of properties to be copied into the new -project with propertysets.

+

You can specify a set of properties to be copied into the new project +with propertysets.

since Ant 1.6.

target

-

You can specify multiple targets using nested <target> elements -instead of using the target attribute. These will be executed as if -Ant had been invoked with a single target whose dependencies are the -targets so specified, in the order specified.

- +

You can specify multiple targets using nested <target> elements instead of +using the target attribute. These will be executed as if Ant had been invoked with a +single target whose dependencies are the targets so specified, in the order specified.

+
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
nameThe name of the called target.YesnameThe name of the called target.Yes

since Ant 1.6.3.

Basedir of the new project

-

If you set useNativeBasedir to true, the basedir of - the new project will be whatever the basedir attribute of - the <project> element of the new project says (or - the new project's directory if the there is no basedir attribute) - - no matter what any other attribute of this task says and no matter - how deeply nested into levels of - <ant> invocations this task lives.

- -

If you haven't set useNativeBasedir or set it to - false, the following rules apply:

- -

The basedir value of the new project is affected by the two - attributes dir and inheritall as well as - the <ant> task's history. The current behaviour - is known to be confusing but cannot be changed without breaking - backwards compatibility in subtle ways.

- -

If the <ant> task is in a "top level" build - file, i.e. the project containing the <ant> task - has not itself been invoked as part of a - different <ant> (or <antcall>) - task "higher up", the following table shows the details:

+

If you set useNativeBasedir to true, the basedir of the new project will be +whatever the basedir attribute of the <project> element of the new +project says (or the new project's directory if the there is no basedir +attribute)—no matter what any other attribute of this task says and no matter how deeply +nested into levels of <ant> invocations this task lives.

+ +

If you haven't set useNativeBasedir or set it to false, the following rules +apply:

+ +

The basedir value of the new project is affected by the two attributes, dir +and inheritall, as well as the <ant> task's history. The current +behaviour is known to be confusing but cannot be changed without breaking backwards compatibility in +subtle ways.

+ +

If the <ant> task is in a "top level" build file, i.e. the project containing +the <ant> task has not itself been invoked as part of a +different <ant> (or <antcall>) task "higher up", the following +table shows the details:

- - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
dir attributeinheritAll attributenew project's basedirdir attributeinheritAll attributenew project's basedir
value providedtruevalue of dir attributevalue providedtruevalue of dir attribute
value providedfalsevalue of dir attributevalue providedfalsevalue of dir attribute
omittedtruebasedir of calling project (the one whose build - file contains the <ant> task).omittedtruebasedir of calling project (the one whose build + file contains the <ant> task).
omittedfalsebasedir attribute of the <project> element - of the new projectomittedfalsebasedir attribute of the <project> element + of the new project
-

If on the other hand the <ant> task is already - nested into another invocation, the parent invocation's settings - affect the outcome of the basedir value. The current task's dir - attribute will always win, but if the dir attribute has been omitted - an even more complex situation arises:

+

If on the other hand the <ant> task is already nested into another invocation, +the parent invocation's settings affect the outcome of the basedir value. The current +task's dir attribute will always win, but if the dir attribute has been +omitted an even more complex situation arises:

- - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + +
parent dir attributeparent inheritAll attributecurrent inheritAll attributenew project's basedirparent dir attributeparent inheritAll attributecurrent inheritAll attributenew project's basedir
value providedanyanyvalue of parent's dir attributevalue providedanyanyvalue of parent's dir attribute
omittedtruetruebasedir of parent project (the one whose build - file called the build file that contains - the current <ant> task).omittedtruetruebasedir of parent project (the one whose build file called the build file that + contains the current <ant> task).
omittedtruefalsebasedir of parent project (the one whose build - file called the build file that contains - the current <ant> task).omittedtruefalsebasedir of parent project (the one whose build file called the build file that + contains the current <ant> task).
omittedfalsetruebasedir of calling project (the one whose build - file contains the current <ant> task).omittedfalsetruebasedir of calling project (the one whose build file contains the + current <ant> task).
omittedfalsefalsebasedir attribute of the <project> element - of the new projectomittedfalsefalsebasedir attribute of the <project> element of the new + project
-

If you add even deeper levels of nesting, things get even more - complicated and you need to apply the above table recursively.

+

If you add even deeper levels of nesting, things get even more complicated and you need to apply +the above table recursively.

-

If the basedir of the outer most build has been specified as a - property on the command line (i.e. -Dbasedir=some-value - or a -propertyfile argument) the value provided will - get an even higher priority. For any <ant> task - that doesn't specify a dir attribute, the new project's basedir will - be the value specified on the command line - no matter how deeply - nested into layers of build files the task may be.

+

If the basedir of the outermost build has been specified as a property on the command +line (i.e. -Dbasedir=some-value or a -propertyfile argument) the value +provided will get an even higher priority. For any <ant> task that doesn't +specify a dir attribute, the new project's basedir will be the value specified +on the command line—no matter how deeply nested into layers of build files the task may +be.

-

The same happens if the basedir is specified as a - nested <property> of an <ant> - task. The basedir of build files started at deeper levels will be - set to the specified value of the property element unless the - corresponding Ant tasks set the dir attribute explicitly.

+

The same happens if the basedir is specified as a nested <property> +of an <ant> task. The basedir of build files started at deeper levels +will be set to the specified value of the property element unless the corresponding Ant tasks set +the dir attribute explicitly.

Examples

@@ -342,18 +305,16 @@ targets so specified, in the order specified.

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

These lines invoke the same build file:

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

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

+

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

 <path id="path1">
@@ -361,51 +322,38 @@ targets so specified, in the order specified.

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

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

+

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

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

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

+

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

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

as well as

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

will neither override path1 nor copy -path2.

+

will neither override path1 nor copy path2.

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

will override subbuild's definition of -path1.

+

will override subbuild's definition of path1.

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

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

+

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

diff --git a/manual/Tasks/antcall.html b/manual/Tasks/antcall.html index 08dab5a2b..24ac95094 100644 --- a/manual/Tasks/antcall.html +++ b/manual/Tasks/antcall.html @@ -27,147 +27,128 @@

AntCall

Description

-

Call another target within the same buildfile optionally -specifying some properties (params in this context). This -task must not be used outside of a target.

- -

By default, all of the properties of the current project will be -available in the new project. Alternatively, you can -set the inheritAll attribute to false and only -"user" properties (i.e., those passed on the command-line) -will be passed to the new project. In either case, the set of -properties passed to the new project will override the properties that -are set in the new project (See also the property task).

-

You can also set properties in the new project from the old project -by using nested param tags. These properties are always passed -to the new project and any project created in that project -regardless of the setting of inheritAll. This allows you to -parameterize your subprojects. Properties defined on the command line -can not be overridden by nested <param> elements.

- -

When more than one nested <param> element - would set a property of the same name, the one declared last will - win. This is for backwards compatibility reasons even so it is - different from the way <property> tasks in build - files behave.

- -

Nested <reference>; elements can -be used to copy references from the calling project to the new -project, optionally under a different id. References taken from -nested elements will override existing references that have been -defined outside of targets in the new project - but not those defined -inside of targets.

- -

-When a target is invoked by antcall, all of its dependent targets will -also be called within the context of any new parameters. For example. if -the target "doSomethingElse" depended on the target "init", then the -antcall of "doSomethingElse" will call "init" during the call. -Of course, any properties defined in the antcall task or inherited from the calling target -will be fixed and not overridable in the init task--or indeed in the "doSomethingElse" task. -

- -

The called target(s) are run in a new project; be aware that this -means properties, references, etc. set by called targets will not -persist back to the calling project.

- -

If the build file changes after you've started the build, the -behavior of this task is undefined.

+

Call another target within the same buildfile optionally specifying some properties (params in +this context). This task must not be used outside of a target.

+ +

By default, all of the properties of the current project will be available in the new project. +Alternatively, you can set the inheritAll attribute to false and only +"user" properties (i.e., those passed on the command-line) will be passed to the new +project. In either case, the set of properties passed to the new project will override the +properties that are set in the new project (see also the property +task).

+

You can also set properties in the new project from the old project by using +nested <param> tags. These properties are always passed to the new project and +any project created in that project regardless of the setting of inheritAll. This allows +you to parameterize your subprojects. Properties defined on the command line can not be overridden +by nested <param> elements.

+ +

When more than one nested <param> element would set a property of the same +name, the one declared last will win. This is for backwards compatibility reasons even so it is +different from the way <property> tasks in build files behave.

+ +

Nested <reference>; elements can be used to copy +references from the calling project to the new project, optionally under a different id. +References taken from nested elements will override existing references that have been defined +outside of targets in the new project—but not those defined inside of targets.

+ +

When a target is invoked by antcall, all of its dependent targets will also be +called within the context of any new parameters. For example. if the target doSomethingElse; +depended on the target init, then the antcall of doSomethingElse will +call init during the call. Of course, any properties defined in the antcall +task or inherited from the calling target will be fixed and not overridable in the init +target—or indeed in the doSomethingElse target.

+ +

The called target(s) are run in a new project; be aware that this means properties, references, +etc. set by called targets will not persist back to the calling project.

+ +

If the build file changes after you've started the build, the behavior of this task is +undefined.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
targetThe target to execute.YestargetThe target to execute.Yes
inheritAllIf true, pass all properties to the new Apache Ant - project. Defaults to true. - NoinheritAllIf true, pass all properties to the new Apache Ant project.No; defaults to true
inheritRefsIf true, pass all references to the - new Ant project. Defaults to false.NoinheritRefsIf true, pass all references to the new Ant project.No; defaults to false

Note on inheritRefs

-

<antcall> will not override existing references, -even if you set inheritRefs to true. As the called build -files is the same build file as the calling one, this means it will -not override any reference set via an id attribute at -all. The only references that can be inherited by the child project -are those defined by nested <reference> elements or -references defined by tasks directly (not using the id -attribute).

+

<antcall> will not override existing references, even if you +set inheritRefs to true. As the called build files is the same build file as the calling +one, this means it will not override any reference set via an id attribute at all. The +only references that can be inherited by the child project are those defined by +nested <reference> elements or references defined by tasks directly (not using +the id attribute).

Parameters specified as nested elements

param

-

Specifies the properties to set before running the specified target. See property for usage guidelines.
-These properties become equivalent to properties you define on -the command line. These are special properties and they will always get passed -down, even through additional <*ant*> tasks with inheritall set to -false (see above). -

+

Specifies the properties to set before running the specified +target. See property for usage guidelines.
These properties become +equivalent to properties you define on the command line. These are special properties and they will +always get passed down, even through additional <*ant*> tasks +with inheritAll set to false (see above).

reference

-

Used to choose references that shall be copied into the new project, -optionally changing their id.

+

Used to choose references that shall be copied into the new project, optionally changing +their id.

- +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
refidThe id of the reference in the calling project.YesrefidThe id of the reference in the calling project.Yes
torefidThe id of the reference in the new project.No, defaults to the value of refid.torefidThe id of the reference in the new project.No; defaults to the value of refid

propertyset

-

You can specify a set of properties to be copied into the new -project with propertysets.

+

You can specify a set of properties to be copied into the new project +with propertysets.

since Ant 1.6.

target

-

You can specify multiple targets using nested <target> elements -instead of using the target attribute. These will be executed as if -Ant had been invoked with a single target whose dependencies are the -targets so specified, in the order specified.

- +

You can specify multiple targets using nested <target> elements instead of +using the target attribute. These will be executed as if Ant had been invoked with a +single target whose dependencies are the targets so specified, in the order specified.

+
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
nameThe name of the called target.YesnameThe name of the called target.Yes

since Ant 1.6.3.

@@ -182,18 +163,16 @@ targets so specified, in the order specified.

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

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

+</target> +

Will run the target doSomethingElse and echo param1=value.

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

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

+

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

diff --git a/manual/Tasks/antlr.html b/manual/Tasks/antlr.html index 55277c85c..0ec561f8f 100644 --- a/manual/Tasks/antlr.html +++ b/manual/Tasks/antlr.html @@ -26,175 +26,122 @@

ANTLR

Description

-

- Invokes the ANTLR Translator generator - on a grammar file. -

-

- To use the ANTLR task, set the target attribute to the name of the - grammar file to process. Optionally, you can also set the - outputdirectory to write the generated file to a specific directory. - Otherwise ANTLR writes the generated files to the directory containing - the grammar file. -

-

- This task only invokes ANTLR if the grammar file (or the - supergrammar specified by the glib attribute) is newer than the - generated files. -

-

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

-

Antlr 2.7.1 Note: - - To successfully run ANTLR, your best option is probably to build the whole - jar with the provided script mkalljar and drop the resulting jar (about 300KB) - into ${ant.home}/lib. Dropping the default jar (70KB) is probably not enough - for most needs and your only option will be to add ANTLR home directory - to your classpath as described in ANTLR install.html document. - -

-

Antlr 2.7.2 Note: - - Instead of the above, you will need antlrall.jar that can be created - by the antlr-all.jar target of the Makefile provided with the - download. - -

+

Invokes the ANTLR Translator generator on a +grammar file.

+

To use the ANTLR task, set the target attribute to the name of the grammar file to +process. Optionally, you can also set the outputdirectory to write the generated file to +a specific directory. Otherwise ANTLR writes the generated files to the directory containing the +grammar file.

+

This task only invokes ANTLR if the grammar file (or the supergrammar specified by +the glib attribute) is newer than the generated files.

+

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

+

Antlr 2.7.2 Note: You will need antlrall.jar that can be created by +the antlr-all.jar target of the Makefile provided with the download.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
targetThe grammar file to process.YestargetThe grammar file to process.Yes
outputdirectory - The directory to write the generated files to. If not set, the files - are written to the directory containing the grammar file. - NooutputdirectoryThe directory to write the generated files to.No; defaults to the directory containing the grammar file
glib - An optional super grammar file that the target grammar overrides. This - feature is only needed for advanced vocabularies. - NoglibAn optional super grammar file that the target grammar overrides. This feature is only + needed for advanced vocabularies.No
debug - When set to "yes", this flag adds code to the generated parser that will - launch the ParseView debugger upon invocation. The default is "no". -
- Note: ParseView is a separate component that needs to be installed or your - grammar will have compilation errors. -
NodebugWhen set to yes, this flag adds code to the generated parser that will launch the + ParseView debugger upon invocation.
Note: ParseView is a separate component that needs + to be installed or your grammar will have compilation errors.
No; default is no
html - Emit an html version of the grammar with hyperlinked actions. - NohtmlEmit an HTML version of the grammar with hyperlinked actions.No
diagnostic - Generates a text file with debugging information based on the target grammar. - NodiagnosticGenerate a text file with debugging information based on the target grammar.No
trace - Forces all rules to call traceIn/traceOut if set to "yes". - The default is "no". - NotraceForce all rules to call traceIn/traceOut if set to yes.No; default is no
traceParser - Only forces parser rules to call traceIn/traceOut if set to "yes". - The default is "no". - NotraceParserOnly force parser rules to call traceIn/traceOut if set to yes.No; default is no
traceLexer - Only forces lexer rules to call traceIn/traceOut if set to "yes". - The default is "no". - NotraceLexerOnly force lexer rules to call traceIn/traceOut if set to yes.No; default is no
traceTreeWalker - Only forces tree walker rules to call traceIn/traceOut if set to - "yes". The default is "no". - NotraceTreeWalkerOnly force tree walker rules to call traceIn/traceOut if set to yes.No; default is no
dirThe directory to invoke the VM in. NodirThe directory to invoke JVM in.No

Nested Elements

-

ANTLR supports a nested <classpath> -element, that represents a PATH like -structure. It is given as a convenience if you have to specify -the original ANTLR directory. In most cases, dropping the appropriate -ANTLR jar in the normal Ant lib repository will be enough.

+

ANTLR supports a nested <classpath> element, that represents +a path-like structure. It is given as a convenience if you have to +specify the original ANTLR directory. In most cases, dropping the appropriate ANTLR jar in the +normal Ant lib repository will be enough.

jvmarg

-

Additional parameters may be passed to the new -VM via nested <jvmarg> attributes, for example:

+

Additional parameters may be passed to the new JVM via +nested <jvmarg> attributes, for example:

 <antlr target="...">
   <jvmarg value="-Djava.compiler=NONE"/>
   ...
-</antlr>
-
+</antlr> -

would run ANTLR in a VM without JIT.

+

would run ANTLR in a JVM without JIT.

-

<jvmarg> allows all attributes described in Command line arguments.

+

<jvmarg> allows all attributes described +in Command line arguments.

Example

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

- This invokes ANTLR on grammar file etc/java.g, writing the generated - files to build/src. -

+ outputdirectory="build/src"/> +

This invokes ANTLR on grammar file etc/java.g, writing the generated files +to build/src.

diff --git a/manual/Tasks/antstructure.html b/manual/Tasks/antstructure.html index 3d525bb1b..b90324448 100644 --- a/manual/Tasks/antstructure.html +++ b/manual/Tasks/antstructure.html @@ -27,50 +27,46 @@

AntStructure

Description

-

Generates an DTD for Apache Ant buildfiles which contains information -about all tasks currently known to Ant.

- -

Actually the DTD will not be a real DTD for buildfiles since Ant's -usage of XML cannot be captured with a DTD. Several elements in Ant -can have different attribute lists depending on the element that -contains them. "fail" for example can be the task or the nested child element of the sound task. Don't consider the -generated DTD something to rely upon.

- -

Also note that the DTD generated by this task is incomplete, you can -always add XML entities using <taskdef> or <typedef>. See Generates an DTD for Apache Ant buildfiles which contains information about all tasks currently +known to Ant.

+ +

Actually the DTD will not be a real DTD for buildfiles since Ant's usage of XML cannot be +captured with a DTD. Several elements in Ant can have different attribute lists depending on the +element that contains them. <fail> for example can be a +task or a nested child element of the <sound> +task. Don't consider the generated DTD something to rely upon.

+ +

Also note that the DTD generated by this task is incomplete, you can always add XML entities +using <taskdef> +or <typedef>. +See here for a way to get around this problem.

-

This task doesn't know about required attributes, all will be -listed as #IMPLIED.

+

This task doesn't know about required attributes, all will be listed +as #IMPLIED.

-

Since Ant 1.7 custom structure printers can be used -instead of the one that emits a DTD. In order to plug in your own -structure, you have to implement the interface -org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter -and <typedef> your class and use the new type as a nested -element of this task - see the example below. +

Since Ant 1.7 custom structure printers can be used instead of the one that emits a DTD. +In order to plug in your own structure, you have to implement the +interface org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter +and <typedef> your class and use the new type as a nested element of this +task—see the example below.

Parameters

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
outputfile to write the DTD to.Yesoutputfile to write the DTD to.Yes

Examples

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

Emitting your own structure instead of a DTD

+

Emitting your own structure instead of a DTD

First you need to implement the interface

@@ -79,20 +75,18 @@ package org.example; import org.apache.tools.ant.taskdefs.AntStructure; public class MyPrinter implements AntStructure.StructurePrinter { ... -} - +}

and then use it via typedef

-  <typedef name="myprinter" classname="org.example.MyPrinter" />
-  <antstructure output="project.my">
-    <myprinter />
-  </antstructure>
-
- -

Your own StructurePrinter can accept attributes and nested elements -just like any other Ant type or task.

+<typedef name="myprinter" classname="org.example.MyPrinter"/> +<antstructure output="project.my"> + <myprinter/> +</antstructure> + +

Your own StructurePrinter can accept attributes and nested elements just like any other Ant type +or task.

diff --git a/manual/Tasks/antversion.html b/manual/Tasks/antversion.html index ee1bece88..f7cc4a1aa 100644 --- a/manual/Tasks/antversion.html +++ b/manual/Tasks/antversion.html @@ -26,57 +26,51 @@

Antversion

Description

-

-Stores the Apache Ant version (when used as task) or checks for a specific Ant version -(when used as condition). -Since Ant 1.7.0 -

+

Stores the Apache Ant version (when used as task) or checks for a +specific Ant version (when used as condition). Since Ant +1.7.0

- +
- - - - + + + - - - - + + - - - + + + + - - - - + + + + + + + + +
AttributeDescriptionRequired (Task)Required (Condition)AttributeDescriptionRequired
atleastThe version that this Ant is of at least. - The format is major.minor.point.NoExactly one of theseTaskCondition
exactlyThe version that this Ant is of exactly. - The format is major.minor.point.NoatleastThe version that this Ant is of at least. The format + is major.minor.point.NoExactly one of these
propertyThe name of the property to set.YesNo (ignored)exactlyThe version that this Ant is of exactly. The format is major.minor.point.No
propertyThe name of the property to set.YesIgnored

Examples

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

Stores the current Ant version in the property antversion.

+
<antversion property="antversion"/>
+

Stores the current Ant version in the property antversion.

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

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

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

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

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

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

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

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

@@ -85,10 +79,9 @@ would match.

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

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

+</condition> +

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

diff --git a/manual/Tasks/apply.html b/manual/Tasks/apply.html index 0ed887926..c9f59a957 100644 --- a/manual/Tasks/apply.html +++ b/manual/Tasks/apply.html @@ -24,380 +24,327 @@ -

Apply/ExecOn

-

The name execon is deprecated and only kept for backwards -compatibility.

+

Apply

+

The name execon is deprecated and only kept for backwards +compatibility.

Description

-

Executes a system command. When the os attribute is specified, then -the command is only executed when Apache Ant is run on one of the specified operating -systems.

+

Executes a system command. When the os attribute is specified, then the command is +only executed when Apache Ant is run on one of the specified operating systems.

-

The files and/or directories of a number of Resource Collections -– including but not restricted to - FileSets, - DirSets - (since Ant 1.6) or - FileLists - (since Ant 1.6) -– are passed as arguments to the system command.

-

If you specify a nested mapper, -the timestamp of each source file is compared to the timestamp of a -target file which is defined by the nested mapper element and searched -for in the given dest, if specified.

-

At least one fileset or filelist is required, -and you must not specify more than one mapper.

+

The files and/or directories of a number of Resource +Collections –- including but not restricted +to FileSets, DirSets +(since Ant 1.6) or FileLists (since Ant 1.6) +–- are passed as arguments to the system command.

+

If you specify a nested mapper, the timestamp of each source +file is compared to the timestamp of a target file which is defined by the +nested mapper element and searched for in the given dest, if specified.

+

At least one fileset or filelist is required, and you must not specify +more than one mapper.

-

Note that you cannot interact with the forked program, the only way -to send input to it is via the input and inputstring attributes.

+

Note that you cannot interact with the forked program, the only way to send input to it is via +the input and inputstring attributes.

-

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

+

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

-

If you run Ant as a background process (like ant &) - and use the <apply> task with spawn - set to false, you must provide explicit input to the - forked process or Ant will be suspended because it tries to read - from the standard input.

+

If you run Ant as a background process (like ant &) and use +the <apply> task with spawn set to false, you must provide +explicit input to the forked process or Ant will be suspended because it tries to read from the +standard input.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
executablethe command to execute without any command line - arguments.Yesexecutablethe command to execute without any command line arguments.Yes
destthe directory where the command is expected to place - target files when it is executed. This attribute is valid only when used - in conjunction with a nested mapper; if omitted, the target filenames - returned by the mapper will be interpreted as absolute paths.Nodestthe directory where the command is expected to place target files when it is executed.No; ignored unless a nested mapper is specified; by default, the target filenames returned + by the mapper will be interpreted as absolute paths
spawnwhether or not you want the commands to be spawned.
- If you spawn a command, its output will not be logged by Ant.
- The input, output, error, and result property settings are not active when spawning a process.
- since Ant 1.6 -
No, default is falsespawnwhether or not you want the commands to be spawned.
If you spawn a command, its output + will not be logged by Ant.
The input, output, error, and result property settings are not + active when spawning a process.
since Ant 1.6
No; default is false
dirthe directory in which the command should be executed.No.
- Note: the default used when dir has not been - specified depends on the vmlauncher attribute. If - vmlauncher is true the task will use - the current working directory, otherwise it uses the project's basedir. -
dirthe directory in which the command should be executed.No; if vmlauncher is true, defaults to the current working directory, + otherwise the project's basedir
relativewhether the filenames should be passed on the - command line as relative pathnames (relative to the base directory - of the corresponding fileset/list for source files or the - dest attribute for target files).No, default is falserelativewhether the filenames should be passed on the command line as relative pathnames (relative + to the base directory of the corresponding fileset/list for source files or + the dest attribute for target files).No; default is false
forwardslashwhether the file names should be passed - with forward slashes even if the operating system requires other - file separator. The option is ignored if the system file separator - is a forward slash.No, default is falseforwardslashwhether the file names should be passed with forward slashes even if the operating system + requires other file separator. The option is ignored if the system file separator is a forward + slash.No; default is false
oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
osfamilyOS family as used in the <os> condition. + osfamilyOS family as used in the <os> condition. since Ant 1.7NoNo
outputthe file to which the output of the command - should be redirected. If the error stream is not also redirected - to a file or property, it will appear in this output.Nooutputthe file to which the output of the command should be redirected. If the error stream is + not also redirected to a file or property, it will appear in this output.No
errorThe file to which the standard error of the - command should be redirected. since Ant 1.6NoerrorThe file to which the standard error of the command should be redirected. since Ant + 1.6No
logErrorThis attribute is used when you wish to see error - output in Ant's log and you are redirecting output to a - file/property. The error output will not be included in the output - file/property. If you redirect error with the "error" or - "errorProperty" attributes, this will have no effect. - since Ant 1.6NologErrorThis attribute is used when you wish to see error output in Ant's log and you are + redirecting output to a file/property. The error output will not be included in the output + file/property. If you redirect error with the error or errorProperty + attributes, this will have no effect. since Ant 1.6No
appendwhether output should be appended to or overwrite - an existing file. If you set parallel to false, you will probably - want to set this one to true.No, default is falseappendwhether output should be appended to or overwrite an existing file. If you + set parallel to false, you will probably want to set this one + to true.No; default is false
outputpropertythe name of a property in which the output of the - command should be stored. Unless the error stream is redirected - to a separate file or stream, this property will include the error + outputpropertythe name of a property in which the output of the command should be stored. Unless the + error stream is redirected to a separate file or stream, this property will include the error output.NoNo
errorpropertyThe name of a property in which the standard error of the - command should be stored. since Ant 1.6NoerrorpropertyThe name of a property in which the standard error of the command should be + stored. since Ant 1.6No
inputA file from which the executed command's standard - input is taken. This attribute is mutually exclusive with the - inputstring attribute. since Ant 1.6NoinputA file from which the executed command's standard input is taken. This attribute is mutually + exclusive with the inputstring attribute. since Ant 1.6No
inputstringA string which serves as the input stream for the - executed command. This attribute is mutually exclusive with the - input attribute. since Ant 1.6NoinputstringA string which serves as the input stream for the executed command. This attribute is + mutually exclusive with the input attribute. since Ant 1.6No
resultpropertythe name of a property in which the return code - of the command should be stored. Only of interest if - failonerror=false. If you set parallel to false, only the result - of the first execution will be stored.Noresultpropertythe name of a property in which the return code of the command should be stored. Only of + interest if failonerror is false. If you set parallel + to false, only the result of the first execution will be stored.No
timeoutStop the command if it doesn't finish within the - specified time (given in milliseconds).NotimeoutStop the command if it doesn't finish within the specified time (given in + milliseconds).No
failonerrorStop the buildprocess if the command exits with a - returncode other than 0.NofailonerrorStop the build process if the command exits with a return code other than 0.No
failifexecutionfailsStop the build if we can't start the program. - Defaults to true.NofailifexecutionfailsStop the build if we can't start the program.No; defaults to true
skipemptyfilesetsDon't run the command, if no source files have - been found or are newer than their corresponding target - files. Despite its name, this attribute applies to filelists as + skipemptyfilesetsDon't run the command, if no source files have been found or are newer than their + corresponding target files. Despite its name, this attribute applies to filelists as well.No, default is false
parallelRun the command only once, appending all files as - arguments. If false, command will be executed once for every file.No, default is false
typeOne of file, dir or - both. If set to file, only the names of plain - files will be sent to the command. If set to dir, only - the names of directories are considered.
- Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
No, default is file
newenvironmentDo not propagate old environment when new environment - variables are specified.No, default is false
vmlauncherRun command using the Java VM's execution facilities - where available. If set to false the underlying OS's shell, - either directly or through the antRun scripts, will be used. - Under some operating systems, this gives access to facilities - not normally available through the VM including, under Windows, - being able to execute scripts, rather than their associated - interpreter. If you want to specify the name of the - executable as a relative path to the directory given by the - dir attribute, it may become necessary to set vmlauncher to - false as well.No, default is true
resolveExecutableWhen this attribute is true, the name of the - executable if resolved firstly against the project basedir and if - that does not exist, against the execution directory if - specified. On Unix systems, if you only want to allow execution of - commands in the user's path, set this to false. + No; default is false
parallelRun the command only once, appending all files as arguments. If false, command will + be executed once for every file.No; default is false
typeOne of file, dir or both. If set to file, only the names of + plain files will be sent to the command. If set to dir, only the names of directories + are considered.
+ Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
No; default is file
newenvironmentDo not propagate old environment when new environment variables are specified.No; default is false
vmlauncherRun command using the JVM's execution facilities where available. If set to false the + underlying OS's shell, either directly or through the antRun scripts, will be + used. Under some operating systems, this gives access to facilities not normally available + through JVM including, under Windows, being able to execute scripts, rather than their + associated interpreter. If you want to specify the name of the executable as a relative path + to the directory given by the dir attribute, it may become necessary to + set vmlauncher to false as well.No; default is true
resolveExecutableWhen this attribute is true, the name of the executable if resolved firstly against + the project basedir and if that does not exist, against the execution directory if + specified. On Unix systems, if you only want to allow execution of commands in the user's + path, set this to false. since Ant 1.6No, default is falseNo; default is false
maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Since Ant 1.6.No, unlimited by defaultmaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited. Since Ant 1.6.No, unlimited by default
addsourcefileWhether source file names should be added to the - command automatically. Since Ant 1.6.No, default is trueaddsourcefileWhether source file names should be added to the command automatically. Since Ant + 1.6.No; default is true
verboseWhether to print a summary after execution or not. - Since Ant 1.6.No, default falseverboseWhether to print a summary after execution or not. Since Ant 1.6.No; default is false
ignoremissingWhether to ignore nonexistent files specified - via filelists. Since Ant 1.6.2.No, default is trueignoremissingWhether to ignore nonexistent files specified via filelists. Since Ant 1.6.2.No; default is true
forceWhether to bypass timestamp comparisons - for target files. Since Ant 1.6.3.No, default is falseforceWhether to bypass timestamp comparisons for target files. Since Ant 1.6.3.No; default is false

Parameters specified as nested elements

fileset

-

You can use any number of nested <fileset> -elements to define the files for this task and refer to -<fileset>s defined elsewhere.

+

You can use any number of nested <fileset> elements to define the files for +this task and refer to <fileset>s defined elsewhere.

filelist

Since Ant 1.6

-

You can use any number of nested <filelist> -elements to define the files for this task and refer to -<filelist>s defined elsewhere.

+

You can use any number of nested <filelist> elements to define the files for +this task and refer to <filelist>s defined elsewhere.

dirset

Since Ant 1.6

-

You can use any number of nested <dirset> -elements to define the directories for this task and refer to -<dirset>s defined elsewhere.

+

You can use any number of nested <dirset> elements to define the directories +for this task and refer to <dirset>s defined elsewhere.

-

Any other Resource -Collection

+

Any other Resource Collection

since Ant 1.7

You can use any number of nested resource collections.

mapper

-

A single <mapper> specifies the target files relative -to the dest attribute for dependency checking. If the -dest attribute is specified it will be used as a base directory -for resolving relative pathnames returned by the mapper. At least one +

A single <mapper> specifies the target files relative to the dest +attribute for dependency checking. If the dest attribute is specified it will be used as +a base directory for resolving relative pathnames returned by the mapper. At least one <fileset> or <filelist> is required.

arg

-

Command line arguments should be specified as nested -<arg> elements. See Command line arguments.

+

Command line arguments should be specified as nested <arg> +elements. See Command line arguments.

srcfile

-

By default the file names of the source files will be added to the -end of the command line (unless you set addsourcefile to -false). If you need to place it somewhere different, -use a nested <srcfile> element between your -<arg> elements to mark the insertion point.

- +

By default the file names of the source files will be added to the end of the command line +(unless you set addsourcefile to false). If you need to place it somewhere different, use a +nested <srcfile> element between your <arg> elements to mark +the insertion point.

+
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
prefixa prefix to place in front of the file name when - building the command line argument. Since Ant 1.8.0No.prefixa prefix to place in front of the file name when building the command line + argument. Since Ant 1.8.0No
suffixa suffix to append to the file name when - building the command line argument. Since Ant 1.8.0No.suffixa suffix to append to the file name when building the command line argument. Since Ant + 1.8.0No

targetfile

-

<targetfile> is similar to -<srcfile> and marks the position of the target -filename on the command line. If omitted, the target filenames will -not be added to the command line at all. This element can only be -specified if you also define a nested mapper.

- +

<targetfile> is similar to <srcfile> and marks the position +of the target filename on the command line. If omitted, the target filenames will not be added to +the command line at all. This element can only be specified if you also define a nested mapper.

+
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
prefixa prefix to place in front of the file name when - building the command line argument. Since Ant 1.8.0No.prefixa prefix to place in front of the file name when building the command line + argument. Since Ant 1.8.0No
suffixa suffix to append to the file name when - building the command line argument. Since Ant 1.8.0No.suffixa suffix to append to the file name when building the command line argument. Since Ant + 1.8.0No

env

-

It is possible to specify environment variables to pass to the -system command via nested <env> elements. See the -description in the section about exec

+

It is possible to specify environment variables to pass to the system command via +nested <env> elements. See the description in the section +about exec

redirector

Since Ant 1.6.2 -

A nested I/O Redirector -can be specified. <apply>'s behavior is like that of -exec with regard to -redirectors, with the exception that, in non-parallel mode, -file mapping will take place with each iteration. This grants the -user the capacity to receive input from, and send output to, different -files for each sourcefile. -

-

In parallel-mode the redirector will be reset for each batch - of executions (with maxparallel > 0) and null will be used - a source file just like it is in the case of exec.

+

A nested I/O Redirector can be specified. <apply>'s +behavior is like that of exec with regard to redirectors, with +the exception that, in non-parallel mode, file mapping will take place with each +iteration. This grants the user the capacity to receive input from, and send output to, different +files for each sourcefile.

+

In parallel mode the redirector will be reset for each batch of executions +(with maxparallel > 0) and null will be used a source file just like it is in the case +of exec.

Examples

 <apply executable="ls">
@@ -408,12 +355,10 @@ files for each sourcefile.
     </patternset>
   </fileset>
   <fileset refid="other.files"/>
-</apply>
-
-

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

+</apply> +

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

 <apply executable="somecommand" parallel="false">
   <arg value="arg1"/>
@@ -422,11 +367,10 @@ the command line.

<fileset dir="/tmp"/> </apply>
-

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

+

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

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

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

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

+</apply> +

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

 <mapper id="out" type="glob"
            from="src${file.separator}*.file"
@@ -453,17 +395,15 @@ the .o and SOURCEFILE with the absolute name of the
   <redirector>
     <outputmapper refid="out"/>
   </redirector>
-</apply>
-
-Applies the fictitious "processfile" executable to all -files matching *.file in the src directory. -The out <mapper> has been set up to map -*.file to *.out, then this <mapper> -is used to specify targetfiles for this <apply> -task. A reference to out is then used as an -<outputmapper> nested in a <redirector>, which in turn is -nested beneath this <apply> instance. This allows us to perform -dependency checking against output files--the target files in this case. +</apply> +

Applies the fictitious processfile executable to all files +matching *.file in the src directory. +The out <mapper> has been set up to map *.file +to *.out, then this <mapper> is used to +specify targetfiles for this <apply> task. A reference to out is +then used as an <outputmapper> nested in a <redirector>, which +in turn is nested beneath this <apply> instance. This allows us to perform +dependency checking against output files—the target files in this case.

 <apply executable="ls" parallel="true"
        force="true" dest="${basedir}" append="true" type="both">
@@ -471,10 +411,9 @@ dependency checking against output files--the target files in this case.
     <pathelement path="${env.PATH}"/>
   </path>
   <identitymapper/>
-</apply>
-
-Applies the "ls" executable to all directories in the PATH, effectively -listing all executables that are available on the PATH. +</apply> +

Applies the ls executable to all directories in the PATH, effectively +listing all executables that are available on the PATH.

 <apply executable="jsmin" addsourcefile="false">
@@ -487,12 +426,10 @@ listing all executables that are available on the PATH.
         <!-- redirect STDOUT to file in dest-dir -->
         <outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/>
     </redirector>
-</apply>
-
-Conversion of the command jsmin < src/a.js > dest/a.js but for -all files in the src-directory. Because the filename itself should not be passed -to the jsmin program, the addsourcefile is set to -false. +</apply> +

Conversion of the command jsmin < src/a.js > dest/a.js but for all files in +the src directory. Because the filename itself should not be passed to +the jsmin program, the addsourcefile is set to false.

diff --git a/manual/Tasks/attrib.html b/manual/Tasks/attrib.html index dc8d73479..79ea43178 100644 --- a/manual/Tasks/attrib.html +++ b/manual/Tasks/attrib.html @@ -28,20 +28,18 @@

Since Apache Ant 1.6.

Description

-

Changes the attributes of a file or all files inside specified -directories. Right now it has effect only under Windows. Each of the -4 possible permissions has its own attribute, matching the arguments -for the attrib command.

+

Changes the attributes of a file or all files inside specified directories. Right now it has +effect only under Windows. Each of the 4 possible permissions has its own attribute, matching the +arguments for the attrib command.

-

FileSets, -DirSets or FileLists can be specified using -nested <fileset>, <dirset> and -<filelist> elements.

+

FileSets, DirSets +or FileLists can be specified using +nested <fileset>, <dirset> and <filelist> +elements.

-

Since Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

+

Since Ant 1.7, this task supports +arbitrary Resource Collections as nested +elements.

-

By default this task won't do anything unless it detects it is - running on a Windows system. If you know for sure that you have a - "attrib" executable on your PATH that is command line compatible with - the Windows command, you can use the task's os attribute and set its - value to your current os.

+

By default this task won't do anything unless it detects it is running on a Windows system. If +you know for sure that you have a attrib executable on your PATH that is +command line compatible with the Windows command, you can use the task's os attribute and +set its value to your current OS.

-

See the setpermissions task for a - platform independent alternative.

+

See the setpermissions task for a platform independent +alternative.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + - + nested dirsets—dirsets always implicitly assume type to + be dir. + - - - + + + - - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
filethe file or directory of which the permissions must be - changed.Yes, or nested - <fileset/list> elementsfilethe file or directory of which the permissions must be changed.Yes, or nested <fileset/list> elements
readonlythe readonly permission.At least one of the fourreadonlythe readonly permission.At least one of the four
archivethe archive permission.archivethe archive permission.
systemthe system permission.systemthe system permission.
hiddenthe hidden permission.hiddenthe hidden permission.
typeOne of file, dir or both. If set to - file, only the permissions of plain files are going to be changed. - If set to dir, only the directories are considered.
+
typeOne of file, dir or both. If set to file, only the permissions + of plain files are going to be changed. If set to dir, only the directories are + considered.
Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
No, default is fileNo; default is file
verboseWhether to print a summary after execution or not. - Defaults to false.NoverboseWhether to print a summary after execution or not.No; defaults to false
oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
osfamilyOS family as used in - the <os> + osfamilyOS family as used in the <os> condition.No - defaults to "windows"No; defaults to windows

Examples

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

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

+ +

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

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

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

+</attrib> + +

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

+
 <attrib readonly="true" archive="true">
   <fileset dir="shared/sources1">
     <exclude name="**/trial/**"/>
   </fileset>
   <fileset refid="other.shared.sources"/>
-</attrib>
-
+</attrib> -

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

+

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

diff --git a/manual/Tasks/augment.html b/manual/Tasks/augment.html index 6699be84b..6dee4be1b 100644 --- a/manual/Tasks/augment.html +++ b/manual/Tasks/augment.html @@ -27,57 +27,48 @@

Augment

Description

-

Modify an existing reference by adding nested elements or (re-)assigning properties -mapped as XML attributes. This is an unusual task that makes use of Ant's internal -processing mechanisms to reload a previously declared reference by means of the 'id' -attribute, then treats the declared augment element as though it were the -original element. -Since Apache Ant 1.8.1

+

Modify an existing reference by adding nested elements or (re-)assigning properties mapped as XML +attributes. This is an unusual task that makes use of Ant's internal processing mechanisms to reload +a previously declared reference by means of the id attribute, then treats the +declared augment element as though it were the original element. Since Apache Ant +1.8.1

Parameters

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
idThe id of the reference to augment. If no such reference has - been declared a BuildException is generated.YesidThe id of the reference to augment. If no such reference has been declared + a BuildException is thrown.Yes
-

-Additional permissible attributes are dependent on the reference to be modified. -

+

Additional permissible attributes are dependent on the reference to be modified.

Parameters specified as nested elements

-

-Permissible nested elements are dependent on the reference to be modified. -

+

Permissible nested elements are dependent on the reference to be modified.

Examples

-Given -
-  <fileset id="input-fs" dir="${basedir}" />
-
+

Given

-
-  <augment id="input-fs" excludes="foo" />
-
+
<fileset id="input-fs" dir="${basedir}"/>
+ +
<augment id="input-fs" excludes="foo"/>
-

Modifies the excludes attribute of input-fs.

+

modifies the excludes attribute of input-fs.

-  <augment id="input-fs">
-    <filename name="bar" />
-  </augment>
-
+<augment id="input-fs"> + <filename name="bar"/> +</augment> -

Adds a filename selector to input-fs.

+

Adds a filename selector to input-fs.

diff --git a/manual/Tasks/available.html b/manual/Tasks/available.html index 57ba9cef4..12224c394 100644 --- a/manual/Tasks/available.html +++ b/manual/Tasks/available.html @@ -26,132 +26,123 @@

Available

Description

-

Sets a property if a resource is available at runtime. This resource can be a -file, a directory, a class in the classpath, or a JVM system resource.

-

If the resource is present, the property value is set to true by -default; otherwise, the property is not set. You can set the value to -something other than the default by specifying the value attribute.

-

Normally, this task is used to set properties that are useful to avoid target -execution depending on system parameters.

+

Sets a property if a resource is available at runtime. This resource can be a file, a directory, +a class in the classpath, or a JVM system resource.

+

If the resource is present, the property value is set to true by default; otherwise, the +property is not set. You can set the value to something other than the default by specifying +the value attribute.

+

Normally, this task is used to set properties that are useful to avoid target execution depending +on system parameters.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
valueThe value to set the property to. Defaults to "true".NovalueThe value to set the property to.No; defaults to true
classnameThe class to look for in the classpath.YesclassnameThe class to look for in the classpath.Exactly one of the three
fileThe file to look for.fileThe file to look for.
resourceThe resource to look for in the JVM.resourceThe resource to look for in the JVM.
classpathThe classpath to use when looking up classname or resource.NoclasspathThe classpath to use when looking up classname or resource.No
filepathThe path to use when looking up file.NofilepathThe path to use when looking up file.No
classpathrefThe classpath to use, given as a reference to a path defined elsewhere.NoclasspathrefThe classpath to use, given as a reference to a path + defined elsewhere.No
typeThe type of file to look for, either a directory (type="dir") or a file - (type="file"). If not set, the property will be set if the name specified in the file - attribute exists as either a file or a directory.NotypeThe type of file to look for, either a directory (type=dir) or + a file (type=file). If not set, the property will be set if the name specified + in the file attribute exists as either a file or a directory.No
ignoresystemclassesIgnore Ant's runtime classes, using only the specified - classpath. Only affects the "classname" attribute. Defaults to "false"NoignoresystemclassesIgnore Ant's runtime classes, using only the specified classpath. Only affects + the classname attribute.No; defaults to false
searchparentsThis contains the behaviour of the "file" type. - If true, the available task will, when - searching for a file, search not only the directories specified but - will also search the parent directories of those - specified. - If false, only the directories specified will be searched. - Defaults to "false". - Since Ant 1.7 - NosearchparentsThis contains the behaviour of the file type. If true, the task + will, when searching for a file, search not only the directories specified but will also search + the parent directories of those specified. If false, only the directories specified will + be searched. Since Ant 1.7No; defaults to false

Parameters specified as nested elements

classpath

-

Available's classpath attribute is a path-like structure and can also be set via a nested +

Available's classpath attribute is +a path-like structure and can also be set via a nested <classpath> element.

filepath

-

Available's filepath attribute is a path-like structure and can also be set via a nested -<filepath> element.

+

Available's filepath attribute is +a path-like structure and can also be set via a +nested <filepath> element.

Examples

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

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

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

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

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

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

+<available file="${jaxp.jar}" property="jaxp.jar.present"/> +

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

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

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

+ property="local.lib.present"/> +

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

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

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

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

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

sets the have.extras property to the value "true" -if the resource-file extratasks.properties is found. +</available> +

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

diff --git a/manual/Tasks/basename.html b/manual/Tasks/basename.html index bc55c6e98..c52e2bdcc 100644 --- a/manual/Tasks/basename.html +++ b/manual/Tasks/basename.html @@ -25,64 +25,54 @@

Basename

+

Description

-

-Task to determine the basename of a specified file, optionally minus a -specified suffix. -

-

-When this task executes, it will set the specified property to the -value of the last path element of the specified file. If file is a -directory, the basename will be the last directory element. If -file is a full-path, relative-path, or simple filename, -the basename will be the simple file name, without any directory elements. -

-

+

Task to determine the basename of a specified file, optionally minus a specified suffix.

+

When this task executes, it will set the specified property to the value of the last path element +of the specified file. If file is a directory, the basename will be the last directory +element. If file is a full-path, relative-path, or simple filename, the basename will be +the simple file name, without any directory elements.

+

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe path to take the basename of.YesfileThe path to take the basename of.Yes
propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
suffixThe suffix to remove from the resulting basename - (specified either with or without the ".").NosuffixThe suffix to remove from the resulting basename (specified either with or without + the .).No

Examples

-
-<basename property="jar.filename" file="${lib.jarfile}"/>
-
-will set jar.filename to -myjar.jar, if lib.jarfile is defined as either a -full-path filename (eg., /usr/local/lib/myjar.jar), -a relative-path filename (eg., lib/myjar.jar), -or a simple filename (eg., myjar.jar). +
<basename property="jar.filename" file="${lib.jarfile}"/>
+

will set jar.filename to myjar.jar, if lib.jarfile is +defined as either a full-path filename (eg., /usr/local/lib/myjar.jar), a relative-path +filename (eg., lib/myjar.jar), or a simple filename (eg., myjar.jar).

 <basename property="cmdname" file="D:/usr/local/foo.exe"
-          suffix=".exe"/>
-
-will set cmdname to foo. + suffix=".exe"/> +

will set cmdname to foo.

 <property environment="env"/>
 <basename property="temp.dirname" file="${env.TEMP}"/>
 
-will set temp.dirname to the last directory element of -the path defined for the TEMP environment variable. +

will set temp.dirname to the last directory element of the path defined for +the TEMP environment variable.

diff --git a/manual/Tasks/bindtargets.html b/manual/Tasks/bindtargets.html index 538d538de..74b90b5a6 100644 --- a/manual/Tasks/bindtargets.html +++ b/manual/Tasks/bindtargets.html @@ -27,64 +27,57 @@

Bindtargets

Description

-

Make some target the extension of some defined -extension point. It will make the -list of targets dependencies of the extension point.

+

Make some target the extension of some +defined extension point. It will make the list of +targets dependencies of the extension point.

-

This target is useful when you want to have a target participate to another -build workflow, build workflow which explicitly expose an extension point for -that kind of insertion. But the target to bind and the extension point to -bind to are both declared in some imported build files. Modifying directly the -target dependency graph of these external build files may have a side effect -on some other project which import them. This task helps then to modify the -target dependencies but only in your context. -

+

This target is useful when you want to have a target to participate in another build workflow +which explicitly exposes an extension point for that kind of insertion. Thus the target to bind and +the extension point to bind to are both declared in some imported build files. But directly +modifying the target dependency graph of these external build files may have a side effect on some +other project which imports them. This task helps to modify the target dependencies but only in your +context.

-

Note: this task is quite equivalent to the definition of an intermediate -target which will be the bridge between the target to bind and the extension -point. For instance: -

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

This task basically avoid the creation of a target.

+

Note: this task is quite equivalent to the definition of an intermediate target +which will be the bridge between the target to bind and the extension point. For instance:

+
<bindtargets targets="jar,javadoc" extensionPoint="dist"/>
+

is quite equivalent to:

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

This task basically avoids the creation of a target.

-

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

+

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

Since Apache Ant 1.8.2

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
targetsa comma separated list of target names to bind.Yestargetsa comma separated list of target names to bind.Yes
extensionPointthe name of the extension point to bind the targets to.YesextensionPointthe name of the extension point to bind the targets to.Yes
onMissingExtensionPointWhat to do if this target tries to extend a missing - extension-point. ("fail", - "warn", "ignore").No. Defaults to failonMissingExtensionPointWhat to do if this target tries to extend a + missing extension-point: fail, warn, ignore.No; defaults to fail

Examples

-
-<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist"/>
-
+
<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist"/>
diff --git a/manual/Tasks/buildnumber.html b/manual/Tasks/buildnumber.html index 474a925d5..f2eab0849 100644 --- a/manual/Tasks/buildnumber.html +++ b/manual/Tasks/buildnumber.html @@ -27,45 +27,34 @@

BuildNumber

Description

This is a basic task that can be used to track build numbers.

-

It will first attempt to read a build number from a file (by default, -build.number in the current directory), then -set the property build.number to the value that was read in -(or to 0, if no such value). It will then increment the -number by one and write it back out to the file. -(See the -PropertyFile task -if you need finer control over things such as the property name or -the number format.) -

+

It will first attempt to read a build number from a file (by default, build.number +in the current directory), then set the property build.number to the value that was +read in (or to 0, if no such value). It will then increment the number by one and write it +back out to the file. (See the PropertyFile task if you +need finer control over things such as the property name or the number format.)

Parameters

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe file to read and write the build number from/to.No; defaults to "build.number"fileThe file to read and write the build number from/to.No; defaults to build.number

Examples

-
-<buildnumber/>
-
+
<buildnumber/>
-

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

+

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

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

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

+

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

diff --git a/manual/Tasks/cab.html b/manual/Tasks/cab.html index 115d73901..01ddf830a 100644 --- a/manual/Tasks/cab.html +++ b/manual/Tasks/cab.html @@ -26,124 +26,107 @@

Cab

Description

-

The cab task creates Microsoft cab archive files. It is invoked -similar to the jar or zip tasks. -This task 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 - -http://trill.cis.fordham.edu/~barbacha/cabinet_library/.

-

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 attributes of <fileset> -(dir becomes basedir) as well as the nested -<include>, <exclude> and -<patternset> elements.

+

The cab task creates Microsoft cabinet archive files. It is invoked similar to +the jar or zip tasks. This task +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/.

+

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 +attributes of <fileset> (dir becomes basedir) as well as +the nested <include>, <exclude> +and <patternset> elements.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
cabfilethe name of the cab file to create.Yescabfilethe name of the cab file to create.Yes
basedirthe directory to start archiving files from.Nobasedirthe directory to start archiving files from.No
verboseset to "yes" if you want to see the output from - the cabarc tool. defaults to "no".Noverboseset to yes if you want to see the output from the cabarc tool.No; defaults to no
compressset to "no" to store files without compressing. - defaults to "yes".Nocompressset to no to store files without compressing.No; defaults to yes
optionsuse to set additional command-line options for - the cabarc tool. should not normally be necessary.Nooptionsuse to set additional command-line options for the cabarc tool. Should not + normally be necessary.No
includescomma- or space-separated list of patterns of files that - must be included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
excludescomma- or space-separated list of patterns of files that - must be excluded. No files (except default excludes) are excluded - when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
defaultexcludesindicates whether default excludes should be used - or not ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes

Parameters specified as nested elements

fileset

-

The cab task supports one nested <fileset> -element to specify the files to be included in the archive. - If this is specified, the "basedir" attribute cannot be used. -

+

The cab task supports one nested <fileset> +element to specify the files to be included in the archive. If this is specified, +the basedir attribute cannot be used.

Examples

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

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

+ basedir="htdocs/manual"/> +

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

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

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

+ excludes="mydocs/**, **/todo.html"/> +

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

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

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

+ verbose="yes"/> +

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

 <cab cabfile="${dist}/manual.cab"
@@ -152,8 +135,7 @@ output.

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

is equivalent to the example above.

diff --git a/manual/Tasks/ccm.html b/manual/Tasks/ccm.html index 39ca6716a..2b546b17b 100644 --- a/manual/Tasks/ccm.html +++ b/manual/Tasks/ccm.html @@ -34,13 +34,16 @@

These Apache Ant tasks are wrappers around Continuus Source Manager. They have been tested - against versions 5.1/6.2 on Windows 2000, but should work on other platforms with ccm installed.

+against versions 5.1/6.2 on Windows 2000, but should work on other platforms with ccm +installed.

+
+

CCMCheckin

Description

-Task to checkin a file +

Task to checkin a file

Parameters

- +
@@ -53,35 +56,37 @@ Task to checkin a file - - + + - + - +
Attribute Values
commentSpecify a comment. Default is "Checkin" plus the dateNoSpecify a comment.No; default is Checkin plus the date
taskSpecify the task number used to check in the file (may use 'default')Specify the task number used to check in the file (may use default) No
ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No

Examples

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

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

-

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


+

CCMCheckout

Description

-Task to perform a Checkout command to Continuus +

Task to perform a checkout command to Continuus

Parameters

- +
@@ -90,53 +95,57 @@ Task to perform a Checkout command to Continuus - + - + - + - + - +
Attribute Values
file Path to the file that the command will operate onYes (file|fileset)Exactly one of the two
filesetfileset containing the file to be checked outfileset containing the file to be checked out
commentSpecify a comment.Specify a comment No
taskSpecify the task number used to checkin the file (may use - 'default')Specify the task number used to checkin the file (may use default) No
ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No

Examples

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

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

+

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

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

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

+

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

+
+

CCMCheckinTask

Description

-Task to perform a check in default task command to Continuus +

Task to perform a checkin default task command to Continuus

Parameters

- +
@@ -149,12 +158,13 @@ Task to perform a check in default task command to Continuus - + - +
Attribute Values
taskSpecify the task number used to check in the file (may use 'default')Specify the task number used to check in the file (may use default) No
ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No
@@ -163,12 +173,14 @@ Task to perform a check in default task command to Continuus
<ccmcheckintask comment="blahblah/>

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

+
+

CCMReconfigure

Description

-Task to perform an reconfigure command to Continuus. +

Task to perform an reconfigure command to Continuus.

Parameters

- +
@@ -176,13 +188,13 @@ Task to perform an reconfigure command to Continuus. - - + + - - + + @@ -191,24 +203,26 @@ Task to perform an reconfigure command to Continuus. - +
Attribute Values
recurserecurse on subproject (default false)Norecurse on subprojectNo; default is false
verbosedo a verbose reconfigure operation (default false)Nodo a verbose reconfigure operationNo; default is false
ccmproject
ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No

Examples

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

Does a Continuus reconfigure on the project ANTCCM_TEST#BMO_1.

-

Does a Continuus reconfigure on the project ANTCCM_TEST#BMO_1. -


+

CCMCreateTask

Description

-Create a Continuus task. +

Create a Continuus task.

Parameters

- +
@@ -216,7 +230,7 @@ Create a Continuus task. - + @@ -226,7 +240,8 @@ Create a Continuus task. - + @@ -246,18 +261,18 @@ Create a Continuus task. - +
Attribute Values
commentSpecify a comment.Specify a comment No
ccmdirpath to the ccm executable file, required if it is not on the PATHpath to the ccm executable file, required if it is not on + the PATH No
taskSpecify the task number used to checkin the file (may use 'default')Specify the task number used to checkin the file (may use default) No

Examples

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

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

+

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

diff --git a/manual/Tasks/changelog.html b/manual/Tasks/changelog.html index b09e1c0e7..c2aee229c 100644 --- a/manual/Tasks/changelog.html +++ b/manual/Tasks/changelog.html @@ -26,242 +26,228 @@

CvsChangeLog

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

+

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.

Parameters

- +
- - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
Attributes from parent Cvs task which are meaningful here
- Since Apache Ant 1.6.1
Attributes from parent <cvs> task which are + meaningful here
Since Apache Ant 1.6.1
cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
packagethe package/module to check out. Note: - multiple attributes can be split using spaces. Use a nested - <module> element if you want to specify a module with - spaces in its name.Nopackagethe package/module to check out. Note: multiple attributes can be split + using spaces. Use a nested <module> element if you want to specify a + module with spaces in its name.No
portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; defaults to 2401
passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; defaults to ~/.cvspass
failonerrorStop the build process if the command exits with a - return code other than 0. Defaults to falseNofailonerrorStop the build process if the command exits with a return code other + than 0No; defaults to false
tagquery the changelog for a specific branch.Notagquery the changelog for a specific branch.No
Specific attributesSpecific attributes
dirThe directory from which to run the CVS log - command.No; defaults to ${basedir}.dirThe directory from which to run the CVS log command.No; defaults to ${basedir}
destfileThe file in which to write the change log report.YesdestfileThe file in which to write the change log report.Yes
usersfileProperty file that contains name-value pairs mapping - user IDs and names that should be used in the report in place of - the user ID.NousersfileProperty file that contains name-value pairs mapping user IDs and names that should be used + in the report in place of the user ID.No
daysinpastSets the number of days into the past for which the - change log information should be retrieved.NodaysinpastSets the number of days into the past for which the change log information should be + retrieved.No
startThe earliest date from which change logs are to be - included in the report.NostartThe earliest date from which change logs are to be included in the report.No
endThe latest date to which change logs are to be - included in the report.NoendThe latest date to which change logs are to be included in the report.No
remoteIf set to true, works against the repository - (using rlog) without a working copy. Default is - false. Since Ant 1.8.0NoremoteIf set to true, works against the repository (using rlog) without a working + copy. Since Ant 1.8.0No; default is false
startTagThe start of a tag range. If endTag is also - specified, they must both be on the same branch. If endTag is not - specified, the end of the range will be the latest on the same - branch on which startTag lives. Since Ant 1.8.0NostartTagThe start of a tag range. If endTag is also specified, they must both be on the + same branch. If endTag is not specified, the end of the range will be the latest on + the same branch on which startTag lives. Since Ant 1.8.0No
endTagThe end of a tag range. If startTag is also - specified, they must both be on the same branch. If startTag is - not specified, the start of the range will be the top of the - branch on which endTag lives. Since Ant 1.8.0NoendTagThe end of a tag range. If startTag is also specified, they must both be on the + same branch. If startTag is not specified, the start of the range will be the top + of the branch on which endTag lives. Since Ant 1.8.0No

Parameters specified as nested elements

user

-

The nested <user> element allows you to specify a -mapping between a user ID as it appears on the CVS server and a name to -include in the formatted report. -Anytime the specified user ID has made a change in the repository, the -<author> tag in the report file will include -the name specified in displayname rather than the user ID. -

+

The nested <user> element allows you to specify a mapping between a user ID as +it appears on the CVS server and a name to include in the formatted report. Anytime the specified +user ID has made a change in the repository, the <author> tag in the report file +will include the name specified in displayname rather than the user ID.

- +
- - - + + + - - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
displaynameThe name to be used in the CVS change log report.YesdisplaynameThe name to be used in the CVS change log report.Yes
useridThe userid of the person as it exists on the CVS server. + useridThe user ID of the person as it exists on the CVS server. YesYes

module

-

Specifies a package/module to work on, unlike the package attribute - modules specified using this attribute can contain spaces in their - name.

+

Specifies a package/module to work on, unlike the package attribute modules specified using this +attribute can contain spaces in their name.

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
nameThe module's/package's name.Yes.nameThe module's/package's name.Yes

Examples

-
  <cvschangelog dir="dve/network"
-                destfile="changelog.xml"/>
+
+<cvschangelog dir="dve/network"
+              destfile="changelog.xml"/>
-

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

+

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

-
  <cvschangelog dir="dve/network"
-                destfile="changelog.xml"
-                daysinpast="10"/>
+
+<cvschangelog dir="dve/network"
+              destfile="changelog.xml"
+              daysinpast="10"/>
-

Generates a change log report for any changes that were made -under the dve/network directory in the past 10 days. -It writes these changes into the file changelog.xml.

+

Generates a change log report for any changes that were made under the dve/network +directory in the past 10 days. It writes these changes into the +file changelog.xml.

-
  <cvschangelog dir="dve/network"
-                destfile="changelog.xml"
-                start="20 Feb 2002"
-                end="20 Mar 2002"/>
+
+<cvschangelog dir="dve/network"
+              destfile="changelog.xml"
+              start="20 Feb 2002"
+              end="20 Mar 2002"/>
-

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

+

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

-
  <cvschangelog dir="dve/network"
-                destfile="changelog.xml"
-                start="20 Feb 2002"/>
+
+<cvschangelog dir="dve/network"
+              destfile="changelog.xml"
+              start="20 Feb 2002"/>
-

Generates a change log report for any changes that were made -after February 20, 2002 under the dve/network directory. -It writes these changes into the file changelog.xml.

+

Generates a change log report for any changes that were made after February 20, 2002 under +the dve/network directory. It writes these changes into the +file changelog.xml.

-
  <cvschangelog dir="dve/network"
-                destfile="changelog.xml">
-       <user displayname="Peter Donald" userid="donaldp"/>
-  </cvschangelog>
+
+<cvschangelog dir="dve/network"
+              destfile="changelog.xml">
+    <user displayname="Peter Donald" userid="donaldp"/>
+</cvschangelog>
-

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

+

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

Generates a change log report on the ANT_16_BRANCH.

- <cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass"
-                destfile="changelogant.xml" tag="ANT_16_BRANCH"/>
-
+<cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass" + destfile="changelogant.xml" tag="ANT_16_BRANCH"/>

Generate Report

-

Ant includes a basic XSLT stylesheet that you can use to generate -a HTML report based on the xml output. The following example illustrates -how to generate a HTML report from the XML report.

+

Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml +output. The following example illustrates how to generate a HTML report from the XML report.

-        <style in="changelog.xml"
-               out="changelog.html"
-               style="${ant.home}/etc/changelog.xsl">
-          <param name="title" expression="Ant ChangeLog"/>
-          <param name="module" expression="ant"/>
-          <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
-        </style>
-
+<style in="changelog.xml" + out="changelog.html" + style="${ant.home}/etc/changelog.xsl"> + <param name="title" expression="Ant ChangeLog"/> + <param name="module" expression="ant"/> + <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/> +</style>

Sample Output

@@ -279,8 +265,7 @@ how to generate a HTML report from the XML report.

This allows templates to be stored inside jar]]></msg> </entry> -</changelog> -
+</changelog> diff --git a/manual/Tasks/checksum.html b/manual/Tasks/checksum.html index cf7bb87d7..8e63c348e 100644 --- a/manual/Tasks/checksum.html +++ b/manual/Tasks/checksum.html @@ -26,110 +26,92 @@

Checksum

Description

-

-Generates checksum for files. This task can also be used to -perform checksum verifications. -

- -

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.

- -

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

+

Generates checksum for files. This task can also be used to perform checksum verifications.

+ +

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.

+ +

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

Parameters

- +
- - - + + + - - - + + + - - - + + - - + - + - - - + + + - - + - + - - + - + - - - + + + - - + - + Since Ant 1.7.0 + - - - + + + - - - + + + - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe file to generate checksum for.Yes, unless - at least one nested (filesystem-only) resource collection is specified.fileThe file to generate checksum for.Yes, unless at least one nested (filesystem-only) resource collection is specified.
todirThe root directory where checksums should be written.No. If not specified, checksum files - will be written to the same directory as the files themselves. - since Apache Ant 1.6 + todirThe root directory where checksums should be written.No. If not specified, checksum files will be written to the same directory as the files + themselves. since Apache Ant 1.6
algorithmSpecifies the algorithm to be used to - compute the checksum. Defaults to "MD5". - Other popular algorithms like "SHA" or "SHA-512" may be used - as well. + algorithmSpecifies the algorithm to be used to compute the checksum. Please check the + documentation + for available algorithm names, like SHA-1 or SHA-512. NoNo; defaults to MD5
providerSpecifies the provider of the algorithm.NoproviderSpecifies the provider of the algorithm.No
fileextThe generated checksum file's name will be the - original filename with the fileext added to it. - Defaults to a "." and the algorithm name being used. + fileextThe generated checksum file's name will be the original filename with the fileext + added to it. NoNo; defaults to a . and the algorithm name being used
propertyThis attribute can mean two different things, it - depends on the presence of the verifyproperty attribute.
- If you don't set the verifyproperty attribute, property - specifies the name of the property to be set with the generated - checksum value.
- If you set the verifyproperty attribute, property specifies - the checksum you expect to be generated (the checksum itself, not - a name of a property containing the checksum).
- This cannot be specified when fileext is being used or when the - number of files for which checksums is to be generated is greater - than 1. +
propertyThis attribute can mean two different things, it depends on the presence of + the verifyproperty attribute.
If you don't set + the verifyproperty attribute, property specifies the name of the property to be set + with the generated checksum value.
If you set + the verifyproperty attribute, property specifies the checksum you expect to be + generated (the checksum itself, not a name of a property containing the checksum).
This + cannot be specified when fileext is being used or when the number of files for + which checksums are to be generated is greater than 1.
NoNo
patternSpecifies 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}".patternSpecifies 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}
formatSpecifies the pattern to use as one of a - well-known format. Supported values are + formatSpecifies the pattern to use as one of a well-known format. Supported values are @@ -138,111 +120,103 @@ or set the fileext attribute. The names of common hashing algorithms ca - + - - + + - - + +
name
CHECKSUM{0}{0} only the checksum itself
MD5SUM{0} *{1}the format of GNU textutils md5sum{0} *{1}the format of GNU textutils md5sum
SVFMD5 ({1}) = {0}the format of BSDs md5 commandMD5 ({1}) = {0}the format of BSD md5 command
- Since Ant 1.7.0 -
No - default is "CHECKSUM".No; default is CHECKSUM
totalpropertyIf specified, this attribute specifies the name of - the property that will hold a checksum of all the checksums and - file paths. The individual checksums and the relative paths to the files - within the resource collections in which they are defined will be used to - compute this checksum. (The file separators in the paths will be - converted to '/' before computation to ensure platform portability). - since Ant 1.6 - NototalpropertyIf specified, this attribute specifies the name of the property that will hold a checksum of + all the checksums and file paths. The individual checksums and the relative paths to the files + within the resource collections in which they are defined will be used to compute this + checksum. (The file separators in the paths will be converted to / before computation + to ensure platform portability). since Ant 1.6No
forceoverwriteOverwrite existing files even if the destination - files are newer. Defaults to "no".NoforceoverwriteOverwrite existing files even if the destination files are newer.No; defaults to no
verifypropertySpecifies the name of the property to be set - with "true" or "false" depending upon whether - the generated checksum matches the existing checksum. When - this is set, the generated checksum is not written to a file or - property, but rather, the content of the file or property is used to - check against the generated checksum. - NoverifypropertySpecifies the name of the property to be set with true or false depending upon + whether the generated checksum matches the existing checksum. When this is set, the generated + checksum is not written to a file or property, but rather, the content of the file or property + is used to check against the generated checksum.No
readbuffersizeThe size of the buffer (in bytes) to use when - reading a file. Defaults to "8192" - you may get a - better performance on big files if you increase this value.NoreadbuffersizeThe size of the buffer (in bytes) to use when reading a file.No; defaults to 8192—you may get a better performance on big files if you + increase this value

Parameters specified as nested elements

resource collection

-

- Resource collections are - used to select files for which checksums should be generated. -

+

Resource collections are used to select files +for which checksums should be generated.

Examples

-

Example 1

+

Example 1

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

Generates a MD5 checksum for foo.bar and stores the checksum in the destination +file foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar +is newer than itself.

-

Example 2

+

Example 2

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

Generates a MD5 checksum for foo.bar and stores the checksum +in foo.bar.MD5. If foo.bar.MD5 already exists, it is overwritten.

-

Example 3

+

Example 3

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

Generates a MD5 checksum for foo.bar and stores it in the project +property foobarMD5.

-

Example 4

+

Example 4

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

Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 +and sets isMD5ok to either true or false, depending upon the result.

-

Example 5

+

Example 5

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

Generates a SHA-512 checksum for foo.bar and stores the checksum in the destination +file foo.bar.asc. foo.bar.asc is overwritten only if foo.bar +is newer than itself.

-

Example 6

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

Example 6

+
<checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/>
+

Generates a MD5 checksum for foo.bar, compares it against the value of the +property md5, and sets isEqual to either true or false, +depending upon the result.

-

Example 7

+

Example 7

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

Works just like Example 1, but generates a .MD5 file for every file that begins with +the name foo.

-

Example 8

+

Example 8

 <condition property="isChecksumEqual">
   <checksum>
@@ -250,16 +224,14 @@ Works just like Example 1, but generates a .MD5 file for every file that begins
       <include name="foo.bar"/>
     </fileset>
   </checksum>
-</condition>
-
-Works like Example 4, but only sets isChecksumEqual to true, if the -checksum matches - it will never be set to false. This example -demonstrates use with the Condition task. - -

Note:

-When working with more than one file, if condition and/or verifyproperty is used, -the result will be true only if the checksums matched correctly for all files being -considered. +</condition> +

Works like Example 4, but only sets isChecksumEqual to true, if the checksum +matches—it will never be set to false. This example demonstrates use with +the condition task.

+ +

Note

+

When working with more than one file, if condition and/or verifyproperty is used, the +result will be true only if the checksums matched correctly for all files being considered.

diff --git a/manual/Tasks/chgrp.html b/manual/Tasks/chgrp.html index fecc78359..6fdcd5965 100644 --- a/manual/Tasks/chgrp.html +++ b/manual/Tasks/chgrp.html @@ -28,120 +28,100 @@

Since Apache Ant 1.6.

Description

-

Changes the group of a file or all files inside specified -directories. Right now it has effect only under Unix. The group -attribute is equivalent to the corresponding argument for the chgrp -command.

- -

FileSets, -DirSets or FileLists can be specified using -nested <fileset>, <dirset> and -<filelist> elements.

- -

Since Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

- -

By default this task will use a single invocation of the underlying -chgrp command. If you are working on a large number of files this may -result in a command line that is too long for your operating system. -If you encounter such problems, you should set the maxparallel -attribute of this task to a non-zero value. The number to use highly -depends on the length of your file names (the depth of your directory -tree) and your operating system, so you'll have to experiment a -little. POSIX recommends command line length limits of at least 4096 -characters, this may give you an approximation for the number you -could use as initial value for these experiments.

- -

By default this task won't do anything unless it detects it is - running on a Unix system. If you know for sure that you have a - "chgrp" executable on your PATH that is command line compatible with - the Unix command, you can use the task's os attribute and set its - value to your current os.

+

Changes the group of a file or all files inside specified directories. Right now it has effect +only under Unix. The group attribute is equivalent to the corresponding argument for +the chgrp command.

+ +

FileSets, DirSets +or FileLists can be specified using +nested <fileset>, <dirset> and <filelist> +elements.

+ +

Since Ant 1.7, this task supports +arbitrary Resource Collections as nested +elements.

+ +

By default this task will use a single invocation of the underlying chgrp command. +If you are working on a large number of files this may result in a command line that is too long for +your operating system. If you encounter such problems, you should set the maxparallel +attribute of this task to a non-zero value. The number to use highly depends on the length of your +file names (the depth of your directory tree) and your operating system, so you'll have to +experiment a little. POSIX recommends command line length limits of at least 4096 characters, this +may give you an approximation for the number you could use as initial value for these +experiments.

+ +

By default this task won't do anything unless it detects it is running on a Unix system. If you +know for sure that you have a chgrp executable on your PATH that is +command line compatible with the Unix command, you can use the task's os attribute and +set its value to your current OS.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - + - + -
AttributeDescriptionRequiredAttributeDescriptionRequired
filethe file or directory of which the group must be - changed.Yes, unless nested - <fileset|filelist|dirset> - elements are specifiedfilethe file or directory of which the group must be changed.Yes, unless nested <fileset|filelist|dirset> elements are specified
groupthe new group.Yesgroupthe new group.Yes
parallelprocess all specified files using a single - chgrp command. Defaults to true.Noparallelprocess all specified files using a single chgrp command.No; defaults to true
typeOne of file, dir or - both. If set to file, only the group of - plain files are going to be changed. If set to dir, only - the directories are considered.
- Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
No, default is filetypeOne of file, dir or both. If set to file, only the group of + plain files are going to be changed. If set to dir, only the directories are + considered.
Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
No; default is file
maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited.NomaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited.No; defaults to unlimited
verboseWhether to print a summary after execution or not. - Defaults to false.NoverboseWhether to print a summary after execution or not.No; defaults to false
oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
osfamilyOS family as used in - the <os> + osfamilyOS family as used in the <os> condition.No - defaults to "unix"No; defaults to unix

Examples

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

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

+

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

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

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

+

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

 <chgrp group="coders">
@@ -152,13 +132,11 @@ belong to the coders group on a UNIX system.

</chgrp>
-

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

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

-
 <chgrp group="webdev" type="file">
   <fileset dir="/web">
@@ -168,13 +146,12 @@ group.

<dirset dir="/web"> <include name="**/test_*"/> </dirset> -</chmod> -
+</chmod> -

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

+

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

diff --git a/manual/Tasks/chmod.html b/manual/Tasks/chmod.html index c1c0f11af..b983f26ef 100644 --- a/manual/Tasks/chmod.html +++ b/manual/Tasks/chmod.html @@ -26,151 +26,129 @@

Chmod

Description

-

Changes the permissions of a file or all files inside specified -directories. Right now it has effect only under Unix or NonStop Kernel (Tandem). -The permissions are also UNIX style, like the argument for the chmod command.

-

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

- -

This task holds an implicit FileSet and supports all of -FileSet's attributes and nested elements directly. More sets can be -specified using nested <fileset> or -<dirset> (since Apache Ant 1.6) elements.

- -

Since Ant 1.6, this task also supports nested filelists.

- -

Since Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

- -

By default this task will use a single invocation of the underlying -chmod command. If you are working on a large number of files this may -result in a command line that is too long for your operating system. -If you encounter such problems, you should set the maxparallel -attribute of this task to a non-zero value. The number to use highly -depends on the length of your file names (the depth of your directory -tree) and your operating system, so you'll have to experiment a -little. POSIX recommends command line length limits of at least 4096 -characters, this may give you an approximation for the number you -could use as initial value for these experiments.

- -

By default this task won't do anything unless it detects it is - running on a Unix system. If you know for sure that you have a - "chmod" executable on your PATH that is command line compatible with - the Unix command, you can use the task's os attribute and set its - value to your current os.

- -

See the setpermissions task for a - platform independent alternative.

+

Changes the permissions of a file or all files inside specified directories. Right now it has +effect only under Unix or NonStop Kernel (Tandem). The permissions are also UNIX style, like the +argument for the chmod command.

+

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

+ +

This task holds an implicit FileSet and supports all of +FileSet's attributes and nested elements directly. More sets can be specified using +nested <fileset> or <dirset> (since Apache Ant 1.6) +elements.

+ +

Since Ant 1.6, this task also supports +nested filelists.

+ +

Since Ant 1.7, this task supports +arbitrary Resource Collections as nested +elements.

+ +

By default this task will use a single invocation of the underlying chmod command. +If you are working on a large number of files this may result in a command line that is too long for +your operating system. If you encounter such problems, you should set the maxparallel +attribute of this task to a non-zero value. The number to use highly depends on the length of your +file names (the depth of your directory tree) and your operating system, so you'll have to +experiment a little. POSIX recommends command line length limits of at least 4096 characters, this +may give you an approximation for the number you could use as initial value for these +experiments.

+ +

By default this task won't do anything unless it detects it is running on a Unix system. If you +know for sure that you have a chmod executable on your PATH that is +command line compatible with the Unix command, you can use the task's os attribute and +set its value to your current OS.

+ +

See the setpermissions task for a platform independent +alternative.

Parameters

- +
- - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
filethe file or single directory of which the permissions - must be changed.Exactly one of the two, or nested <fileset/list>sfilethe file or single directory of which the permissions must be changed.Exactly one of the two, or nested <fileset/list>s
dirthe directory which holds the files whose permissions - must be changed.
- Note: for backwards compatibility - reasons <chmod dir="some-dir"/> will - only change the permissions on "some-dir" but not recurse into - it, unless you also specify any patterns.
dirthe directory which holds the files whose permissions must be + changed.
Note: for backwards compatibility reasons <chmod + dir="some-dir"/> will only change the permissions on some-dir but not + recurse into it, unless you also specify any patterns.
permthe new permissions.Yespermthe new permissions.Yes
includescomma- or space-separated list of patterns of files that must be - included.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
parallelprocess all specified files using a single - chmod command. Defaults to true.Noparallelprocess all specified files using a single chmod command.No; defaults to true
typeOne of file, dir or - both. If set to file, only the permissions of - plain files are going to be changed. If set to dir, only - the directories are considered.
- Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
No, default is filetypeOne of file, dir or both. If set to file, only the permissions + of plain files are going to be changed. If set to dir, only the directories are + considered.
Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
No; default is file
maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited. Since Ant 1.6.NomaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited. Since Ant 1.6.No; defaults to unlimited
verboseWhether to print a summary after execution or not. - Defaults to false. Since Ant 1.6.NoverboseWhether to print a summary after execution or not. Since Ant 1.6.No; defaults to false
oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
osfamilyOS family as used in - the <os> condition.No - defaults to "unix"osfamilyOS family as used in the <os> condition.No; defaults to unix

Examples

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

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

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

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

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

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

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

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

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

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

+ includes="**/*.sh"/> +

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

 <chmod perm="g+w">
@@ -178,13 +156,11 @@ readable and executable for anyone on a UNIX system.

<exclude name="**/trial/**"/> </fileset> <fileset refid="other.shared.sources"/> -</chmod> -
-

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

+</chmod> +

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

+
 <chmod perm="go-rwx" type="file">
   <fileset dir="/web">
@@ -194,26 +170,17 @@ permissions.

<dirset dir="/web"> <include name="**/private_*"/> </dirset> -</chmod> -
-

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

- -

Note on maxparallel attribute

-

- Some shells have a limit of the number of characters that - a command line may contain. - This maximum limit varies from shell to shell and from operating - system to operating system. - If one has a large number of files to change mode on, consider - using the maxparallel attribute. For example - when using AIX and the limit is reached, the system responds - with a warning: "Warning: - UNIXProcess.forkAndExec native error: The parameter or environment lists - are too long". A value of about 300 seems to result in a - command line that is acceptable. -

+</chmod> +

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

+ +

Note on maxparallel attribute

+

Some shells have a limit of the number of characters that a command line may contain. This +maximum limit varies from shell to shell and from operating system to operating system. If one has +a large number of files to change mode on, consider using the maxparallel attribute. For +example when using AIX and the limit is reached, the system responds with a warning: "Warning: +UNIXProcess.forkAndExec native error: The parameter or environment lists are too long". A +value of about 300 seems to result in a command line that is acceptable.

diff --git a/manual/Tasks/chown.html b/manual/Tasks/chown.html index a0194c00f..002cacb66 100644 --- a/manual/Tasks/chown.html +++ b/manual/Tasks/chown.html @@ -28,117 +28,99 @@

Since Apache Ant 1.6.

Description

-

Changes the owner of a file or all files inside specified -directories. Right now it has effect only under Unix. The owner -attribute is equivalent to the corresponding argument for the chown -command.

- -

FileSets, -DirSets or FileLists can be specified using -nested <fileset>, <dirset> and -<filelist> elements.

- -

Since Ant 1.7, this task supports arbitrary Resource Collections -as nested elements.

- -

By default this task will use a single invocation of the underlying -chown command. If you are working on a large number of files this may -result in a command line that is too long for your operating system. -If you encounter such problems, you should set the maxparallel -attribute of this task to a non-zero value. The number to use highly -depends on the length of your file names (the depth of your directory -tree) and your operating system, so you'll have to experiment a -little. POSIX recommends command line length limits of at least 4096 -characters, this may give you an approximation for the number you -could use as initial value for these experiments.

- -

By default this task won't do anything unless it detects it is - running on a Unix system. If you know for sure that you have a - "chown" executable on your PATH that is command line compatible with - the Unix command, you can use the task's os attribute and set its - value to your current os.

+

Changes the owner of a file or all files inside specified directories. Right now it has effect +only under Unix. The owner attribute is equivalent to the corresponding argument for +the chown command.

+ +

FileSets, DirSets +or FileLists can be specified using +nested <fileset>, <dirset> and <filelist> +elements.

+ +

Since Ant 1.7, this task supports +arbitrary Resource Collections as nested +elements.

+ +

By default this task will use a single invocation of the underlying chown command. +If you are working on a large number of files this may result in a command line that is too long for +your operating system. If you encounter such problems, you should set the maxparallel +attribute of this task to a non-zero value. The number to use highly depends on the length of your +file names (the depth of your directory tree) and your operating system, so you'll have to +experiment a little. POSIX recommends command line length limits of at least 4096 characters, this +may give you an approximation for the number you could use as initial value for these +experiments.

+ +

By default this task won't do anything unless it detects it is running on a Unix system. If you +know for sure that you have a chown executable on your PATH that is +command line compatible with the Unix command, you can use the task's os attribute and set its value +to your current os.

Parameters

- +
- - - + + + - - + - - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - + - + -
AttributeDescriptionRequiredAttributeDescriptionRequired
filethe file or directory of which the owner must be + filethe file or directory of which the owner must be changed.Yes or nested + Yes or nested <fileset/list> elements.
ownerthe new owner.Yesownerthe new owner.Yes
parallelprocess all specified files using a single - chown command. Defaults to true.Noparallelprocess all specified files using a single chown command.No; defaults to true
typeOne of file, dir or - both. If set to file, only the owner of - plain files are going to be changed. If set to dir, only - the directories are considered.
- Note: The type attribute does not apply to - nested dirsets - dirsets always implicitly - assume type to be dir.
No, default is filetypeOne of file, dir or both. If set to file, only the owner of + plain files are going to be changed. If set to dir, only the directories are + considered.
Note: The type attribute does not apply to + nested dirsets—dirsets always implicitly assume type to + be dir.
No; default is file
maxparallelLimit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited.NomaxparallelLimit the amount of parallelism by passing at most this many sourcefiles at once. Set it to + negative integer for unlimited.No; defaults to unlimited
verboseWhether to print a summary after execution or not. - Defaults to false.NoverboseWhether to print a summary after execution or not.No; defaults to false
oslist of Operating Systems on which the command may be - executed.Nooslist of Operating Systems on which the command may be executed.No
osfamilyOS family as used in - the <os> + osfamilyOS family as used in the <os> condition.No - defaults to "unix"No; defaults to unix

Examples

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

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

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

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

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

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

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

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

 <chown owner="coderjoe">
@@ -146,13 +128,10 @@ belong to coderjoe on a UNIX system.

<exclude name="**/trial/**"/> </fileset> <fileset refid="other.shared.sources"/> -</chown> -
-

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

+</chown> +

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

 <chown owner="webadmin" type="file">
@@ -163,12 +142,10 @@ owner.

<dirset dir="/web"> <include name="**/private_*"/> </dirset> -</chmod> -
-

makes cgi scripts, files with a .old extension or -directories beginning with private_ belong to the user named -webadmin. A directory ending in .old or a file beginning with -private_ would remain unaffected.

+</chmod> +

makes cgi scripts, files with a .old extension or directories beginning +with private_ belong to the user named webadmin. A directory ending +in .old or a file beginning with private_ would remain unaffected.

diff --git a/manual/Tasks/clearcase.html b/manual/Tasks/clearcase.html index d1b5b9c7b..ad303fa58 100644 --- a/manual/Tasks/clearcase.html +++ b/manual/Tasks/clearcase.html @@ -19,7 +19,7 @@ - Clearcase Tasks + ClearCase Tasks @@ -30,7 +30,7 @@ Sean P. Kane (spkane at genomatica dot com),
Rob Anderson (Anderson.Rob at vectorscm dot com), and
Sean Egan (sean at cm-logic dot com)

-

Version 1.6 - 02/25/2003

+

Version 1.6—02/25/2003

ClearCase Support

Table of Contents

@@ -54,25 +54,22 @@ Sean Egan (sean at cm-logic dot com)


Introduction

-

Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to various -ClearCase commands using the Cleartool program. The current tasks available for Ant correspond to only -a few of the significant ClearCase commands.

- -

More tasks can be easily added by deriving from the ClearCase class and then adding -functionality that is specific to that ClearCase command.

-

- Important: these tasks all require cleartool on the command line. - If a task fails with an IOException, especially error code 2 on Windows, - this is your problem. -

+

Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to +various ClearCase commands using the cleartool program. The current tasks available for +Ant correspond to only a few of the significant ClearCase commands.

+

More tasks can be easily added by deriving from the ClearCase class and then adding functionality +that is specific to that ClearCase command.

+

Important: these tasks all require cleartool on the command line. If a task fails + with an IOException, especially error=2 on Windows, this is your problem.


+

CCCheckin

Description

-Task to perform a "cleartool checkin" command to ClearCase. +

Task to perform a cleartool checkin command to ClearCase.

Parameters

- +
@@ -80,8 +77,7 @@ Task to perform a "cleartool checkin" command to ClearCase. - + @@ -91,7 +87,7 @@ Task to perform a "cleartool checkin" command to ClearCase. - + @@ -105,40 +101,40 @@ Task to perform a "cleartool checkin" command to ClearCase. - + - + - - + +
Attribute Values
viewpathPath to the ClearCase view file or directory that the command - will operate onPath to the ClearCase view file or directory that the command will operate on No
commentfileSpecify a file containing a commentSpecify a file containing a comment
nowarn
keepcopyKeeps a copy of the file with a .keep extensionKeeps a copy of the file with a .keep extension No
identicalAllows the file to be checked in even if it is identical - to the originalAllows the file to be checked in even if it is identical to the original No
failonerrThrow an exception if the command fails. Default is trueNoThrow an exception if the command failsNo; default is true

Examples

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

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

-

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


+

CCCheckout

Description

-Task to perform a "cleartool checkout" command to ClearCase. +

Task to perform a cleartool checkout command to ClearCase.

Parameters

- +
@@ -146,8 +142,7 @@ Task to perform a "cleartool checkout" command to ClearCase. - + @@ -162,8 +157,7 @@ Task to perform a "cleartool checkout" command to ClearCase. - + @@ -173,7 +167,8 @@ Task to perform a "cleartool checkout" command to ClearCase. - + @@ -188,41 +183,41 @@ Task to perform a "cleartool checkout" command to ClearCase. - + - + - - +
Attribute Values
viewpathPath to the ClearCase view file or directory that the command - will operate onPath to the ClearCase view file or directory that the command will operate on No
nodataChecks out the file but does not create an editable file - containing its dataChecks out the file but does not create an editable file containing its data No
versionAllows checkout of a version other than main latestAllows checkout of a version other than /main/LATEST (or whatever is selected + by a config spec) No
commentfileSpecify a file containing a commentSpecify a file containing a comment
notcoFail if it's already checked out to the current view. Set to false to ignore it.
- Since Ant 1.6.1
Fail if it's already checked out to the current view. Set to false to ignore + it.
Since Ant 1.6.1
No
failonerrThrow an exception if the command fails. Default is true.
+
Throw an exception if the command fails.
Since Ant 1.6.1
NoNo; default is true

Examples

 <cccheckout viewpath="c:/views/viewdir/afile"
-        reserved="true"
-        branch="abranch"
-        nowarn="true"
-        comment="Some comment text"/>
-
+ reserved="true" + branch="abranch" + nowarn="true" + comment="Some comment text"/> + +

Does a ClearCase checkout on the file c:/views/viewdir/afile. It is +checked out as reserved on branch called abranch. All warning messages are +suppressed. A "Some comment text" is added to ClearCase as a comment.

-

Does a ClearCase checkout on the file c:/views/viewdir/afile. -It is checked out as reserved on branch called abranch. All -warning messages are suppressed. A Some comment text is added to -ClearCase as a comment.


+

CCUnCheckout

Description

-Task to perform a UnCheckout command to ClearCase. +

Task to perform a uncheckout command to ClearCase.

Parameters

- +
@@ -230,38 +225,34 @@ Task to perform a UnCheckout command to ClearCase. - + - + - - + +
Attribute Values
viewpathPath to the ClearCase view file or directory that the command - will operate onPath to the ClearCase view file or directory that the command will operate on No
keepcopySpecifies whether to keep a copy of the file with a .keep - extension or notSpecifies whether to keep a copy of the file with a .keep extension or not No
failonerrThrow an exception if the command fails. Default is true.
- Since Ant 1.6.1
NoThrow an exception if the command fails.
Since Ant 1.6.1
No; default is true

Examples

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

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

-

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


+

CCUpdate

Description

-Task to perform an "cleartool update" command to ClearCase. +

Task to perform an cleartool update command to ClearCase.

Parameters

- +
@@ -269,8 +260,7 @@ Task to perform an "cleartool update" command to ClearCase. - + @@ -290,51 +280,49 @@ Task to perform an "cleartool update" command to ClearCase. - + - + - + - - + +
Attribute Values
viewpathPath to the ClearCase snapshot view file or directory that the command - will operate onPath to the ClearCase snapshot view file or directory that the command will operate on No
renameSpecifies that hijacked files should be renamed with a .keep extensionSpecifies that hijacked files should be renamed with a .keep extension No
currenttimeSpecifies that modification time should be written as the - current time. Either currenttime or preservetime can be - specified.Specifies that modification time should be written as the current time. Mutually exclusive + with preservetime. No
preservetimeSpecifies that modification time should preserved from the - VOB time. Either currenttime or preservetime can be - specified.Specifies that modification time should preserved from the VOB time. Mutually exclusive + with currenttime. No
failonerrThrow an exception if the command fails. Default is true.
- Since Ant 1.6.1
NoThrow an exception if the command fails.
Since Ant 1.6.1
No; default is true

Examples

 <ccupdate viewpath="c:/views/viewdir"
-        graphical="false"
-        log="log.log"
-        overwrite="true"
-        currenttime="true"
-        rename="false"/>
-
+ graphical="false" + log="log.log" + overwrite="true" + currenttime="true" + rename="false"/> + +

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

-

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


+

CCMklbtype

Description

-Task to perform a "mklbtype" command to ClearCase. +

Task to perform a mklbtype command to ClearCase.

Parameters

- +
@@ -357,13 +345,13 @@ Task to perform a "mklbtype" command to ClearCase. - - + + - - + @@ -372,7 +360,8 @@ Task to perform a "mklbtype" command to ClearCase. - + @@ -382,13 +371,13 @@ Task to perform a "mklbtype" command to ClearCase. - + - - +
Attribute Values
globalEither global or ordinary can be specified, not both. Creates a label type that is global to the VOB or to VOBs that use this VOBNoCreates a label type that is global to the VOB or to VOBs that use this VOB.No; only one of the two may be used, + default ordinary=true
ordinaryEither global or ordinary can be specified, not both. Creates a label type that can be used only in the current VOB. DefaultNoCreates a label type that can be used only in the current VOB.
pbranch
sharedSets the way mastership is checked by ClearCase. See ClearCase documentation for detailsSets the way mastership is checked by ClearCase. See ClearCase documentation for + details No
commentfileSpecify a file containing a commentSpecify a file containing a comment
failonerrThrow an exception if the command fails. Default is true.
+
Throw an exception if the command fails.
Since Ant 1.6.1
NoNo; default is true
@@ -396,19 +385,20 @@ Task to perform a "mklbtype" command to ClearCase.
 <ccmklbtype typename="VERSION_1"
-        ordinary="true"
-        comment="Development version 1"/>
-
+ ordinary="true" + comment="Development version 1"/> + +

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

-

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


+

CCMklabel

Description

-Task to perform a "mklabel" command to ClearCase. +

Task to perform a mklabel command to ClearCase.

Parameters

- +
@@ -431,7 +421,7 @@ Task to perform a "mklabel" command to ClearCase. - + @@ -451,13 +441,12 @@ Task to perform a "mklabel" command to ClearCase. - + - - + +
Attribute Values
recurseProcess each subdirectory under viewpathProcess each subdirectory under viewpath No
commentfileSpecify a file containing a commentSpecify a file containing a comment
failonerrThrow an exception if the command fails. Default is true.
- Since Ant 1.6.1
NoThrow an exception if the command fails.
Since Ant 1.6.1
No; default is true
@@ -465,21 +454,23 @@ Task to perform a "mklabel" command to ClearCase.
 <ccmklabel viewpath="c:/views/viewdir/afile"
-        comment="Some comment text"
-        recurse="true"
-        version="\main\2"
-        typename="VERSION_1"/>
+           comment="Some comment text"
+           recurse="true"
+           version="\main\2"
+           typename="VERSION_1"/>
 
-

Does a ClearCase mklabel on the file c:/views/viewdir/afile under -the main branch for version 2 (\main\2). Text Some comment text is added -as a comment. It will recurse all subdirectories. +

Does a ClearCase mklabel on the file c:/views/viewdir/afile under the +main branch for version 2 (\main\2). Text "Some comment text" is +added as a comment. It will recurse all subdirectories.

+
+

CCRmtype

Description

-Task to perform a "rmtype" command to ClearCase. +

Task to perform a rmtype command to ClearCase.

Parameters

- +
@@ -490,42 +481,34 @@ Task to perform a "rmtype" command to ClearCase. +
Attribute ValuesThe kind of type to create. Valid types are: - - - + + - - + - - + - - + - - - + + - - + - - + -
Kind DescriptionKindDescription
attype-attype attribute type
brtype-brtype branch type
eltype-eltype element type
hltype-hyperlink typehltypehyperlink type
lbtype-lbtype label type
trtype-trtype trigger type
-
Yes @@ -535,7 +518,8 @@ Task to perform a "rmtype" command to ClearCase. ignore - Used with trigger types only. Forces removal of trigger type even if a pre-operation trigger would prevent its removal + Used with trigger types only. Forces removal of trigger type even if a pre-operation trigger + would prevent its removal No @@ -550,13 +534,12 @@ Task to perform a "rmtype" command to ClearCase. commentfile - Specify a file containing a comment + Specify a file containing a comment failonerr - Throw an exception if the command fails. Default is true. - Since Ant 1.6.1 - No + Throw an exception if the command fails. Since Ant 1.6.1 + No; default is true @@ -564,379 +547,373 @@ Task to perform a "rmtype" command to ClearCase.
 <ccrmtype typekind="lbtype"
-        typename="VERSION_1"
-        commentfile="acomment.txt"
-        rmall="true"/>
-
+ typename="VERSION_1" + commentfile="acomment.txt" + rmall="true"/> + +

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

-

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


+

CCLock

Description

-Task to perform a "cleartool lock" command to ClearCase. +

Task to perform a cleartool lock command to ClearCase.

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeValuesRequired
replaceSpecifies replacing an existing lockNo
nusersSpecifies user(s) who can still modify the objectNo
obsoleteSpecifies that the object should be marked obsoleteNo
commentSpecifies how to populate comments fieldsNo
pnameSpecifies the object pathname to be locked.No
objselectObsolete. Use objsel instead.No
objselSpecifies the object(s) to be locked.
- Since Ant 1.6.1
No
failonerrThrow an exception if the command fails. Default is true.
- Since Ant 1.6.1
No
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeValuesRequired
replaceSpecifies replacing an existing lockNo
nusersSpecifies user(s) who can still modify the objectNo
obsoleteSpecifies that the object should be marked obsoleteNo
commentSpecifies how to populate comments fieldsNo
pnameSpecifies the object pathname to be locked.No
objselectObsolete. Use objsel instead.No
objselSpecifies the object(s) to be locked.
Since Ant 1.6.1
No
failonerrThrow an exception if the command fails.
Since Ant 1.6.1
No; default is true

Examples

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

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

+ +
-

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

-

CCUnlock

Description

-Task to perform a "cleartool unlock" command to ClearCase. +

Task to perform a cleartool unlock command to ClearCase.

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeValuesRequired
commentSpecifies how to populate comments fieldsNo
pnameSpecifies the object pathname to be unlocked.No
objselectObsolete. Use objsel instead.No
objselSpecifies the object(s) to be unlocked.
- Since Ant 1.6.1
No
failonerrThrow an exception if the command fails. Default is true.
- Since Ant 1.6.1
No
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeValuesRequired
commentSpecifies how to populate comments fieldsNo
pnameSpecifies the object pathname to be unlocked.No
objselectObsolete. Use objsel instead.No
objselSpecifies the object(s) to be unlocked.
Since Ant 1.6.1
No
failonerrThrow an exception if the command fails.
Since Ant 1.6.1
No; default is true

Examples

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

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

+ +
-

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

-

CCMkbl

Description

-Task to perform a "cleartool mkbl" command to ClearCase. +

Task to perform a cleartool mkbl command to ClearCase.

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
AttributeValuesRequired
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a commentNo
baselinerootnameSpecify the name to be associated with the baseline.Yes
nowarnSuppress warning messagesNo
identicalAllows the baseline to be created even if it is identical to the - previous baseline.No
fullCreates a full baseline.No
nlabelAllows the baseline to be created without a label.No
- - + + + + + + + + + + + + + + + + + + + + + + + + + + -
failonerrThrow an exception if the command fails. Default is true.
- Since Ant 1.6.1
AttributeValuesRequired
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a comment
baselinerootnameSpecify the name to be associated with the baseline.Yes
nowarnSuppress warning messagesNo
identicalAllows the baseline to be created even if it is identical to the previous baseline. No
+ + full + Creates a full baseline. + No + + + nlabel + Allows the baseline to be created without a label. + No + + + failonerr + Throw an exception if the command fails.
Since Ant 1.6.1 + No; default is true + +

Examples

-<ccmkbl
-    baselinerootname="Application_Baseline_AUTO"
-    identical="yes"
-    full="no"
-    viewpath="v:\ApplicationCC"/>
-
+<ccmkbl baselinerootname="Application_Baseline_AUTO" + identical="yes" + full="no" + viewpath="v:\ApplicationCC"/> + +

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

+ +
-

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

-

CCMkattr

Description

-Task to perform a "cleartool mkattr" command to ClearCase.
-Since Ant 1.6.1 +

Task to perform a cleartool mkattr command to ClearCase.
Since Ant +1.6.1

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeValuesRequired
viewpathPath to the ClearCase view file or directory that the command will operate onYes
replaceReplace the value of the attribute if it already existsNo
recurseProcess each subdirectory under viewpathNo
versionIdentify a specific version to attach the attribute toNo
typenameName of the attribute typeYes
typevalueValue to attach to the attribute typeYes
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a commentNo
failonerrThrow an exception if the command fails. Default is trueNo
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeValuesRequired
viewpathPath to the ClearCase view file or directory that the command will operate onYes
replaceReplace the value of the attribute if it already existsNo
recurseProcess each subdirectory under viewpathNo
versionIdentify a specific version to attach the attribute toNo
typenameName of the attribute typeYes
typevalueValue to attach to the attribute typeYes
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a comment
failonerrThrow an exception if the command fails.No; default is true

Examples

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

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

+

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

+
+

CCMkdir

Description

-Task to perform a "cleartool mkdir" command to ClearCase.
-Since Ant 1.6.1 +

Task to perform a cleartool mkdir command to ClearCase.
Since Ant +1.6.1

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeValuesRequired
viewpathPath to the ClearCase view directory that the command will operate onYes
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a comment
nocheckoutDo not checkout after element creationNo
failonerrThrow an exception if the command fails. Default is trueNo
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeValuesRequired
viewpathPath to the ClearCase view directory that the command will operate onYes
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a comment
nocheckoutDo not checkout after element creationNo
failonerrThrow an exception if the command fails.No; default is true

Examples

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

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

-

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


+

CCMkelem

Description

-Task to perform a "cleartool mkelem" command to ClearCase.
+Task to perform a cleartool mkelem command to ClearCase.
Since Ant 1.6.1

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeValuesRequired
viewpathPath to the ClearCase view file or directory that the command will operate onYes
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a commentNo
nowarnSuppress warning messagesNo
nocheckoutDo not checkout after element creationNo
checkinCheckin element after creationNo
preservetimePreserve the modification time (for checkin)No
masterAssign mastership of the main branch to the current siteNo
eltypeElement type to use during element creationNo
failonerrThrow an exception if the command fails. Default is trueNo
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeValuesRequired
viewpathPath to the ClearCase view file or directory that the command will operate onYes
commentSpecify a commentNo; only one of the two may be used
commentfileSpecify a file containing a comment
nowarnSuppress warning messagesNo
nocheckoutDo not checkout after element creationNo
checkinCheckin element after creationNo
preservetimePreserve the modification time (for checkin)No
masterAssign mastership of the main branch to the current siteNo
eltypeElement type to use during element creationNo
failonerrThrow an exception if the command fails.No; default is true

Examples

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

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

+

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

diff --git a/manual/Tasks/common.html b/manual/Tasks/common.html index d1c37aeb3..c71d84433 100644 --- a/manual/Tasks/common.html +++ b/manual/Tasks/common.html @@ -27,28 +27,28 @@

Common Attributes of all Tasks

All tasks share the following attributes:

- +
- - - + + + - - + - + - - + - + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
idUnique identifier for this task instance, can be + idUnique identifier for this task instance, can be used to reference this task in scripts.NoNo
tasknameA different name for this task instance - will + tasknameA different name for this task instance—will show up in the logging output.NoNo
descriptionRoom for your commentsNodescriptionRoom for your commentsNo
diff --git a/manual/Tasks/componentdef.html b/manual/Tasks/componentdef.html index 7c2fe6d59..63d249398 100644 --- a/manual/Tasks/componentdef.html +++ b/manual/Tasks/componentdef.html @@ -26,36 +26,25 @@

componentdef

Description

-

- Adds a component definition to the current project. - A component definition is the same as a - typedef except: -

-
    -
  1. - that it can only be used in other types or tasks that - accept components (by having an add() method). -
  2. -
  3. - multiple components may have the same name, provided they - implement different interfaces. -
  4. -
-

- The purpose of this is to allow internal Apache Ant definitions to be - made for tags like "and" or "or". -

+

Adds a component definition to the current project. A component definition is the same as +a typedef except:

+
    +
  1. that it can only be used in other types or tasks that accept components (by having + an add() method).
  2. +
  3. multiple components may have the same name, provided they implement different interfaces.
  4. +
+

The purpose of this is to allow internal Apache Ant definitions to be made for tags +like and or or.

-

Examples

+

Examples

-
 <componentdef name="or" onerror="ignore"
-    classname="com.apache.tools.ant.taskdefs.conditions.Or"/>
-  <componentdef name="or" onerror="ignore"
-    classname="com.apache.tools.ant.types.resources.selectors.Or"/>
-

- defines two components with the same name "or"; one is a condition - (see conditions) and one is - a selector (see selectors). -

+
+<componentdef name="or" onerror="ignore"
+              classname="com.apache.tools.ant.taskdefs.conditions.Or"/>
+<componentdef name="or" onerror="ignore"
+              classname="com.apache.tools.ant.types.resources.selectors.Or"/>
+

defines two components with the same name or; one is a condition +(see conditions) and one is a selector +(see selectors).

diff --git a/manual/Tasks/concat.html b/manual/Tasks/concat.html index 1bdbd5a07..6909d02ea 100644 --- a/manual/Tasks/concat.html +++ b/manual/Tasks/concat.html @@ -16,319 +16,240 @@ --> - - - - Concat - - - - -

Concat

- -

Description

- -

- Concatenates one or more - resources - to a single file or to the console. The destination - file will be created if it does not exist unless the resource - list is empty and ignoreempty is true. -

- -

Since Apache Ant 1.7.1, this task can be used as a - Resource Collection - that will return exactly one - resource. -

- -

- -Resource Collections are used to - select which resources are to be concatenated. There is no - singular attribute to specify a single resource to cat. -

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
destfile - The destination file for the concatenated stream. - If not specified the console will be used instead. - - No -
append - Specifies whether or not the file specified by 'destfile' - should be appended. Defaults to "no". - No
force - Specifies whether or not the file specified by 'destfile' - should be written to even if it is newer than all source files. - deprecated, use the overwrite attribute instead - Defaults to "yes". - No
overwrite - Specifies whether or not the file specified by 'destfile' - should be written to even if it is newer than all source files. - Since Ant 1.8.2. - Defaults to "yes". - No
forceReadOnlyOverwrite read-only destination - files. Since Ant 1.8.2No; defaults to false.
encoding - Specifies the encoding for the input files. Please see - Supported Encodings - for a list of possible values. Defaults to the platform's - default character encoding. - No
outputencoding - The encoding to use when writing the output file. - Since Ant 1.6. - Defaults to the value of the encoding attribute - if given or the default JVM encoding otherwise. - No
fixlastline - Specifies whether or not to check if - each file concatenated is terminated by - a new line. If this attribute is "yes" - a new line will be appended to the stream if - the file did not end in a new line. - Since Ant 1.6. - Defaults to "no". - This attribute does not apply to embedded text. - No
eol - Specifies what the end of line character are - for use by the fixlastline attribute. - Since Ant 1.6 - Valid values for this property are: -
    -
  • cr: a single CR
  • -
  • lf: a single LF
  • -
  • crlf: the pair CRLF
  • -
  • mac: a single CR
  • -
  • unix: a single LF
  • -
  • dos: the pair CRLF
  • -
- The default is platform dependent. - For Unix platforms, the default is "lf". - For DOS based systems (including Windows), - the default is "crlf". - For Mac OS, the default is "cr". -
No
binary - Since Ant 1.6.2 - If this attribute is set to true, the task concatenates the files - in a byte by byte fashion. If this attribute is false, concat will - not normally work for binary files due to character encoding - issues. - If this option is set to true, the destfile attribute must be - set, and the task cannot used nested text. - Also the attributes encoding, outputencoding, filelastline - cannot be used. - The default is "false". - No
ignoreempty - Since Ant 1.8.0 - Specifies whether or not the file specified by 'destfile' - should be created if the source resource list is - empty. Defaults to "true". - No
resourcename - Since Ant 1.8.3 - Specifies the name reported if this task is exposed - as a resource. - No
- -

Parameters specified as nested elements

-

Resource Collection

-

since Ant 1.7.

- -

- Any of the various - Resource Collection types can specify the resources to be - concatenated. -

- -

filterchain

-

since Ant 1.6.

-

The concat task supports nested - FilterChains.

- -

header, footer

-

since Ant 1.6.

-

Used to prepend or postpend text into the concatenated stream.

-

The text may be in-line or be in a file.

- - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
filtering - Whether to filter the text provided by this sub element, - default is "yes". - No
fileA file to place at the head or tail of the - concatenated text. - No
trimWhether to trim the value, default is "no"No
trimleading - Whether to trim leading white space on each line, default is "no" - No
- -

Examples

- -

Concatenate a string to a file:

- -
-  <concat destfile="README">Hello, World!</concat>
-      
- -

Concatenate a series of files to the console:

- -
-  <concat>
-    <fileset dir="messages" includes="*important*"/>
-  </concat>
-      
- -

Concatenate a single file, appending if the destination file exists:

- -
-  <concat destfile="NOTES" append="true">
-    <filelist dir="notes" files="note.txt"/>
-  </concat>
-      
- -

Concatenate a series of files, update the destination - file only if is older that all the source files:

- -
-  <concat destfile="${docbook.dir}/all-sections.xml"
-          force="no">
-    <filelist dir="${docbook.dir}/sections"
-         files="introduction.xml,overview.xml"/>
-    <fileset dir="${docbook.dir}"
-         includes="sections/*.xml"
-         excludes="introduction.xml,overview.xml"/>
-  </concat>
-      
- -

Concatenate a series of files, expanding Ant properties

-
-   <concat destfile="${build.dir}/subs">
-      <path>
-        <fileset dir="${src.dir}" includes="*.xml"/>
-        <pathelement location="build.xml"/>
-      </path>
-      <filterchain>
-        <expandproperties/>
-      </filterchain>
-   </concat>
-        
- -

Filter the lines containing project from build.xml and output - them to report.output, prepending with a header

-
-   <concat destfile="${build.dir}/report.output">
-      <header filtering="no" trimleading="yes">
-          Lines that contain project
-          ==========================
-      </header>
-      <path path="build.xml"/>
-      <filterchain>
-         <linecontains>
-           <contains value="project"/>
-         </linecontains>
-      </filterchain>
-   </concat>
-        
- -

Concatenate a number of binary files.

-
-   <concat destfile="${build.dir}/dist.bin" binary="yes">
-     <fileset file="${src.dir}/scripts/dist.sh" />
-     <fileset file="${build.dir}/dist.tar.bz2" />
-   </concat>
-        
- - + + + + Concat + + + + +

Concat

+ +

Description

+ +

Concatenates one or more resources to a single file or + to the console. The destination file will be created if it does not exist unless the resource + list is empty and ignoreempty is true.

+ +

Since Apache Ant 1.7.1, this task can be used as + a Resource Collection that will return + exactly one resource.

+ +

Resource Collections are used to select + which resources are to be concatenated. There is no singular attribute to specify a single + resource to cat.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
destfileThe destination file for the concatenated stream. If not specified the console will be + used instead.No
appendSpecifies whether or not the file specified by destfile should be + appended.No; defaults to no
forceSpecifies whether or not the file specified by destfile should be written to + even if it is newer than all source files. Deprecated, use + the overwrite attribute instead.No; defaults to yes
overwriteSpecifies whether or not the file specified by destfile should be written to + even if it is newer than all source files. Since Ant 1.8.2.No; defaults to yes
forceReadOnlyOverwrite read-only destination files. Since Ant 1.8.2No; defaults to false
encodingSpecifies the encoding for the input files. Please + see Supported + Encodings for a list of possible values.No; defaults to default JVM character encoding
outputencodingThe encoding to use when writing the output file. Since Ant 1.6.No; defaults to encoding if set or default JVM character encoding + otherwise
fixlastlineSpecifies whether or not to check if each file concatenated is terminated by a new + line. If this attribute is yes a new line will be appended to the stream if the + file did not end in a new line. Since Ant 1.6. This attribute does not apply to + embedded text.No; defaults to no
eolSpecifies what the end of line character are for use by the fixlastline + attribute. Since Ant 1.6 Valid values for this property are: +
    +
  • cr: a single CR
  • +
  • lf: a single LF
  • +
  • crlf: the pair CRLF
  • +
  • mac: a single CR
  • +
  • unix: a single LF
  • +
  • dos: the pair CRLF
  • +
No; default is platform dependent: lf for Unix, crlf for DOS family + (including Windows), cr for Mac OS 9 or earlier
binarySince Ant 1.6.2 If this attribute is set to true, the task concatenates + the files in a byte by byte fashion. If this attribute is false, concat will not + normally work for binary files due to character encoding issues. If this option is set + to true, the destfile attribute must be set, and the task cannot used + nested text. Also the + attributes encoding, outputencoding, filelastline cannot + be used.No; default is false
ignoreemptySince Ant 1.8.0 Specifies whether or not the file specified + by destfile should be created if the source resource list is empty. + No; defaults to true
resourcenameSince Ant 1.8.3 Specifies the name reported if this task is exposed as + a resource. + No
+ +

Parameters specified as nested elements

+

Resource Collection

+

since Ant 1.7.

+ +

Any of the various Resource Collection types + can specify the resources to be concatenated.

+ +

filterchain

+

since Ant 1.6.

+

The concat task supports nested FilterChains.

+ +

header, footer

+

since Ant 1.6.

+

Used to prepend or postpend text into the concatenated stream.

+

The text may be in-line or be in a file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
filteringWhether to filter the text provided by this sub element.No; default is yes
fileA file to place at the head or tail of the concatenated text.No
trimWhether to trim the value.No; default is no
trimleadingWhether to trim leading white space on each line.No; default is no
+ +

Examples

+ +

Concatenate a string to a file:

+ +
<concat destfile="README">Hello, World!</concat>
+ +

Concatenate a series of files to the console:

+ +
+<concat>
+  <fileset dir="messages" includes="*important*"/>
+</concat>
+ +

Concatenate a single file, appending if the destination file exists:

+ +
+<concat destfile="NOTES" append="true">
+  <filelist dir="notes" files="note.txt"/>
+</concat>
+ +

Concatenate a series of files, update the destination file only if is older that all + the source files:

+ +
+<concat destfile="${docbook.dir}/all-sections.xml"
+        force="no">
+  <filelist dir="${docbook.dir}/sections"
+            files="introduction.xml,overview.xml"/>
+  <fileset dir="${docbook.dir}"
+           includes="sections/*.xml"
+           excludes="introduction.xml,overview.xml"/>
+</concat>
+ +

Concatenate a series of files, expanding Ant properties

+
+<concat destfile="${build.dir}/subs">
+  <path>
+    <fileset dir="${src.dir}" includes="*.xml"/>
+    <pathelement location="build.xml"/>
+  </path>
+  <filterchain>
+    <expandproperties/>
+  </filterchain>
+</concat>
+ +

Filter the lines containing project from build.xml and output them to report.output, + prepending with a header

+
+<concat destfile="${build.dir}/report.output">
+  <header filtering="no" trimleading="yes">
+      Lines that contain project
+      ==========================
+  </header>
+  <path path="build.xml"/>
+  <filterchain>
+    <linecontains>
+      <contains value="project"/>
+    </linecontains>
+  </filterchain>
+</concat>
+ +

Concatenate a number of binary files.

+
+<concat destfile="${build.dir}/dist.bin" binary="yes">
+  <fileset file="${src.dir}/scripts/dist.sh"/>
+  <fileset file="${build.dir}/dist.tar.bz2"/>
+</concat>
+ + diff --git a/manual/Tasks/condition.html b/manual/Tasks/condition.html index 8505b818c..7c12da4fa 100644 --- a/manual/Tasks/condition.html +++ b/manual/Tasks/condition.html @@ -26,80 +26,71 @@

Condition

Description

-

Sets a property if a certain condition holds true - this is a -generalization of Available and Uptodate.

-

If the condition holds true, the property value is set to true by -default; otherwise, the property is not set. You can set the value to -something other than the default by specifying the value -attribute.

-

Conditions are specified as nested elements, -you must specify exactly one condition.

+

Sets a property if a certain condition holds true—this is a generalization +of Available and Uptodate.

+

If the condition holds true, the property value is set to true by default; otherwise, the +property is not set. You can set the value to something other than the default by specifying +the value attribute.

+

Conditions are specified as nested elements, you must specify exactly one +condition.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
propertyThe name of the property to set.YespropertyThe name of the property to set.Yes
valueThe value to set the property to. Defaults to - "true".NovalueThe value to set the property to.No; defaults to true
elseThe value to set the property to if the condition - evaluates to false. By default the property will remain unset. - Since Apache Ant 1.6.3 + elseThe value to set the property to if the condition evaluates to false. Since + Apache Ant 1.6.3 NoNo; by default the property will remain unset

Parameters specified as nested elements

-

All conditions to test are specified as nested elements, for a -complete list see here.

+

All conditions to test are specified as nested elements, for a complete list +see here.

Examples

-  <condition property="javamail.complete">
-    <and>
-      <available classname="javax.activation.DataHandler"/>
-      <available classname="javax.mail.Transport"/>
-    </and>
-  </condition>
-
-

sets the property javamail.complete if both the -JavaBeans Activation Framework and JavaMail are available in the -classpath.

+<condition property="javamail.complete"> + <and> + <available classname="javax.activation.DataHandler"/> + <available classname="javax.mail.Transport"/> + </and> +</condition> +

sets the property javamail.complete if both the JavaBeans Activation Framework and +JavaMail are available in the classpath.

-  <condition property="isMacOsButNotMacOsX">
-    <and>
-      <os family="mac"/>
-      <not>
-        <os family="unix"/>
-      </not>
-    </and>
-  </condition>
-
-

sets the property isMacOsButNotMacOsX if the current -operating system is MacOS, but not MacOS X - which Ant considers to be -in the Unix family as well.

+<condition property="isMacOsButNotMacOsX"> + <and> + <os family="mac"/> + <not> + <os family="unix"/> + </not> + </and> +</condition> +

sets the property isMacOsButNotMacOsX if the current operating system is MacOS, but +not MacOS X/macOS—which Ant considers to be in the Unix family as well.

-  <condition property="isSunOSonSparc">
-    <os name="SunOS" arch="sparc"/>
-  </condition>
-
-

sets the property isSunOSonSparc if the current -operating system is SunOS and if it is running on a sparc architecture.

+<condition property="isSunOSonSparc"> + <os name="SunOS" arch="sparc"/> +</condition> +

sets the property isSunOSonSparc if the current operating system is SunOS and if it +is running on a SPARC architecture.

diff --git a/manual/Tasks/conditions.html b/manual/Tasks/conditions.html index e8bc0522d..73efda481 100644 --- a/manual/Tasks/conditions.html +++ b/manual/Tasks/conditions.html @@ -25,937 +25,793 @@

Conditions

-

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 Conditions are described below. -

+

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 +Conditions are described below.

Core Conditions

-

These are the nested elements that can be used as conditions in the -<condition> and -<waitfor> tasks.

+

These are the nested elements that can be used as conditions in +the <condition> +and <waitfor> tasks.

not

-

The <not> element expects exactly one other -condition to be nested into this element, negating the result of the -condition. It doesn't have any attributes and accepts all nested -elements of the condition task as nested elements as well.

+

The <not> element expects exactly one other condition to be nested into this +element, negating the result of the condition. It doesn't have any attributes and accepts all +nested elements of the condition task as nested elements as well.

and

-

The <and> element doesn't have any attributes and -accepts an arbitrary number of conditions as nested elements - all -nested elements of the condition task are supported. This condition -is true if all of its contained conditions are, conditions will be -evaluated in the order they have been specified in the build file.

-

The <and> condition has the same shortcut -semantics as the Java && operator, as soon as one of the -nested conditions is false, no other condition will be evaluated.

+

The <and> element doesn't have any attributes and accepts an arbitrary number +of conditions as nested elements—all nested elements of the condition task are supported. +This condition is true if all of its contained conditions are, conditions will be evaluated in the +order they have been specified in the build file.

+

The <and> condition has the same shortcut semantics as the +Java && operator, as soon as one of the nested conditions is false, no other +condition will be evaluated.

or

-

The <or> element doesn't have any attributes and -accepts an arbitrary number of conditions as nested elements - all -nested elements of the condition task are supported. This condition -is true if at least one of its contained conditions is, conditions -will be evaluated in the order they have been specified in the build -file.

-

The <or> condition has the same -shortcut semantics as the Java || operator, as soon as one of the -nested conditions is true, no other condition will be evaluated.

+

The <or> element doesn't have any attributes and accepts an arbitrary number +of conditions as nested elements—all nested elements of the condition task are supported. +This condition is true if at least one of its contained conditions is, conditions will be evaluated +in the order they have been specified in the build file.

+

The <or> condition has the same shortcut semantics as the Java || +operator, as soon as one of the nested conditions is true, no other condition will be evaluated.

xor

-

The <xor> element performs an exclusive -or on all nested elements, similar to the ^ operator -in Java. It only evaluates to true if an odd number of nested conditions +

The <xor> element performs an exclusive or on all nested elements, similar to +the ^ operator in Java. It only evaluates to true if an odd number of nested conditions are true. There is no shortcutting of evaluation, unlike the <and> -and <or> tests. -It doesn't have any attributes and accepts all nested -elements of the condition task as nested elements as well.

+and <or> tests. It doesn't have any attributes and accepts all nested elements +of the condition task as nested elements as well.

available

-

This condition is identical to the Available task, all attributes and nested -elements of that task are supported, the property and value attributes -are redundant and will be ignored.

+

This condition is identical to the Available task, all attributes +and nested elements of that task are supported, the property and value attributes are redundant and +will be ignored.

uptodate

-

This condition is identical to the Uptodate task, all attributes and nested -elements of that task are supported, the property and value attributes -are redundant and will be ignored.

+

This condition is identical to the Uptodate task, all attributes and +nested elements of that task are supported, the property and value attributes are redundant and will +be ignored.

os

-

Test whether the current operating system is of a given type. Each -defined attribute is tested and the result is true only if all -the tests succeed. +

Test whether the current operating system is of a given type. Each defined attribute is tested +and the result is true only if all the tests succeed.

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
familyThe name of the operating system family to expect.NofamilyThe name of the operating system family to expect.No
nameThe name of the operating system to expect.NonameThe name of the operating system to expect.No
archThe architecture of the operating system to expect.NoarchThe architecture of the operating system to expect.No
versionThe version of the operating system to expect.NoversionThe version of the operating system to expect.No

Supported values for the family attribute are:

equals

Tests whether the two given values are equal.

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
arg1First value to test.Yesarg1First value to test.Yes
arg2Second value to test.Yesarg2Second value to test.Yes
casesensitivePerform a case sensitive comparison. Default is - true.NocasesensitivePerform a case sensitive comparison.No; default is true
trimTrim whitespace from arguments before comparing - them. Default is false.NotrimTrim whitespace from arguments before comparing them.No; default is false
forcestringForce string comparison of arg1/arg2. - Default is false. Since Apache Ant 1.8.1 + forcestringForce string comparison of arg1/arg2. Since Apache Ant 1.8.1 NoNo; default is false

isset

Test whether a given property has been set in this project.

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
propertyThe name of the property to test.YespropertyThe name of the property to test.Yes

checksum

-

This condition is identical to the Checksum -task, all attributes and nested elements of that task are supported, -the property and overwrite attributes are redundant and will be -ignored.

+

This condition is identical to the Checksum task, all attributes and +nested elements of that task are supported, the property and overwrite attributes are redundant and +will be ignored.

http

-

The http condition checks for a valid response from a -web server of the specified url. By default, HTTP responses errors -of 400 or greater are viewed as invalid.

- +

The http condition checks for a valid response from a web server of the specified +URL. By default, HTTP responses errors of 400 or greater are viewed as invalid.

+
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
urlThe full URL of the page to request. The web server must - return a status code below the value of errorsBeginAtYes.urlThe full URL of the page to request. The web server must return a status code below the + value of errorsBeginAtYes
errorsBeginAtThe lowest HTTP response code that signals an error; - by default '400'; server errors, not-authorized, not-found and the like - are detectedNoerrorsBeginAtThe lowest HTTP response code that signals an error; server errors, not-authorized, + not-found and the like are detectedNo; default is 400
requestMethodThe HTTP method to be used when issuing the request. - Any of GET, POST, HEAD, OPTIONS, PUT, DELETE and TRACE - are valid, subject to protocol restrictions. The default is "GET".
- since Ant 1.8.0
NorequestMethodThe HTTP method to be used when issuing the request. Any + of GET, POST, HEAD, OPTIONS, PUT, DELETE + and TRACE are valid, subject to protocol restrictions.
since Ant + 1.8.0
No; default is GET
followRedirectsWhether redirects should be followed. The default - is true
- since Ant 1.9.7
NofollowRedirectsWhether redirects should be followed.
since Ant 1.9.7
No; default is true

socket

-

The socket condition checks for the existence of a -TCP/IP listener at the specified host and port.

- +

The socket condition checks for the existence of a TCP/IP listener at the specified +host and port.

+
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
serverThe DNS name or IP address of the server.Yes.serverThe DNS name or IP address of the server.Yes
portThe port number to connect to.Yes.portThe port number to connect to.Yes

filesmatch

-

Test two files for matching. Nonexistence of one file results in "false", -although if neither exists they are considered equal in terms of content. -This test does a byte for byte comparison, so test time scales with -byte size. Note: if the files are different sizes, one of them is missing -or the filenames match the answer is so obvious the detailed test is omitted. - +

Test two files for matching. Nonexistence of one file results in false, although if +neither exists they are considered equal in terms of content. This test does a byte for byte +comparison, so test time scales with byte size. Note: if the files are different +sizes, one of them is missing or the filenames match the answer is so obvious the detailed test is +omitted.

- +
- - - + + + - - - + + + - - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
file1First file to testYesfile1First file to testYes
file2Second file to testYesfile2Second file to testYes
textfileWhether to ignore line endings when comparing - files; defaults to false which triggers a binary - comparison. Since Ant 1.7 + textfileWhether to ignore line endings when comparing files. Since Ant 1.7 NoNo; defaults to false which triggers a binary comparison

contains

Tests whether a string contains another one.

- +
- - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
stringThe string to search in.YesstringThe string to search in.Yes
substringThe string to search for.YessubstringThe string to search for.Yes
casesensitivePerform a case sensitive comparison. Default is - true.NocasesensitivePerform a case sensitive comparison.No; default is true

istrue

-

Tests whether a string equals any of the Ant definitions of true, -that is "true","yes", or "on"

- +

Tests whether a string equals any of the Ant definitions of true, that +is true, yes, or on

+
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
valuevalue to testYesvaluevalue to testYes
 <istrue value="${someproperty}"/>
-<istrue value="false"/>
-
+<istrue value="false"/>

isfalse

-

Tests whether a string is not true, the negation of <istrue> -

- +

Tests whether a string is not true, the negation of <istrue>

+
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
valuevalue to testYesvaluevalue to testYes
 <isfalse value="${someproperty}"/>
-<isfalse value="false"/>
-
+<isfalse value="false"/>

isreference

-

Test whether a given reference has been defined in this project and -- optionally - is of an expected type.

+

Test whether a given reference has been defined in this project and—optionally—is of +an expected type.

Since Apache Ant 1.6.

- +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
refidThe id of the reference to test.YesrefidThe id of the reference to test.Yes
typeName of the data type or task this reference is - expected to be.NotypeName of the data type or task this reference is expected to be.No

issigned

-

- Test whether a jarfile is signed. - If the name of the - signature is passed, the file is checked for presence of that - particular signature; otherwise the file is checked for the - existence of any signature. It does not perform rigorous - signature validation; it only looks for the presence of a signature. -

-

- Since Apache Ant 1.7. -

- - - - - - - - - - +

Test whether a jarfile is signed. If the name of the signature is passed, the file is checked +for presence of that particular signature; otherwise the file is checked for the existence of any +signature. It does not perform rigorous signature validation; it only looks for the presence of a +signature.

+

Since Apache Ant 1.7.

+
AttributeDescriptionRequired
file - The jarfile that is to be tested for the presence - of a signature. - Yes
+ + + + - - - + + + -
AttributeDescriptionRequired
name The signature name to check for.NofileThe jarfile that is to be tested for the presence of a signature.Yes
+ + name + The signature name to check for. + No + +

isfileselected

-

- Test whether a file passes an embedded - selector. -

-

- Since Apache Ant 1.6.3. -

- - - - - - - - - - +

Test whether a file passes an embedded selector.

+

Since Apache Ant 1.6.3.

+
AttributeDescriptionRequired
file - The file to check if is passes the embedded selector. - Yes
+ + + + + + + + + - - - + + + -
AttributeDescriptionRequired
fileThe file to check if is passes the embedded selector.Yes
basedirThe base directory to use for name based selectors. It this is not set, - the project's basedirectory will be used.NobasedirThe base directory to use for name based selectors. It this is not set, the + project's basedir will be used.No
-

- Example usage: -

+ +

Example usage:

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

typefound

-

Test whether a given type is defined, and that -its implementation class can be loaded. Types include -tasks, datatypes, scriptdefs, macrodefs and presetdefs.

+

Test whether a given type is defined, and that its implementation class can be loaded. Types +include tasks, datatypes, scriptdefs, macrodefs and presetdefs.

Since Apache Ant 1.7.

- +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
nameName of the typeYesnameName of the typeYes
uri - The uri that this type lives in. - NouriThe URI that this type lives in.No
-

- Example usages: -

+

Example usages:

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

scriptcondition

-

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

-

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

+

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

+

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

Since Apache Ant 1.7.

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
languagescript languageYeslanguagescript languageYes
manager - The script engine manager to use. - See the script task - for using this attribute. - No - default is "auto"managerThe script engine manager to use. See the script task + for using this attribute.No; default is auto
valuedefault boolean valueNo - default is "false"valuedefault boolean valueNo; default is false
srcfilename of script sourceNosrcfilename of script sourceNo
encodingThe encoding of the script source. Since Ant 1.10.2.No - defaults to default JVM encodingencodingThe encoding of the script source. Since Ant 1.10.2.No; defaults to default JVM character encoding
setbeanswhether to have all properties, references and targets as - global variables in the script. since Ant 1.8.0No, default is "true".setbeanswhether to have all properties, references and targets as global variables in the + script. since Ant 1.8.0No; default is true
classpath - The classpath to pass into the script. - NoclasspathThe classpath to pass into the script.No
classpathrefThe classpath to use, given as a - reference to a path defined elsewhere. - NoclasspathrefThe classpath to use, given as a reference to a path + defined elsewhere.No
Parameters specified as nested elements
classpath
-

- See the script task - for using this nested element. -

+

See the script task for using this nested element.

Description
-

-The script supports script language inline, this script has access to the -same beans as the <script> task, and to the self bean, -which refers back to the condition itself. If the script evaluates to a boolean result, -this is the result of the condition's evaluation (since Ant 1.7.1). -Alternatively, self.value can be used to set the evaluation result. -

-

-Example: -

+

The script supports script language inline, this script has access to the same beans as +the <script> task, and to the self bean, which refers back to the +condition itself. If the script evaluates to a boolean result, this is the result of the condition's +evaluation (since Ant 1.7.1). Alternatively, self.value can be used to set +the evaluation result.

+

Example:

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

Sets the default value of the condition to true, then in the script, sets the value +to false. This condition always evaluates to false.

parsersupports

-

Tests whether Ant's XML parser supports a given -feature or property, as per the SAX/JAXP specifications, by -attempting to set the appropriate property/feature/

+

Tests whether Ant's XML parser supports a given feature or property, as per the SAX/JAXP +specifications, by attempting to set the appropriate property/feature

Since Apache Ant 1.7.

- +
- - - + + + - - - + + + - - + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
propertyproperty to setExactly one of the twopropertyproperty to setExactly one of the two
featurefeature to setfeaturefeature to set
valuestring (property) or boolean (feature)For property tests, but not for feature testsvaluestring (property) or boolean (feature)For property tests, but not for feature tests
-
-<parsersupports feature="http://xml.org/sax/features/namespaces"/>
-
-Check for namespace support. All SAX2 parsers should have this. +
<parsersupports feature="http://xml.org/sax/features/namespaces"/>
+

Check for namespace support. All SAX2 parsers should have this.

+
 <or>
   <parsersupports
     feature="http://apache.org/xml/features/validation/schema"/>
   <parsersupports
     feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/>
-</or>
-
- -Check for XML Schema support. +</or> +

Check for XML Schema support.

 <parsersupports
   property="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
-  value="document.xsd"/>
-
- -Check for Xerces-specific definition of the location of the no namespace schema. + value="document.xsd"/> +

Check for Xerces-specific definition of the location of the no namespace schema.

isreachable

-

Uses Java 5+ networking APIs to probe for a (remote) system being -reachable. Exactly what probe mechanisms are used is an implementation -feature of the JVM. They may include ICMP "ping" packets, UDP or TCP connections -to port 7 "echo service" or other means. On Java 1.4 and earlier, being able -to resolve the hostname is considered success. This means that if DNS is not -working or a URL/hostname is bad, the test will fail, but otherwise succeed -even if the remote host is actually absent. - -

-

-This condition turns unknown host exceptions into false conditions. This is -because on a laptop, DNS is one of the first services when the network goes; you -are implicitly offline. -

-

- If a URL is supplied instead of a host, the hostname is extracted - and used in the test - all other parts of the URL are discarded. -

-

-The test may not work through firewalls, that is, something may be reachable -using a protocol such as HTTP, while the lower level ICMP packets get dropped -on the floor. Similarly, a host may detected as reachable with ICMP, but -not reachable on other ports (i.e. port 80), because of firewalls. -

+

Uses Java 5+ networking APIs to probe for a (remote) system being reachable. Exactly what probe +mechanisms are used is an implementation feature of the JVM. They may include ICMP "ping" packets, +UDP or TCP connections to port 7 "echo service" or other means. On Java 1.4 and earlier, being able +to resolve the hostname is considered success. This means that if DNS is not working or a +URL/hostname is bad, the test will fail, but otherwise succeed even if the remote host is actually +absent.

+

This condition turns unknown host exceptions into false conditions. This is because on a laptop, +DNS is one of the first services when the network goes; you are implicitly offline.

+

If a URL is supplied instead of a host, the hostname is extracted and used in the +test—all other parts of the URL are discarded.

+

The test may not work through firewalls, that is, something may be reachable using a protocol +such as HTTP, while the lower level ICMP packets get dropped on the floor. Similarly, a host may +detected as reachable with ICMP, but not reachable on other ports (i.e. port 80), because of +firewalls.

Since Apache Ant 1.7.

- +
- - - + + + - - - + + + - - + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
hosthost to check forExactly one of the twohosthost to check forExactly one of the two
urlURL containing hostnameurlURL containing hostname
timeouttimeout in secondsno, default is 30stimeouttimeout in secondsNo; default is 30
 <condition property="offline">
-  <isreachable url="http://ibiblio.org/maven/" />
-</condition>
-
+ <isreachable url="http://ibiblio.org/maven/"/> +</condition> -

-Probe for the maven repository being reachable. -

+

Probe for the Maven repository being reachable.

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

-Probe for the maven repository being reachable using the hostname, ten second timeout.. -

+

Probe for the Maven repository being reachable using the hostname, ten second timeout.

length

-

This condition is a facet of the Length task. - It is used to test the length of a string or one or more files. - Since Ant 1.6.3 -

+

This condition is a facet of the Length task. It is used to test the +length of a string or one or more files. Since Ant 1.6.3

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

Verify a string is of a certain length.

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

Verify that file foo is not empty.

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

Verify that file foo is not empty.

isfailure

-

Test the return code of an executable (see the -Exec task) for failure. Since Ant 1.7

+

Test the return code of an executable (see the Exec task) for +failure. Since Ant 1.7

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
codeThe return code to test.YescodeThe return code to test.Yes

resourcecount

-

This condition is a facet of the - ResourceCount task. - It is used to test the size of a - resource collection. - Since Ant 1.7 -

+

This condition is a facet of the ResourceCount task. It is used +to test the size of a resource +collection. Since Ant 1.7

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

Verify that a resource collection is not empty.

resourcesmatch

-

Test resources for matching. Nonexistence of one or more resources results in -"false", although if none exists they are considered equal in terms of content. -By default this test does a byte for byte comparison, so test time scales with -byte size. Note: if the files are different sizes, one of them is missing -or the filenames match the answer is so obvious the detailed test is omitted. -The resources to check are specified as nested -resource collections, -meaning that more than two resources can be checked; in this case all resources -must match. Since Ant 1.7 -

- +

Test resources for matching. Nonexistence of one or more resources results in false, +although if none exists they are considered equal in terms of content. By default, this test does a +byte for byte comparison, so test time scales with byte size. Note: if the files +are different sizes, one of them is missing or the filenames match the answer is so obvious the +detailed test is omitted. The resources to check are specified as +nested resource collections, meaning that more than +two resources can be checked; in this case all resources must match. Since Ant 1.7

+
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
astextWhether to ignore line endings - when comparing resource content; defaults to false, - while true triggers a binary comparison. - NoastextWhether to ignore line endings when comparing resource content; true triggers a + binary comparison.No; defaults to false

resourcecontains

Tests whether a resource contains a given (sub)string.

-

The resources to check are specified via references or - in the - case of file resources via the resource attribute. Since Ant 1.7.1 -

- +

The resources to check are specified via references or—in the case of file +resources—via the resource attribute. Since Ant 1.7.1

+
- - - + + + - - - + + + - - + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
resourceName of a file that is the resource to test. - Exactly one of the tworesourceName of a file that is the resource to test.Exactly one of the two
refidReference to a resource defined inside the project.refidReference to a resource defined inside the project.
substringThe string to search for.YessubstringThe string to search for.Yes
casesensitivePerform a case sensitive comparison. Default is - true.NocasesensitivePerform a case sensitive comparison.No; default is true

hasmethod

-

- Tests for a class having a method or field. If the class is not found - or fails to load, the build fails. - - Since Ant 1.7 -

+

Tests for a class having a method or field. If the class is not found or fails to load, the build +fails. Since Ant 1.7

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
AttributeDescriptionRequired
classnamename of the class to loadyes
fieldname of a field to look forExactly one of the two
methodname of a method to look for
ignoreSystemClassesshould system classes be ignored?No - default is false
classpatha class pathNo
classpathrefreference to a class pathNo
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
classnamename of the class to loadyes
fieldname of a field to look forExactly one of the two
methodname of a method to look for
ignoreSystemClassesshould system classes be ignored?No; default is false
classpatha class pathNo
classpathrefreference to a class pathNo
-

- There is also a nested <classpath> element, which can be used to specify - a classpath. -

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

Looks for the method trimToSize in the ArrayList class.

+

There is also a nested <classpath> element, which can be used to specify a +classpath.

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

Looks for the method trimToSize() in the java.util.ArrayList class.

matches

-

- Test if the specified string matches the specified regular - expression pattern. - Since Ant 1.7

+

Test if the specified string matches the specified regular expression pattern. Since Ant +1.7

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
stringThe string to test.YesstringThe string to test.Yes
patternThe regular expression pattern used to test.Yes, unless there is a nested - <regexp> element.patternThe regular expression pattern used to test.Yes, unless there is a nested <regexp> element.
casesensitivePerform a case sensitive match. Default is - true.NocasesensitivePerform a case sensitive match.No; default is true
multiline - Perform a multi line match. - Default is false.NomultilinePerform a multi line match.No; default is false
singleline - This allows '.' to match new lines. - SingleLine is not to be confused with multiline, SingleLine is a perl - regex term, it corresponds to dotall in java regex. - Default is false.NosinglelineThis allows . to match new lines. SingleLine is not to be confused with + multiline, SingleLine is a perl regex term, it corresponds to dotall in + Java regex.No; default is false
-

- There is also an optional <regexp> element, which can be used to specify - a regular expression instead of the "pattern" attribute. - See Regexp Type for the description - of the nested element regexp and of - the choice of regular expression implementation. -

-

- An example: -

+

There is also an optional <regexp> element, which can be used to specify a +regular expression instead of the pattern attribute. +See Regexp Type for the description of the nested element regexp +and of the choice of regular expression implementation.

+

An example:

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

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

+ unless="legal-password"/> +

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

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

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

+</condition> +

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

 <regexp id="date.pattern" pattern="^[0123]\d-[01]\d-[12]\d\d\d$"/>
 
@@ -963,12 +819,9 @@ must match. Since Ant 1.7
   <matches string="${today}">
     <regexp refid="date.pattern"/>
   </matches>
-</au:assertTrue>
-
-

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

+</au:assertTrue> +

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

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

antversion

-

This condition is identical to the Antversion task, all attributes are supported, the property attribute -is redundant and will be ignored.

- +

This condition is identical to the Antversion task, all attributes +are supported, the property attribute is redundant and will be ignored.

hasfreespace

-

- Tests a partition to see if there is enough space. - Since Ant 1.7.0

-

Needed attribute can be specified using standard computing terms:

- +

Tests a partition to see if there is enough space. Since Ant 1.7.0

+

Needed attribute can be specified using standard computing terms:

+ - +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
partitionThe partition or filesystem to check for freespaceYespartitionThe partition or filesystem to check for free spaceYes
neededThe amount of freespace needed.YesneededThe amount of free space needed.Yes
-

- An example: -

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

An example:

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

islastmodified

-

Tests the last modified date of a resource. Since Ant -1.8.0

+

Tests the last modified date of a resource. Since Ant 1.8.0

- +
- - - + + + - - - + + + - - + + - - - + + + - - + +
AttributeDescriptionRequiredAttributeDescriptionRequired
millisSpecifies the expected modification time of the resource - in milliseconds since midnight Jan 1 1970.Exactly one of the - twomillisSpecifies the expected modification time of the resource in milliseconds since midnight Jan + 1 1970.Exactly one of the two
datetimeSpecifies the expected modification time of the - resource. The special value "now" indicates the - current time.datetimeSpecifies the expected modification time of the resource. The special + value now indicates the current time.
patternSimpleDateFormat-compatible pattern string. - Defaults to MM/DD/YYYY HH:MM AM_or_PM or MM/DD/YYYY HH:MM:SS AM_or_PM. - NopatternSimpleDateFormat-compatible pattern string.No; defaults to MM/dd/YYYY hh:mm a or MM/dd/YYYY hh:mm:ss a
modeHow to compare the timestamp. Accepted values - are "equals", "before", "not-before", "after" and "not-after". - No, defaults to "equals".modeHow to compare the timestamp. Accepted values + are equals, before, not-before, after and not-after. + No; defaults to equals

The actual resource to test is specified as a nested element.

-

- An example: -

+

An example:

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

resourceexists

@@ -1082,49 +918,40 @@ is redundant and will be ignored.

The actual resource to test is specified as a nested element.

-

- An example: -

+

An example:

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

javaversion

-

Tests the version of the JVM executing Ant. Since Ant -1.10.2

+

Tests the version of the JVM executing Ant. Since Ant 1.10.2

- +
- - - + + + - - - + + + - - - + +
AttributeDescriptionRequiredAttributeDescriptionRequired
atleastThe version that this JVM is at least. - The format is major.minor.point. Starting with Java 9 really - only the major number is determined.Exactly one of the twoatleastThe version that this JVM is of at least. The format + is major.minor.point. Starting with Java 9 really only the major number is + determined.Exactly one of the two
exactlyThe version that this JVM is exactly. - The format is major.minor.point. Starting with Java 9 really - only the major number is determined.NoexactlyThe version that this JVM is of exactly. The format + is major.minor.point. Starting with Java 9 really only the major number is + determined.
-

- An example: -

+

An example:

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

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

diff --git a/manual/Tasks/copy.html b/manual/Tasks/copy.html index 06a88a385..69219f3b0 100644 --- a/manual/Tasks/copy.html +++ b/manual/Tasks/copy.html @@ -26,349 +26,272 @@

Copy

Description

-

Copies a file or resource collection to a new file or directory. By default, files are -only copied if the source file is newer than the destination file, -or when the destination file does not exist. However, you can explicitly -overwrite files with the overwrite attribute.

+

Copies a file or resource collection to a new file or directory. By default, files are only +copied if the source file is newer than the destination file, or when the destination file does not +exist. However, you can explicitly overwrite files with the overwrite attribute.

-

Resource -Collections are used to select a group of files to copy. To use a -resource collection, the todir attribute must be set. -Note that some resources (for example -the file resource) -return absolute paths as names and the result of using them without -using a nested mapper (or the flatten attribute) may not be what you +

Resource Collections are used to select a group +of files to copy. To use a resource collection, the todir attribute must be +set. Note that some resources (for example +the file resource) return absolute paths as names and the +result of using them without using a nested mapper (or the flatten attribute) may not be what you expect.

-

-Note: If you employ filters in your copy operation, -you should limit the copy to text files. Binary files will be corrupted -by the copy operation. -This applies whether the filters are implicitly defined by the -filter task or explicitly provided to the copy -operation as filtersets. - See encoding note. -

+

Note: If you employ filters in your copy operation, you should limit the copy to +text files. Binary files will be corrupted by the copy operation. This applies whether the filters +are implicitly defined by the filter task or explicitly provided to the +copy operation +as filtersets. See encoding +note.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe file to copy.Yes, unless a nested - resource collection element is used.fileThe file to copy.Yes, unless a nested resource collection element is used
preservelastmodifiedGive the copied files the same last modified - time as the original source files.No; defaults to false.preservelastmodifiedGive the copied files the same last modified time as the original source files.No; defaults to false
tofileThe file to copy to.With the file - attribute, either tofile or todir can be used.
- - With nested resource collection elements, if the number of - included resources - is greater than 1, or if only the dir attribute is - specified in the <fileset>, or if the - file attribute is also specified, then only - todir is allowed.
- Prior to Apache Ant 1.8.2, the tofile attribute - only supported file resources to copy from.
tofileThe file to copy to. Prior to Apache Ant 1.8.2, the tofile attribute only + supported file resources to copy from.With the file attribute, either tofile or todir + can be used.
With nested resource collection elements, if the number of included + resources is greater than 1, or if only the dir attribute is specified in + the <fileset>, or if the file attribute is also specified, then + only todir is allowed.
todirThe directory to copy to.todirThe directory to copy to.
overwriteOverwrite existing files even if the destination - files are newer.No; defaults to false.overwriteOverwrite existing files even if the destination files are newer.No; defaults to false
forceOverwrite read-only destination - files. since Ant 1.8.2No; defaults to false.forceOverwrite read-only destination files. since Ant 1.8.2No; defaults to false
filteringIndicates whether token filtering using the global - build-file filters should take place during the copy. - Note: Nested <filterset> elements will - always be used, even if this attribute is not specified, or its value is - false (no, or off).No; defaults to false.filteringIndicates whether token filtering using the global + build-file filters should take place during the copy. Note: + Nested <filterset> elements will always be used, even if this attribute is + not specified, or its value is false, no, or off.No; defaults to false
flattenIgnore the directory structure of the source files, - and copy all files into the directory specified by the todir - attribute. Note that you can achieve the same effect by using a - flatten mapper.No; defaults to false.flattenIgnore the directory structure of the source files, and copy all files into the directory + specified by the todir attribute. Note that you can achieve the same effect by + using a flatten mapper.No; defaults to false
includeEmptyDirsCopy any empty directories included in the FileSet(s). - No; defaults to true.includeEmptyDirsCopy any empty directories included in the FileSet(s).No; defaults to true
failonerrorIf false, log a warning message, but do not stop the - build, when the file to copy does not exist or one of the nested - filesets points to a directory that doesn't exist or an error occurs - while copying. - No; defaults to true.failonerrorIf false, log a warning message, but do not stop the build, when the file to copy + does not exist or one of the nested filesets points to a directory that doesn't exist or an + error occurs while copying.No; defaults to true
quietIf true and failonerror is false, then do not log a - warning message when the file to copy does not exist or one of the nested - filesets points to a directory that doesn't exist or an error occurs - while copying. since Ant 1.8.3. - No; defaults to false.quietIf true and failonerror is false, then do not log a warning message + when the file to copy does not exist or one of the nested filesets points to a directory that + doesn't exist or an error occurs while copying. since Ant 1.8.3.No; defaults to false
verboseLog the files that are being copied.No; defaults to false.verboseLog the files that are being copied.No; defaults to false
encodingThe encoding to assume when filter-copying the - files. since Ant 1.5.No - defaults to default JVM encodingencodingThe encoding to assume when filter-copying the files. since Ant 1.5.No; defaults to default JVM character encoding
outputencodingThe encoding to use when writing the files. + outputencodingThe encoding to use when writing the files. since Ant 1.6.No - defaults to the value of the encoding - attribute if given or the default JVM encoding otherwise.No; defaults to encoding if set or default JVM character encoding otherwise
enablemultiplemappings - If true the task will process to all the mappings for a - given source path. If false the task will only process - the first file or directory. This attribute is only relevant - if there is a mapper subelement. - since Ant 1.6.No - defaults to false.enablemultiplemappingsIf true the task will process to all the mappings for a given source + path. If false the task will only process the first file or directory. This attribute + is only relevant if there is a mapper subelement. since Ant 1.6.No; defaults to false
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. Default is 1 second, or 2 seconds on DOS - systems. This can also be useful if source and target files live - on separate machines with clocks being out of sync. since Ant - 1.6.2.NogranularityThe 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. This can also be useful if source and target files live on separate + machines with clocks being out of sync. since Ant 1.6.2.No; default is 1 second, or 2 seconds on DOS systems

Parameters specified as nested elements

fileset or any other resource collection

-

Resource -Collections are used to select groups of files to copy. To use a -resource collection, the todir attribute must be set.

-

Prior to Ant 1.7, only <fileset> has been -supported as a nested element.

+

Resource Collections are used to select groups +of files to copy. To use a resource collection, the todir attribute must be set.

+

Prior to Ant 1.7, only <fileset> has been supported as a nested element.

mapper

-

You can define filename transformations by using a nested mapper element. The default mapper used by - <copy> is the identity mapper.

-

- Since Ant 1.6.3, - one can use a filenamemapper type in place of the mapper element. -

+

You can define filename transformations by using a +nested mapper element. The default mapper used +by <copy> is the identity +mapper.

+

Since Ant 1.6.3, one can use a filenamemapper type in place of the mapper element.

-

Note that the source name handed to the mapper depends on the -resource collection you use. If you use <fileset> -or any other collection that provides a base directory, the name -passed to the mapper will be a relative filename, relative to the base -directory. In any other case the absolute filename of the source will -be used.

+

Note that the source name handed to the mapper depends on the resource collection you use. If +you use <fileset> or any other collection that provides a base directory, the +name passed to the mapper will be a relative filename, relative to the base directory. In any other +case the absolute filename of the source will be used.

filterset

-

FilterSets are used to replace -tokens in files that are copied. - To use a FilterSet, use the nested <filterset> element.

+

FilterSets are used to replace tokens in files that are +copied. To use a FilterSet, use the nested <filterset> element.

It is possible to use more than one filterset.

filterchain

-

The Copy task supports nested -FilterChains.

+

The Copy task supports nested FilterChains.

-

-If <filterset> and <filterchain> elements are used inside the -same <copy> task, all <filterchain> elements are processed first -followed by <filterset> elements. -

+

If <filterset> and <filterchain> elements are used inside +the same <copy> task, all <filterchain> elements are processed +first followed by <filterset> elements.

Examples

-

Copy a single file

-
-  <copy file="myfile.txt" tofile="mycopy.txt"/>
-
-

Copy a single file to a directory

+

Copy a single file

+
<copy file="myfile.txt" tofile="mycopy.txt"/>
+

Copy a single file to a directory

+
<copy file="myfile.txt" todir="../some/other/dir"/>
+

Copy a directory to another directory

-  <copy file="myfile.txt" todir="../some/other/dir"/>
+<copy todir="../new/dir">
+  <fileset dir="src_dir"/>
+</copy>
 
-

Copy a directory to another directory

+

Copy a set of files to a directory

-  <copy todir="../new/dir">
-    <fileset dir="src_dir"/>
-  </copy>
-
-

Copy a set of files to a directory

-
-  <copy todir="../dest/dir">
-    <fileset dir="src_dir">
-      <exclude name="**/*.java"/>
-    </fileset>
-  </copy>
+<copy todir="../dest/dir">
+  <fileset dir="src_dir">
+    <exclude name="**/*.java"/>
+  </fileset>
+</copy>
 
-  <copy todir="../dest/dir">
-    <fileset dir="src_dir" excludes="**/*.java"/>
-  </copy>
-
-

Copy a set of files to a directory, appending -.bak to the file name on the fly

+<copy todir="../dest/dir"> + <fileset dir="src_dir" excludes="**/*.java"/> +</copy> +

Copy a set of files to a directory, appending .bak to the file name on the +fly

-  <copy todir="../backup/dir">
-    <fileset dir="src_dir"/>
-    <globmapper from="*" to="*.bak"/>
-  </copy>
-
+<copy todir="../backup/dir"> + <fileset dir="src_dir"/> + <globmapper from="*" to="*.bak"/> +</copy> -

Copy a set of files to a directory, replacing @TITLE@ with Foo Bar -in all files.

+

Copy a set of files to a directory, replacing @TITLE@ with Foo +Bar in all files.

-  <copy todir="../backup/dir">
-    <fileset dir="src_dir"/>
-    <filterset>
-      <filter token="TITLE" value="Foo Bar"/>
-    </filterset>
-  </copy>
-
+<copy todir="../backup/dir"> + <fileset dir="src_dir"/> + <filterset> + <filter token="TITLE" value="Foo Bar"/> + </filterset> +</copy> -

Collect all items from the current CLASSPATH setting into a -destination directory, flattening the directory structure.

+

Collect all items from the current CLASSPATH setting into a destination +directory, flattening the directory structure.

-  <copy todir="dest" flatten="true">
-    <path>
-      <pathelement path="${java.class.path}"/>
-    </path>
-  </copy>
-
+<copy todir="dest" flatten="true"> + <path> + <pathelement path="${java.class.path}"/> + </path> +</copy> -

Copies some resources to a given directory.

+

Copies some resources to a given directory.

-  <copy todir="dest" flatten="true">
-    <resources>
-      <file file="src_dir/file1.txt"/>
-      <url url="http://ant.apache.org/index.html"/>
-    </resources>
-  </copy>
-
+<copy todir="dest" flatten="true"> + <resources> + <file file="src_dir/file1.txt"/> + <url url="http://ant.apache.org/index.html"/> + </resources> +</copy> -

If the example above didn't use the flatten attribute, - the <file> resource would have returned its full - path as source and target name and would not have been copied at - all. In general it is a good practice to use an explicit mapper - together with resources that use an absolute path as their - names.

+

If the example above didn't use the flatten attribute, the <file> +resource would have returned its full path as source and target name and would not have been copied +at all. In general it is a good practice to use an explicit mapper together with resources that use +an absolute path as their names.

-

Copies the two newest resources into a destination directory.

+

Copies the two newest resources into a destination directory.

-  <copy todir="dest" flatten="true">
-    <first count="2">
-      <sort>
-        <date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
-        <resources>
-          <file file="src_dir/file1.txt"/>
-          <file file="src_dir/file2.txt"/>
-          <file file="src_dir/file3.txt"/>
-          <url url="http://ant.apache.org/index.html"/>
-        </resources>
-      </sort>
-    </first>
-  </copy>
-
+<copy todir="dest" flatten="true"> + <first count="2"> + <sort> + <date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/> + <resources> + <file file="src_dir/file1.txt"/> + <file file="src_dir/file2.txt"/> + <file file="src_dir/file3.txt"/> + <url url="http://ant.apache.org/index.html"/> + </resources> + </sort> + </first> +</copy> -

The paragraph following the previous example applies to this - example as well.

+

The paragraph following the previous example applies to this example as well.

-

Unix Note: File permissions are not retained when files -are copied; they end up with the default UMASK permissions -instead. This -is caused by the lack of any means to query or set file permissions in the -current Java runtimes. If you need a permission-preserving copy function, -use <exec executable="cp" ... > instead. -

+

Unix Note: File permissions are not retained when files are copied; they end up +with the default UMASK permissions instead. This is caused by the lack of any means to +query or set file permissions in the current Java runtimes. If you need a permission-preserving copy +function, use <exec executable="cp" ... > instead.

-

Windows Note: If you copy a file to a directory -where that file already exists, but with different casing, -the copied file takes on the case of the original. The workaround is to -delete -the file in the destination directory before you copy it. -

-

- Important Encoding Note: - The reason that binary files when filtered get corrupted is that - filtering involves reading in the file using a Reader class. This - has an encoding specifying how files are encoded. There are a number - of different types of encoding - UTF-8, UTF-16, Cp1252, ISO-8859-1, - US-ASCII and (lots) others. On Windows the default character encoding - is Cp1252, on Unix it is usually UTF-8. For both of these encoding - there are illegal byte sequences (more in UTF-8 than for Cp1252). -

-

- How the Reader class deals with these illegal sequences is up to the - implementation - of the character decoder. The current Sun Java implementation is to - map them to legal characters. Previous Sun Java (1.3 and lower) threw - a MalformedInputException. IBM Java 1.4 also throws this exception. - It is the mapping of the characters that cause the corruption. -

-

- On Unix, where the default is normally UTF-8, this is a big - problem, as it is easy to edit a file to contain non US Ascii characters - from ISO-8859-1, for example the Danish oe character. When this is - copied (with filtering) by Ant, the character get converted to a - question mark (or some such thing). -

-

- There is not much that Ant can do. It cannot figure out which - files are binary - a UTF-8 version of Korean will have lots of - bytes with the top bit set. It is not informed about illegal - character sequences by current Sun Java implementations. -

-

- One trick for filtering containing only US-ASCII is to - use the ISO-8859-1 encoding. This does not seem to contain - illegal character sequences, and the lower 7 bits are US-ASCII. - Another trick is to change the LANG environment variable from - something like "us.utf8" to "us". -

+

Windows Note: If you copy a file to a directory where that file already exists, +but with different case, the copied file takes on the case of the original. The workaround is +to delete the file in the destination directory before you copy it.

+

Important Encoding Note: The reason that binary files when +filtered get corrupted is that filtering involves reading in the file using a Reader class. This has +an encoding specifying how files are encoded. There are a number of different types of +encoding—UTF-8, UTF-16, Cp1252, ISO-8859-1, US-ASCII and (lots of) others. On Windows the +default character encoding is Cp1252, on Unix it is usually UTF-8. For both of these encoding there +are illegal byte sequences (more in UTF-8 than for Cp1252).

+

How the Reader class deals with these illegal sequences is up to the implementation of the +character decoder. The current Sun Java implementation is to map them to legal characters. Previous +Sun Java (1.3 and lower) threw a MalformedInputException. IBM Java 1.4 also throws this exception. +It is the mapping of the characters that cause the corruption.

+

On Unix, where the default is normally UTF-8, this is a big problem, as it is easy to +edit a file to contain non US-ASCII characters from ISO-8859-1, for example the Danish œ +character. When this is copied (with filtering) by Ant, the character get converted to a question +mark (or some such thing).

+

There is not much that Ant can do. It cannot figure out which files are binary—a UTF-8 +version of Korean will have lots of bytes with the top bit set. It is not informed about illegal +character sequences by current Sun Java implementations.

+

One trick for filtering containing only US-ASCII is to use the ISO-8859-1 encoding. This does not +seem to contain illegal character sequences, and the lower 7 bits are US-ASCII. Another trick is to +change the LANG environment variable from something like us.utf8 +to us.

diff --git a/manual/Tasks/copydir.html b/manual/Tasks/copydir.html index 564d6477b..6609a2e96 100644 --- a/manual/Tasks/copydir.html +++ b/manual/Tasks/copydir.html @@ -25,108 +25,103 @@

Copydir

-

Deprecated

-

This task has been deprecated. Use the Copy task instead.

+

Deprecated

+

This task has been deprecated. Use the Copy task instead.

Description

Copies a directory tree from the source to the destination.

-

It is possible to refine the set of files that are being copied. This can be -done with the includes, includesfile, excludes, excludesfile and defaultexcludes -attributes. With the includes or includesfile attribute you specify the files you want to -have included by using patterns. The exclude or excludesfile attribute is used to specify -the files you want to have excluded. This is also done with patterns. And -finally with the defaultexcludes attribute, you can specify whether you -want to use default exclusions or not. See the section on directory based tasks, on how the +

It is possible to refine the set of files that are being copied. This can be done with +the includes, includesfile, excludes, excludesfile +and defaultexcludes attributes. With the includes or includesfile +attribute you specify the files you want to have included by using patterns. The exclude +or excludesfile attribute is used to specify the files you want to have excluded. This is +also done with patterns. And finally with the defaultexcludes attribute, you can specify +whether you want to use default exclusions or not. 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 attributes of <fileset> -(dir becomes src) as well as the nested -<include>, <exclude> and -<patternset> elements.

+

This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes src) as well as the +nested <include>, <exclude> +and <patternset> elements.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
srcthe directory to copy.Yessrcthe directory to copy.Yes
destthe directory to copy to.Yesdestthe directory to copy to.Yes
includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include patternNo
excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude patternNo
defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
filteringindicates whether token filtering should take place during - the copyNofilteringindicates whether token filtering should take place during the copyNo; default is false
flattenignore directory structure of source directory, - copy all files into a single directory, specified by the dest - attribute (default is false).Noflattenignore directory structure of source directory, copy all files into a single directory, + specified by the dest attribute.No; default is false
forceoverwriteoverwrite existing files even if the destination - files are newer (default is false).Noforceoverwriteoverwrite existing files even if the destination files are newer.No; default is false

Examples

-
  <copydir src="${src}/resources"
-           dest="${dist}"/>
-

copies the directory ${src}/resources to ${dist}.

-
  <copydir src="${src}/resources"
-           dest="${dist}"
-           includes="**/*.java"
-           excludes="**/Test.java"/>
-

copies the directory ${src}/resources to ${dist} -recursively. All java files are copied, except for files with the name Test.java.

-
  <copydir src="${src}/resources"
-           dest="${dist}"
-           includes="**/*.java"
-           excludes="mypackage/test/**"/>
-

copies the directory ${src}/resources to ${dist} -recursively. All java files are copied, except for the files under the mypackage/test -directory.

+
+<copydir src="${src}/resources"
+         dest="${dist}"/>
+

copies the directory ${src}/resources to ${dist}.

+
+<copydir src="${src}/resources"
+         dest="${dist}"
+         includes="**/*.java"
+         excludes="**/Test.java"/>
+

copies the directory ${src}/resources to ${dist} +recursively. All .java files are copied, except for files with the +name Test.java.

+
+<copydir src="${src}/resources"
+         dest="${dist}"
+         includes="**/*.java"
+         excludes="mypackage/test/**"/>
+

copies the directory ${src}/resources to ${dist} +recursively. All .java files are copied, except for the files under +the mypackage/test directory.

diff --git a/manual/Tasks/copyfile.html b/manual/Tasks/copyfile.html index 2ce4180bd..e662024bd 100644 --- a/manual/Tasks/copyfile.html +++ b/manual/Tasks/copyfile.html @@ -25,45 +25,43 @@

Copyfile

-

Deprecated

-

This task has been deprecated. Use the Copy task instead.

+

Deprecated

+

This task has been deprecated. Use the Copy task instead.

Description

-

Copies a file from the source to the destination. The file is only copied if -the source file is newer than the destination file, or when the destination file -does not exist.

+

Copies a file from the source to the destination. The file is only copied if the source file is +newer than the destination file, or when the destination file does not exist.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
srcthe filename of the file to copy.Yessrcthe filename of the file to copy.Yes
destthe filename of the file where to copy to.Yesdestthe filename of the file where to copy to.Yes
filteringindicates whether token filtering should take place during - the copyNofilteringindicates whether token filtering should take place during the copyNo
forceoverwriteoverwrite existing files even if the destination - files are newer (default is false).Noforceoverwriteoverwrite existing files even if the destination files are newer.No; default is false

Examples

-
  <copyfile src="test.java" dest="subdir/test.java"/>
-  <copyfile src="${src}/index.html" dest="${dist}/help/index.html"/>
+
+<copyfile src="test.java" dest="subdir/test.java"/>
+<copyfile src="${src}/index.html" dest="${dist}/help/index.html"/>
diff --git a/manual/Tasks/cvs.html b/manual/Tasks/cvs.html index 6c2b375ea..b8755d1c2 100644 --- a/manual/Tasks/cvs.html +++ b/manual/Tasks/cvs.html @@ -26,132 +26,126 @@

Cvs

Description

-

Handles packages/modules retrieved from 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. -

- -

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.

+

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

+ +

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.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
commandthe CVS command to execute.No, default "checkout".commandthe CVS command to execute.No; default is checkout
compressiontrue or false - if set - to true, this is the same as compressionlevel="3"No. Defaults to false.compressiontrue (equivalent to compressionlevel=3) or falseNo; defaults to false
compressionlevelA number between 1 and 9 (corresponding to - possible values for CVS' -z# argument). Any - other value is treated as compression="false"No. Defaults to no compression.compressionlevelA number between 1 and 9 (corresponding to possible values for + CVS -z# argument). Any other value is treated + as compression=falseNo; defaults to no compression
cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
destthe directory where the checked out files should - be placed. Note that this is different from CVS's -d command line - switch as Apache Ant will never shorten pathnames to avoid empty - directories.No, default is project's basedir.destthe directory where the checked out files should be placed. Note that this is different + from CVS's -d command line switch as Apache Ant will never shorten pathnames to + avoid empty directories.No; default is project's basedir
packagethe package/module to check out. Note: - multiple attributes can be split using spaces. Use a nested - <module> element if you want to specify a module with - spaces in its name.Nopackagethe package/module to check out. Note: multiple attributes can be split + using spaces. Use a nested <module> element if you want to specify a + module with spaces in its name.No
tagthe tag of the package/module to check out.Notagthe tag of the package/module to check out.No
dateUse the most recent revision no later than the given dateNodateUse the most recent revision no later than the given dateNo
quietsuppress informational messages. This is the same as -q on the command line.No, default "false"quietsuppress informational messages. This is the same as -q on the command + line.No; defaults to false
reallyquietsuppress all messages. This is the same as + reallyquietsuppress all messages. This is the same as -Q on the command line. since Ant 1.6.No, default "false"No; defaults to false
noexecreport only, don't change any files.No, default to "false"noexecreport only, don't change any files.No; defaults to false
outputthe file to direct standard output from the command.No, default output to ANT Log as MSG_INFO.outputthe file to direct standard output from the command.No; default is output to the log as MSG_INFO
errorthe file to direct standard error from the command.No, default error to ANT Log as MSG_WARN.errorthe file to direct standard error from the command.No; default is error to the log as MSG_WARN
appendwhether to append output/error when redirecting to a file.No, default to "false".appendwhether to append output/error when redirecting to a file.No; defaults to false
portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; default is 2401
passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; default is ~/.cvspass
failonerrorStop the build process if the command exits with a - return code other than 0. Defaults to "false"NofailonerrorStop the build process if the command exits with a return code other + than 0.No; defaults to false
@@ -159,38 +153,39 @@ report 21657 for recommended workarounds.

module

-

Specifies a package/module to work on, unlike the package attribute - modules specified using this attribute can contain spaces in their - name.

+

Specifies a package/module to work on, unlike the package attribute modules specified using this +attribute can contain spaces in their name.

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
nameThe module's/package's name.Yes.nameThe module's/package's name.Yes

Examples

-
  <cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
-       package="ant"
-       dest="${ws.dir}"/>
-

checks out the package/module "ant" from the CVS -repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".

-
  <cvs dest="${ws.dir}" command="update"/>
-

updates the package/module that has previously been checked out into -"${ws.dir}".

- -
  <cvs command="-q diff -u -N" output="patch.txt"/>
- -

silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via "cvs add" (-N) and can be used as input to patch. -The equivalent, using <commandline> elements, is: -

+
+<cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
+     package="ant"
+     dest="${ws.dir}"/>
+

checks out the package/module ant from the CVS repository pointed to by +the cvsRoot attribute, and stores the files in ${ws.dir}.

+ +
<cvs dest="${ws.dir}" command="update"/>
+

updates the package/module that has previously been checked out into ${ws.dir}.

+ +
<cvs command="-q diff -u -N" output="patch.txt"/>
+ +

silently (-q) creates a file called patch.txt which contains a unified +(-u) diff which includes new files added via cvs add (-N) and +can be used as input to patch. The equivalent, using <commandline> +elements, is:

 <cvs output="patch">
     <commandline>
@@ -199,29 +194,27 @@ The equivalent, using  <commandline> elements, is:
         <argument value="-u"/>
         <argument value="-N"/>
     </commandline>
-</cvs>
-
-or: +</cvs> +

or:

 <cvs output="patch">
     <commandline>
         <argument line="-q diff -u -N"/>
     </commandline>
-</cvs>
-
-

-You may include as many <commandline> elements as you like. -Each will inherit the failonerror, compression, and other "global" parameters -from the <cvs> element. -

- +</cvs> +

You may include as many <commandline> elements as you like. Each will inherit +the failonerror, compression, and other "global" parameters from +the <cvs> element.

  <cvs command="update -A -d"/>
-

Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).

-

Note: the text of the command is passed to cvs "as-is" so any cvs options should appear -before the command, and any command options should appear after the command as in the diff example -above. See the cvs manual for details, -specifically the Guide to CVS commands

+

Updates from the head of repository ignoring sticky bits (-A) and creating any new +directories as necessary (-d).

+

Note: the text of the command is passed to cvs "as-is" so any cvs options +should appear before the command, and any command options should appear after the command as in the +diff example above. See the CVS +book for details, specifically +the Guide +to CVS commands

diff --git a/manual/Tasks/cvspass.html b/manual/Tasks/cvspass.html index 7e0819eb8..89816c598 100644 --- a/manual/Tasks/cvspass.html +++ b/manual/Tasks/cvspass.html @@ -26,42 +26,43 @@

cvspass

Description

-

Adds entries to a .cvspass file. Adding entries to this file has the same affect as a cvs login command.

+

Adds entries to a .cvspass file. Adding entries to this file has the same affect as +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 bug -zilla report 21657 for recommended workarounds.

+

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.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
cvsrootthe CVS repository to add an entry for.Yescvsrootthe CVS repository to add an entry for.Yes
passwordPassword to be added to the password file.YespasswordPassword to be added to the password file.Yes
passfilePassword file to add the entry to.No, default is ~/.cvspass.passfilePassword file to add the entry to.No; default is ~/.cvspass

Examples

-
  <cvspass cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
-       password="anoncvs"/>
-

Adds an entry into the ~/.cvspass password file.

+
+<cvspass cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
+         password="anoncvs"/>
+

Adds an entry into the ~/.cvspass password file.

diff --git a/manual/Tasks/cvstagdiff.html b/manual/Tasks/cvstagdiff.html index eb70bd7ce..49df473ae 100644 --- a/manual/Tasks/cvstagdiff.html +++ b/manual/Tasks/cvstagdiff.html @@ -23,111 +23,106 @@

CvsTagDiff

Description

-

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

+

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, +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

- +
- - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
startTagThe earliest tag from which diffs are to be - included in the report.Exactly one of the twostartTagThe earliest tag from which diffs are to be included in the report.Exactly one of the two
startDateThe earliest date from which diffs are to be - included in the report.
- accepts all formats accepted by the cvs command for -D date_spec arguments
startDateThe earliest date from which diffs are to be included in the + report.
Accepts all formats accepted by the cvs command for -D + date_spec arguments.
endTagThe latest tag from which diffs are to be - included in the report.Exactly one of the twoendTagThe latest tag from which diffs are to be included in the report.Exactly one of the two
endDateThe latest date from which diffs are to be - included in the report.
- accepts all formats accepted by the cvs command for -D date_spec arguments
endDateThe latest date from which diffs are to be included in the report.
Accepts + all formats accepted by the cvs command for -D date_spec + arguments.
destfileThe file in which to write the diff report.YesdestfileThe file in which to write the diff report.Yes
ignoreRemovedWhen set to true, the report will not include any - removed files. Since Apache Ant 1.8.0No, defaults to false.ignoreRemovedWhen set to true, the report will not include any removed files. Since Apache + Ant 1.8.0No; defaults to false

Parameters inherited from the cvs task

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
compressiontrue, false, or the number 1-9 (corresponding to possible values for CVS -z# argument). Any other value is treated as falseNo. Defaults to no compression. if passed true, level 3 compression is assumed.compressiontrue (equivalent to 3), false, or a number between 1 + and 9 (corresponding to possible values for CVS -z# argument). Any other + value is treated as falseNo; defaults to no compression
cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
packagethe package/module to analyze.
- Since Ant 1.6 - multiple packages separated by spaces are possible. - aliases corresponding to different modules are also possible. - Use a nested <module> element if you want to specify a module with - spaces in its name.
Nopackagethe package/module to analyze.
Since Ant 1.6 multiple packages separated by + spaces are possible. aliases corresponding to different modules are also possible. Use a + nested <module> element if you want to specify a module with spaces in its + name.
No
quietsuppress informational messages.No, default "false"quietsuppress informational messages.No; default false
portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; default 2401
passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; default ~/.cvspass
failonerrorStop the buildprocess if the command exits with a - returncode other than 0. Defaults to falseNofailonerrorStop the build process if the command exits with a return code other than 0.No; defaults to false
@@ -135,90 +130,96 @@ operation may fail when using such an incompatible client.

module

-

Specifies a package/module to work on, unlike the package attribute - modules specified using this attribute can contain spaces in their - name.

+

Specifies a package/module to work on, unlike the package attribute modules specified using this +attribute can contain spaces in their name.

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
nameThe module's/package's name.Yes.nameName of the module/package.Yes

Examples

-
  <cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
-                destfile="tagdiff.xml"
-                package="ant"
-                startTag="ANT_14"
-                endTag="ANT_141"/>
- -

Generates a tagdiff report for all the changes that have been made -in the ant module between the tags ANT_14 and ANT_141. -It writes these changes into the file tagdiff.xml.

- -
  <cvstagdiff
-                destfile="tagdiff.xml"
-                package="ant"
-                startDate="2002-01-01"
-                endDate="2002-31-01"/>
- -

Generates a tagdiff report for all the changes that have been made -in the ant module in january 2002. In this example cvsRoot -has not been set. The current cvsRoot will be used (assuming the build is started -from a folder stored in cvs. -It writes these changes into the file tagdiff.xml.

- -
  <cvstagdiff
-                destfile="tagdiff.xml"
-                package="ant jakarta-gump"
-                startDate="2003-01-01"
-                endDate="2003-31-01"/>
- -

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

+
+<cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
+            destfile="tagdiff.xml"
+            package="ant"
+            startTag="ANT_14"
+            endTag="ANT_141"/>
+ +

Generates a tagdiff report for all the changes that have been made in +the ant module between the tags ANT_14 and ANT_141. It +writes these changes into the file tagdiff.xml.

+ +
+<cvstagdiff destfile="tagdiff.xml"
+            package="ant"
+            startDate="2002-01-01"
+            endDate="2002-31-01"/>
+ +

Generates a tagdiff report for all the changes that have been made in +the ant module in January 2002. In this example cvsRoot has not been +set. The current cvsRoot will be used (assuming the build is started from a folder stored +in cvs. It writes these changes into the file tagdiff.xml.

+ +
+<cvstagdiff destfile="tagdiff.xml"
+            package="ant jakarta-gump"
+            startDate="2003-01-01"
+            endDate="2003-31-01"/>
+ +

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

Generate Report

-

Ant includes a basic XSLT stylesheet that you can use to generate -a HTML report based on the xml output. The following example illustrates -how to generate a HTML report from the XML report.

+

Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the xml +output. The following example illustrates how to generate a HTML report from the XML report.

-        <style in="tagdiff.xml"
-               out="tagdiff.html"
-               style="${ant.home}/etc/tagdiff.xsl">
-          <param name="title" expression="Ant Diff"/>
-          <param name="module" expression="ant"/>
-          <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/>
-        </style>
-
+<style in="tagdiff.xml" + out="tagdiff.html" + style="${ant.home}/etc/tagdiff.xsl"> + <param name="title" expression="Ant Diff"/> + <param name="module" expression="ant"/> + <param name="cvsweb" expression="http://cvs.apache.org/viewcvs/"/> +</style>

Output

-

-The cvsroot and package attributes of the tagdiff element are new in Ant 1.6.
-Notes on entry attributes: -

+

The cvsroot and package attributes of the tagdiff element are +new in Ant 1.6.
Notes on entry attributes:

- - - - + + + + + + + + + + + + + + + +
AttributeComment
namewhen reporting on one package, the package name is removed from the output
revisionsupplied for files which exist at the end of the reporting period
prevrevisionsupplied for files which exist at the beginning of the reporting period.
-Old CVS servers do not supply it for deleted files. CVS 1.12.2 supplies it.
AttributeComment
namewhen reporting on one package, the package name is removed from the output
revisionsupplied for files which exist at the end of the reporting period
prevrevisionsupplied for files which exist at the beginning of the reporting period.
Old CVS servers + do not supply it for deleted files. CVS 1.12.2 supplies it.
 <?xml version="1.0" encoding="UTF-8"?>
 <tagdiff startTag="ANT_14" endTag="ANT_141"
-cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
+         cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
   <entry>
     <file>
       <name>src/main/org/apache/tools/ant/DirectoryScanner.java</name>
diff --git a/manual/Tasks/cvsversion.html b/manual/Tasks/cvsversion.html
index 9081f3ed9..c0775cc3d 100644
--- a/manual/Tasks/cvsversion.html
+++ b/manual/Tasks/cvsversion.html
@@ -26,79 +26,76 @@
 
 

CvsVersion

Description

-

-This task allows to retrieve a CVS client and server version. - Since Apache Ant 1.6.1. -

+

This task allows to retrieve a CVS client and server version. Since Apache Ant +1.6.1.

Parameters

- +
- - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
Attributes from parent Cvs task which are meaningful hereAttributes from parent <cvs> task which are + meaningful here
cvsRootthe CVSROOT variable.NocvsRootthe CVSROOT variable.No
cvsRshthe CVS_RSH variable.NocvsRshthe CVS_RSH variable.No
destdirectory containing the checked out version of the projectNo, default is project's basedir.destdirectory containing the checked out version of the projectNo; default is project's basedir
packagethe package/module to check out.Nopackagethe package/module to check out.No
portPort used by CVS to communicate with the server.No, default port 2401.portPort used by CVS to communicate with the server.No; default is 2401
passfilePassword file to read passwords from.No, default file ~/.cvspass.passfilePassword file to read passwords from.No; default is ~/.cvspass
failonerrorStop the build process if the command exits with a - return code other than 0. Defaults to falseNofailonerrorStop the build process if the command exits with a return code other than 0.No; defaults to false
Specific attributesSpecific attributes
clientversionpropertyName of a property where the cvsclient version - should be storedNoclientversionpropertyName of a property where the CVS client version should be storedNo
serverversionpropertyName of a property where the cvs server version - should be storedNoserverversionpropertyName of a property where the CVS server version should be storedNo

Examples

-
  <cvsversion cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
-       passfile="/home/myself/.cvspass"
-       serverversionproperty="apachecvsversion"
-       clientversionproperty="localcvsversion"/>
-

finds out the cvs client and server versions and stores the versions in the -properties called apachecvsversion and localcvsversion

+
+<cvsversion cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
+            passfile="/home/myself/.cvspass"
+            serverversionproperty="apachecvsversion"
+            clientversionproperty="localcvsversion"/>
+

finds out the CVS client and server versions and stores the versions in the properties +called apachecvsversion and localcvsversion

diff --git a/manual/Tasks/defaultexcludes.html b/manual/Tasks/defaultexcludes.html index 42a6c458e..cee45d3b1 100644 --- a/manual/Tasks/defaultexcludes.html +++ b/manual/Tasks/defaultexcludes.html @@ -29,37 +29,35 @@

since Apache Ant 1.6

Description

-

Alters the default excludes for all subsequent processing in the -build, and prints out the current default excludes if desired. +

Alters the default excludes for all subsequent processing in the build, and prints out the +current default excludes if desired.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
echowhether or not to print out the default excludes.(defaults to false)attribute "true" required if no - other attribute specifiedechowhether or not to print out the default excludestrue required if no other attribute specified; defaults to false
defaultgo back to hard wired default excludesattribute "true" required if no - if no other attribute is specifieddefaultgo back to hard wired default excludestrue required if no other attribute is specified
addthe pattern to add to the default excludesif no other attribute is specifiedaddthe pattern to add to the default excludesif no other attribute is specified
removeremove the specified pattern from the default excludesif no other attribute is specifiedremoveremove the specified pattern from the default excludesif no other attribute is specified
@@ -67,37 +65,36 @@ build, and prints out the current default excludes if desired.

Print out the default excludes

-
  <defaultexcludes echo="true"/>
+
<defaultexcludes echo="true"/>
-

Print out the default excludes and exclude all *.bak files in -all further processing

+

Print out the default excludes and exclude all *.bak files in all +further processing

-
  <defaultexcludes echo="true" add="**/*.bak"/>
+
<defaultexcludes echo="true" add="**/*.bak"/>
-

Silently allow several fileset based tasks to operate on emacs -backup files and then restore normal behavior

+

Silently allow several fileset based tasks to operate on emacs backup files and then restore +normal behavior

-  <defaultexcludes remove="**/*~"/>
+<defaultexcludes remove="**/*~"/>
 
-  (do several fileset based tasks here)
+(do several fileset based tasks here)
 
-  <defaultexcludes default="true"/>
-
+<defaultexcludes default="true"/>

Notes

-By default the pattern **/.svn and **/.svn/** are set as default -excludes. With 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: +

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:

-  <defaultexcludes remove="**/.svn"/>
-  <defaultexcludes remove="**/.svn/**"/>
-  <defaultexcludes add="**/_svn"/>
-  <defaultexcludes add="**/_svn/**"/>
+<defaultexcludes remove="**/.svn"/>
+<defaultexcludes remove="**/.svn/**"/>
+<defaultexcludes add="**/_svn"/>
+<defaultexcludes add="**/_svn/**"/>
 
diff --git a/manual/Tasks/delete.html b/manual/Tasks/delete.html index 3ddc82af1..783625c98 100644 --- a/manual/Tasks/delete.html +++ b/manual/Tasks/delete.html @@ -26,201 +26,172 @@

Delete

Description

-

Deletes a single file, a specified directory and all its files and -subdirectories, or a set of files specified by one or more -resource collections. -The literal implication of <fileset> is that -directories are not included; however the removal of empty directories can -be triggered when using nested filesets by setting the -includeEmptyDirs attribute to true. Note that this -attribute is meaningless in the context of any of the various resource -collection types that do include directories, but that no attempt -will be made to delete non-empty directories in any case. Whether a -directory is empty or not is decided by looking into the filesystem - -include or exclude patterns don't apply here.

-

-If you use this task to delete temporary files created by editors -and it doesn't seem to work, read up on the -default exclusion set -in Directory-based Tasks, and see the -defaultexcludes attribute below. +

Deletes a single file, a specified directory and all its files and subdirectories, or a set of +files specified by one or more resource +collections. The literal implication of <fileset> is that directories are +not included; however the removal of empty directories can be triggered when using nested filesets +by setting the includeEmptyDirs attribute to true. Note that this attribute is +meaningless in the context of any of the various resource collection types that do include +directories, but that no attempt will be made to delete non-empty directories in any case. Whether +a directory is empty or not is decided by looking into the filesystem—include or exclude +patterns don't apply here.

+

If you use this task to delete temporary files created by editors and it doesn't seem to work, +read up on the default exclusion set +in Directory-based Tasks, and see the defaultexcludes attribute +below.

-

For historical reasons <delete dir="x"/> is - different from <delete><fileset - dir="x"/></delete>, it will try to remove everything - inside "x" including "x" itself, not taking default excludes into - account, blindly following all symbolic links. If you need more - control, use a nested <fileset>.

+

For historical reasons <delete dir="x"/> is different +from <delete><fileset dir="x"/></delete>; it will try to remove +everything inside x including x itself, not taking default excludes into account, +blindly following all symbolic links. If you need more control, use a +nested <fileset>.

Parameters

- +
- - - + + + - - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe file to delete, specified as either the simple - filename (if the file exists in the current base directory), a - relative-path filename, or a full-path filename.At least one of the two, - unless nested resource collections are specified + fileThe file to delete, specified as either the simple filename (if the file exists in the + current base directory), a relative-path filename, or a full-path filename.At least one of the two, unless nested resource collections are specified
dirThe directory to delete, including all its files and - subdirectories.
- Note: dir is not used - to specify a directory name for file; file - and dir are independent of each other.
- Warning: Do not set dir to - ".", "${basedir}", - or the full-pathname equivalent unless you truly intend to - recursively remove the entire contents of the current base directory - (and the base directory itself, if different from the current working - directory).
dirThe directory to delete, including all its files and + subdirectories.
Note: dir is not used to specify a + directory name for file; file and dir are independent of each + other.
Warning: Do not set dir + to ., ${basedir}, or the full-pathname equivalent unless you + truly intend to recursively remove the entire contents of the current base directory + (and the base directory itself, if different from the current working directory).
verboseWhether to show the name of each deleted file.No, default "false"verboseWhether to show the name of each deleted file.No; default false
quietIf the specified file or directory does not exist, - do not display a diagnostic message (unless Apache Ant - has been invoked with the -verbose or - -debug switches) or modify the exit status to - reflect an error. - When set to "true", if a file or directory cannot be deleted, - no error is reported. This setting emulates the - -f option to the Unix rm command. - Setting this to "true" implies setting - failonerror to "false". - No, default "false"quietIf the specified file or directory does not exist, do not display a diagnostic message + (unless Apache Ant has been invoked with the -verbose or -debug + switches) or modify the exit status to reflect an error. When set to true, if a file + or directory cannot be deleted, no error is reported. This setting emulates + the -f option to the Unix rm command. Setting this to true + implies setting failonerror to false.No; default false
failonerrorControls whether an error (such as a failure to - delete a file) stops the build or is merely reported to the screen. - Only relevant if quiet is "false".No, default "true"failonerrorControls whether an error (such as a failure to delete a file) stops the build or is merely + reported to the screen. Only relevant if quiet is false.No; default true
includeemptydirsWhether to delete empty directories - when using filesets.No, default "false"includeemptydirsWhether to delete empty directories when using filesets.No; default false
includesDeprecated. Use resource collections. - Comma- or space-separated list of patterns of - files that must be deleted. All files are relative to the directory - specified in dir.NoincludesDeprecated. Use resource collections. Comma- or space-separated list of + patterns of files that must be deleted. All files are relative to the directory specified + in dir.No
includesfileDeprecated. Use resource collections. - The name of a file. Each line of - this file is taken to be an include pattern.NoincludesfileDeprecated. Use resource collections. Name of a file; each line of this + file is taken to be an include pattern.No
excludesDeprecated. Use resource collections. - Comma- or space-separated list of patterns of - files that must be excluded from the deletion list. - All files are relative to the directory specified in dir. - No files (except default excludes) are excluded when omitted.NoexcludesDeprecated. Use resource collections. Comma- or space-separated list of + patterns of files that must be excluded from the deletion list. All files are relative to the + directory specified in dir.No; defaults to default excludes or none if defaultexcludes is no
excludesfileDeprecated. Use resource collections. - The name of a file. Each line of - this file is taken to be an exclude patternNoexcludesfileDeprecated. Use resource collections. Name of a file; each line of this + file is taken to be an exclude patternNo
defaultexcludesDeprecated. Use resource collections. - Whether to use - default excludes.No, default "true"defaultexcludesDeprecated. Use resource collections. Whether to + use default excludes.No; default true
deleteonexit - Indicates whether to use File#deleteOnExit() if there is a - failure to delete a file, this causes the jvm to attempt - to delete the file when the jvm process is terminating. - Since Ant 1.6.2No, default "false"deleteonexitIndicates whether to use File#deleteOnExit() if there is a failure to delete a + file. This causes the JVM to attempt to delete the file when the JVM process is + terminating. Since Ant 1.6.2No; default false
removeNotFollowedSymlinks - Whether symbolic links (not the files/directories they link to) - should be removed if they haven't been followed because - followSymlinks was false or the maximum number of symbolic links - was too big. - Since Ant 1.8.0No, default "false"removeNotFollowedSymlinksWhether symbolic links (not the files/directories they link to) should be removed if they + haven't been followed because followSymlinks was false or the maximum number + of symbolic links was too big. Since Ant 1.8.0No; default false
performGCOnFailedDelete - If Ant fails to delete a file or directory it will retry the - operation once. If this flag is set to true it will perform a - garbage collection before retrying the delete.
- Setting this flag to true is known to resolve some problems on - Windows (where it defaults to true) but also for directory trees - residing on an NFS share. - Since Ant 1.8.3
No, default "true" on - Windows and "true" on any other OS.performGCOnFailedDeleteIf Ant fails to delete a file or directory it will retry the operation once. If this flag + is set to true it will perform a garbage collection before retrying the + delete.
Setting this flag to true is known to resolve some problems on Windows (where it + defaults to true) but also for directory trees residing on an NFS share. Since Ant + 1.8.3
No; default true on Windows and true on any other OS

Examples

-
  <delete file="/lib/ant.jar"/>
-

deletes the file /lib/ant.jar.

-
  <delete dir="lib"/>
-

deletes the lib directory, including all files -and subdirectories of lib.

+
<delete file="/lib/ant.jar"/>
+

deletes the file /lib/ant.jar.

-
  <delete>
-    <fileset dir="." includes="**/*.bak"/>
-  </delete>
+
<delete dir="lib"/>
+

deletes the lib directory, including all files and subdirectories +of lib.

+ +
+<delete>
+  <fileset dir="." includes="**/*.bak"/>
+</delete>
 
-

deletes all files with the extension .bak from the current directory -and any subdirectories.

+

deletes all files with the extension .bak from the current directory and any +subdirectories.

-
  <delete includeEmptyDirs="true">
-    <fileset dir="build"/>
-  </delete>
+
+<delete includeEmptyDirs="true">
+  <fileset dir="build"/>
+</delete>
 
-

deletes all files and subdirectories of build, including -build itself.

+

deletes all files and subdirectories of build, including build +itself.

-
  <delete includeemptydirs="true">
-    <fileset dir="build" includes="**/*"/>
-  </delete>
+
+<delete includeemptydirs="true">
+  <fileset dir="build" includes="**/*"/>
+</delete>
 
-

deletes all files and subdirectories of build, without -build itself.

+

deletes all files and subdirectories of build, without build +itself.

-
  <delete includeemptydirs="true">
-    <fileset dir="src" includes="**/.svn/" defaultexcludes="false"/>
-  </delete>
+
+<delete includeemptydirs="true">
+  <fileset dir="src" includes="**/.svn/" defaultexcludes="false"/>
+</delete>
 
-

deletes the subversion metadata directories under src. Because .svn -is on of the default excludes you have to use the -defaultexcludes flag, otherwise Ant wont delete these directories and the files in it.

+

deletes the subversion metadata directories under src. Because .svn is +on of the default excludes you have to use the +defaultexcludes flag, otherwise Ant won't delete these directories and the files in it.

diff --git a/manual/Tasks/deltree.html b/manual/Tasks/deltree.html index eeb976fc7..8e3bff7ac 100644 --- a/manual/Tasks/deltree.html +++ b/manual/Tasks/deltree.html @@ -25,30 +25,28 @@

Deltree

-

Deprecated

-

This task has been deprecated. Use the Delete task instead.

+

Deprecated

+

This task has been deprecated. Use the Delete task instead.

Description

Deletes a directory with all its files and subdirectories.

Parameters

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
dirthe directory to delete.Yesdirthe directory to delete.Yes

Examples

-
  <deltree dir="dist"/>
-

deletes the directory dist, including its files and -subdirectories.

-
  <deltree dir="${dist}"/>
-

deletes the directory ${dist}, including its files and -subdirectories.

+
<deltree dir="dist"/>
+

deletes the directory dist, including its files and subdirectories.

+
<deltree dir="${dist}"/>
+

deletes the directory ${dist}, including its files and subdirectories.

diff --git a/manual/Tasks/depend.html b/manual/Tasks/depend.html index 1272e1dda..eb547a48e 100644 --- a/manual/Tasks/depend.html +++ b/manual/Tasks/depend.html @@ -26,199 +26,170 @@

Depend

-A task to manage Java class file dependencies. +

A task to manage Java class file dependencies.

Description

-

-The depend task works by determining which classes are out of date with -respect to their source and then removing the class files of any other -classes which depend on the out-of-date classes. -

- -

-To determine the class dependencies, the depend task analyzes the class -files of all class files passed to it. Depend does not parse your source code in -any way but relies upon the class references encoded into the class files by the -compiler. This is generally faster than parsing the Java source.

- -

-To learn more about how this information is obtained from the class files, -please refer 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 changed will have their dependency information re-analysed. Note that -if you change a class' dependencies by changing the source, it will be -recompiled anyway. You can examine the dependency files created to understand -the dependencies of your classes. Please do not rely, however, on the format of -the information, as it may change in a later release. -

- -

-Once depend discovers all of the class dependencies, it "inverts" -this relation to determine, for each class, which other classes are dependent -upon it. This "affects" list is used to discover which classes are -invalidated by the out of date class. The class files of the invalidated -classes are removed, triggering the compilation of the affected classes. -

- -

-The depend task supports an attribute, "closure" which controls -whether depend will only consider direct class-class relationships or whether it -will also consider transitive, indirect relationships. For example, say there -are three classes, A, which depends on B, which in-turn depend on C. Now say -that class C is out of date. Without closure, only class B would be removed by -depend. With closure set, class A would also be removed. Normally direct -relationships are sufficient - it is unusual for a class to depend on another -without having a direct relationship. With closure set, you will notice that -depend typically removes far more class files. -

- -

The classpath attribute for <depend> is optional. If it is present, -depend will check class dependencies against classes and jars on this classpath. -Any classes which depend on an element from this classpath and which are older -than that element will be deleted. A typical example where you would use this -facility would be where you are building a utility jar and want to make sure -classes which are out of date with respect to this jar are rebuilt. You should -not include jars in this classpath which you do not expect to change, -such as the JDK runtime jar or third party jars, since doing so will just slow -down the dependency check. This means that if you do use a classpath for the -depend task it may be different from the classpath necessary to actually -compile your code.

+

The depend task works by determining which classes are out of date with respect to +their source and then removing the class files of any other classes which depend on the out-of-date +classes.

+ +

To determine the class dependencies, the depend task analyzes the class files of all +class files passed to it. The task does not parse your source code in any way but relies upon the +class references encoded into the class files by the compiler. This is generally faster than parsing +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

+ +

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 +changed will have their dependency information re-analysed. Note that if you change a class' +dependencies by changing the source, it will be recompiled anyway. You can examine the dependency +files created to understand the dependencies of your classes. Please do not rely, however, on the +format of the information, as it may change in a later release.

+ +

Once depend discovers all of the class dependencies, it "inverts" this +relation to determine, for each class, which other classes are dependent upon it. This +"affects" list is used to discover which classes are invalidated by the out of date +class. The class files of the invalidated classes are removed, triggering the compilation of the +affected classes.

+ +

The depend task supports an attribute, closure which controls +whether depend will only consider direct class-class relationships or whether it will +also consider transitive, indirect relationships. For example, say there are three classes, A, which +depends on B, which in-turn depend on C. Now say that class C is out of +date. Without closure, only class B would be removed +by depend. With closure set, class A would also be removed. Normally direct +relationships are sufficient—it is unusual for a class to depend on another without having a +direct relationship. With closure set, you will notice that depend typically +removes far more class files.

+ +

The classpath attribute for <depend> is optional. If it is +present, depend will check class dependencies against classes and jars on this +classpath. Any classes which depend on an element from this classpath and which are older than that +element will be deleted. A typical example where you would use this facility would be where you are +building a utility jar and want to make sure classes which are out of date with respect to this jar +are rebuilt. You should not include jars in this classpath which you do not expect +to change, such as the JDK runtime jar or third party jars, since doing so will just slow down the +dependency check. This means that if you do use a classpath for the depend task it may +be different from the classpath necessary to actually compile your code.

Performance

-

-The performance of the depend task is dependent on a -number of factors such as class relationship complexity and how many class files -are out of date. The decision about whether it is cheaper to just recompile all -classes or to use the depend task will depend on the size of your project and -how interrelated your classes are. -

+

The performance of the depend task is dependent on a number of factors such as class +relationship complexity and how many class files are out of date. The decision about whether it is +cheaper to just recompile all classes or to use the depend task will depend on the size +of your project and how interrelated your classes are.

Limitations

-

-There are some source dependencies which depend will not detect. -

+

There are some source dependencies which depend will not detect.

    -
  • If the Java compiler optimizes away a class relationship, - there can be a source dependency without a class dependency.
  • - -
  • Non public classes cause two problems. Firstly depend cannot relate - the class file to a source file. In the future this may be addressed - using the source file attribute in the classfile. Secondly, neither - depend nor the compiler tasks can detect when a non public class is - missing. Inner classes are handled by the depend task.
  • +
  • If the Java compiler optimizes away a class relationship, there can be a source dependency +without a class dependency.
  • + +
  • Non public classes cause two problems. Firstly depend cannot relate the class file to a source +file. In the future this may be addressed using the source file attribute in the +classfile. Secondly, neither depend nor the compiler tasks can detect when a non public +class is missing. Inner classes are handled by the depend task.
-The most obvious example of these limitations is that the task can't tell -which classes to recompile when a constant primitive data type exported -by other classes is changed. For example, a change in the definition of -something like +

The most obvious example of these limitations is that the task can't tell which classes to +recompile when a constant primitive data type exported by other classes is changed. For example, a +change in the definition of something like

 public final class Constants {
-  public final static boolean DEBUG=false;
-}
-
will not be picked up by other classes. + public final static boolean DEBUG=false; +}
+

will not be picked up by other classes.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
srcDirThis is the directory where the source exists. depend -will examine this to determine which classes are out of date. If you use multiple -source directories you can pass this attribute a path of source directories.YessrcDirThis is the directory where the source exists. depend will examine this to + determine which classes are out of date. If you use multiple source directories you can pass + this attribute a path of source directories.Yes
destDirThis is the root directory of the class files which -will be analysed. If this is not present, the srcdir is used.NodestDirThis is the root directory of the class files which will be analysed.No; defaults to srcdir
cacheThis is a directory in which depend can store and -retrieve dependency information. If this is not present, depend will not -use a cacheNocacheThis is a directory in which depend can store and retrieve dependency + information.No; defaults to no cache
closureThis attribute controls whether depend only removes -classes which directly depend on out of date classes. If this is set to true, -depend will traverse the class dependency graph deleting all affected -classes. Defaults to falseNoclosureThis attribute controls whether depend only removes classes which directly + depend on out of date classes. If this is set to true, depend will + traverse the class dependency graph deleting all affected classes.No; defaults to false
dumpIf true the dependency information will be written to the debug level logNodumpIf true the dependency information will be written to the debug level logNo
classpathThe classpath containing jars and classes for which <depend> should also - check dependenciesNoclasspathThe classpath containing jars and classes for which <depend> should also + check dependenciesNo
warnOnRmiStubsFlag to disable warnings about files that look like rmic generated stub/skeleton - classes and have no .java source. Useful when doing RMI development.No, default=truewarnOnRmiStubsFlag to disable warnings about files that look like rmic generated + stub/skeleton classes and have no .java source. Useful when doing RMI + development.No; default true

Parameters specified as nested elements

-

The depend task's classpath attribute is a -PATH-like structure and can also be set -via a nested <classpath> element.

- -

Additionally, -this task forms an implicit -FileSet -and supports most attributes of -<fileset> (dir becomes srcdir), -as well as the nested <include>, -<exclude>, and <patternset> elements. +

The depend task's classpath attribute is +a path-like structure and can also be set via a +nested <classpath> element.

+ +

Additionally, this task forms an implicit FileSet and +supports most attributes of <fileset> (dir becomes srcdir), +as well as the nested <include>, <exclude>, +and <patternset> elements.

Examples

-
<depend srcdir="${java.dir}"
+
+<depend srcdir="${java.dir}"
         destdir="${build.classes}"
         cache="depcache"
         closure="yes"/>
-

removes any classes in the ${build.classes} directory -that depend on out-of-date classes. Classes are considered out-of-date with -respect to the source in the ${java.dir} directory, using the same -mechanism as the <javac> task. In this example, the -<depend> task caches its dependency -information in the depcache directory. -

+

removes any classes in the ${build.classes} directory that depend on out-of-date +classes. Classes are considered out-of-date with respect to the source in +the ${java.dir} directory, using the same mechanism as the <javac> +task. In this example, the <depend> task caches its dependency information in +the depcache directory.

 <depend srcdir="${java.dir}" destdir="${build.classes}"
         cache="depcache" closure="yes">
   <include name="**/*.java"/>
   <excludesfile name="${java.dir}/build_excludes"/>
-</depend>
-
-

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

+</depend>
+ +

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

diff --git a/manual/Tasks/dependset.html b/manual/Tasks/dependset.html index 90aa2daa9..7f422f525 100644 --- a/manual/Tasks/dependset.html +++ b/manual/Tasks/dependset.html @@ -30,46 +30,35 @@ A task to manage arbitrary dependencies between resources.

Description

-

-The dependset task compares a set of sources with a set of target -files. If any of the sources has been modified more recently than -any of the target files, all of the target files are removed. -

-

-Sources and target files are specified via nested -Resource Collections; -sources can be resources of any type, while targets are restricted to files -only. At least one set of sources and one set of targets is required. -

-

-Use a FileSet when you want to use wildcard include or exclude -patterns and don't care about missing files. Use a FileList when you -want to consider the non-existence of a file as if it were out of -date. If there are any non-existing files in any source or target -FileList, all target files will be removed. -

-

-DependSet is useful to capture dependencies that are not or cannot be -determined algorithmically. For example, the <style> task only -compares the source XML file and XSLT stylesheet against the target -file to determined whether to restyle the source. Using dependset you -can extend this dependency checking to include a DTD or XSD file as -well as other stylesheets imported by the main stylesheet. -

+

The dependset task compares a set of sources with a set of target files. If any of +the sources has been modified more recently than any of the target files, all of the target files +are removed.

+

Sources and target files are specified via +nested Resource Collections; sources can be +resources of any type, while targets are restricted to files only. At least one set of sources and +one set of targets is required.

+

Use a FileSet when you want to use wildcard include or exclude patterns and don't care about +missing files. Use a FileList when you want to consider the non-existence of a file as if it were +out of date. If there are any non-existing files in any source or target FileList, all target files +will be removed.

+

DependSet is useful to capture dependencies that are not or cannot be determined algorithmically. +For example, the <style> task only compares the source XML file and XSLT +stylesheet against the target file to determined whether to restyle the source. +Using dependset you can extend this dependency checking to include a DTD or XSD file as +well as other stylesheets imported by the main stylesheet.

Parameters

- +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
verboseMakes the task list all deleted targets files - and the reason why they get deleted.NoverboseMakes the task list all deleted targets files and the reason why they get deleted.No
@@ -77,92 +66,75 @@ well as other stylesheets imported by the main stylesheet.

sources

-

The <sources> element is a -Union into which -arbitrary resource collections can be nested. Since Apache Ant 1.7 +

The <sources> element is a Union +into which arbitrary resource collections can be nested. Since Apache Ant 1.7

srcfileset

-

-The nested <srcfileset> element specifies a FileSet. All files included in -this fileset will be compared against all files included in all of the -<targetfileset> filesets and <targetfilelist> -filelists. Multiple <srcfileset> filesets may be specified. -

+

The nested <srcfileset> element specifies +a FileSet. All files included in this fileset will be compared +against all files included in all of the <targetfileset> filesets +and <targetfilelist> filelists. Multiple <srcfileset> +filesets may be specified.

srcfilelist

-

-The nested <srcfilelist> element specifies a FileList. All files included in -this filelist will be compared against all files included in all of the -<targetfileset> filesets and <targetfilelist> -filelists. Multiple <srcfilelist> filelists may be specified. -

+

The nested <srcfilelist> element specifies +a FileList. All files included in this filelist will be +compared against all files included in all of the <targetfileset> filesets +and <targetfilelist> filelists. Multiple <srcfilelist> +filelists may be specified.

targets

-

The <targets> element is a -Path and thus can -include any filesystem-based resource. Since Ant 1.7 -

+

The <targets> element is a Path and thus can +include any filesystem-based resource. Since Ant 1.7

targetfileset

-

-The nested <targetfileset> element specifies a FileSet. All files included in -this fileset will be compared against all files included in all of the -<srcfileset> filesets and <sourcefilelist> -filelists, and if any are older, they are all deleted. -Multiple <targetfileset> filesets may be specified. -

+

The nested <targetfileset> element specifies +a FileSet. All files included in this fileset will be compared +against all files included in all of the <srcfileset> filesets +and <sourcefilelist> filelists, and if any are older, they are all deleted. +Multiple <targetfileset> filesets may be specified.

targetfilelist

-

-The nested <targetfilelist> element specifies a FileList. All files included in -this filelist will be compared against all files included in all of the -<srcfileset> filesets and <sourcefilelist> -filelists, and if any are older, they are all deleted. -Multiple <targetfilelist> filelists may be specified. -

+

The nested <targetfilelist> element specifies +a FileList. All files included in this filelist will be +compared against all files included in all of the <srcfileset> filesets +and <sourcefilelist> filelists, and if any are older, they are all deleted. +Multiple <targetfilelist> filelists may be specified.

Examples

-    <dependset>
-       <srcfilelist
-           dir   = "${dtd.dir}"
-           files = "paper.dtd,common.dtd"/>
-       <srcfilelist
-           dir   = "${xsl.dir}"
-           files = "common.xsl"/>
-       <srcfilelist
-           dir   = "${basedir}"
-           files = "build.xml"/>
-       <targetfileset
-           dir      = "${output.dir}"
-           includes = "**/*.html"/>
-    </dependset>
- -

-In this example derived HTML files in the ${output.dir} directory -will be removed if any are out-of-date with respect to:

+<dependset> + <srcfilelist + dir = "${dtd.dir}" + files = "paper.dtd,common.dtd"/> + <srcfilelist + dir = "${xsl.dir}" + files = "common.xsl"/> + <srcfilelist + dir = "${basedir}" + files = "build.xml"/> + <targetfileset + dir = "${output.dir}" + includes = "**/*.html"/> +</dependset>
+ +

In this example derived HTML files in the ${output.dir} directory will be removed if any are +out-of-date with respect to:

    -
  1. the DTD of their source XML files
  2. -
  3. a common DTD (imported by the main DTD)
  4. -
  5. a subordinate XSLT stylesheet (imported by the main stylesheet), or
  6. -
  7. the buildfile
  8. +
  9. the DTD of their source XML files
  10. +
  11. a common DTD (imported by the main DTD)
  12. +
  13. a subordinate XSLT stylesheet (imported by the main stylesheet), or
  14. +
  15. the buildfile
-

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

+

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

diff --git a/manual/Tasks/diagnostics.html b/manual/Tasks/diagnostics.html index 57d08db08..686f9bc1e 100644 --- a/manual/Tasks/diagnostics.html +++ b/manual/Tasks/diagnostics.html @@ -26,22 +26,16 @@

Diagnostics

Description

-

-Runs Apache Ant's -diagnostics code inside Ant itself. This is good for -debugging Ant's configuration under an IDE. -Since Ant 1.7.0 -

+

Runs Apache Ant's -diagnostics code inside Ant itself. This is good for debugging +Ant's configuration under an IDE. Since Ant 1.7.0

Examples

-    <target name="diagnostics" description="diagnostics">
-        <diagnostics/>
-    </target>
-
-

- Prints out the current diagnostics dump. -

+<target name="diagnostics" description="diagnostics"> + <diagnostics/> +</target>
+

Prints out the current diagnostics dump.

diff --git a/manual/Tasks/dirname.html b/manual/Tasks/dirname.html index 3a7b75adb..17671c49a 100644 --- a/manual/Tasks/dirname.html +++ b/manual/Tasks/dirname.html @@ -26,46 +26,39 @@

Dirname

Description

-

-Task to determine the directory path of a specified file. -

-

-When this task executes, it will set the specified property to the -value of the specified file (or directory) up to, but not including, -the last path element. If the specified file is a path that ends in a -filename, the filename will be dropped. If the specified file is just -a filename, the directory will be the current directory. -

-

- Note: This is not the same as the UNIX dirname command, which is - defined as "strip non-directory suffix from filename". <dirname> - determines the full directory path of the specified file. -

+

Task to determine the directory path of a specified file.

+

When this task executes, it will set the specified property to the value of the specified file +(or directory) up to, but not including, the last path element. If the specified file is a path that +ends in a filename, the filename will be dropped. If the specified file is just a filename, the +directory will be the current directory.

+

Note: This is not the same as the UNIX dirname command, which is +defined as "strip non-directory suffix from filename". <dirname> determines the +full directory path of the specified file.

Parameters

- +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe path to take the dirname of.YesfileThe path to take the dirname of.Yes
propertyThe name of the property to set.YespropertyThe name of the property to set.Yes

Examples

-
  <dirname property="antfile.dir" file="${ant.file}"/>
-will set antfile.dir to the directory path for -${ant.file}. -
  <dirname property="foo.dirname" file="foo.txt"/>
-will set foo.dirname to the project's basedir. +
<dirname property="antfile.dir" file="${ant.file}"/>
+

will set antfile.dir to the directory path for ${ant.file}.

+ +
<dirname property="foo.dirname" file="foo.txt"/>
+

will set foo.dirname to the project's basedir.

diff --git a/manual/Tasks/ear.html b/manual/Tasks/ear.html index a7b246235..688b5f647 100644 --- a/manual/Tasks/ear.html +++ b/manual/Tasks/ear.html @@ -26,273 +26,240 @@

Ear

Description

-

An extension of the Jar task with special -treatment for files that should end up in an Enterprise Application archive.

-

(The Ear task is a shortcut for specifying the particular layout of a EAR file. -The same thing can be accomplished by using the prefix and fullpath -attributes of zipfilesets in a Zip or Jar task.)

-

The extended zipfileset element from the zip task (with attributes prefix, fullpath, and src) is available in the Ear task.

+

An extension of the Jar task with special treatment for files that should +end up in an Enterprise Application archive.

+

(The Ear task is a shortcut for specifying the particular layout of a EAR file. The +same thing can be accomplished by using the prefix and fullpath attributes of +zipfilesets in a Zip or Jar task.)

+

The extended zipfileset element from the Zip task (with +attributes prefix, fullpath, and src) is available in +the Ear task.

-

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 users. If you wish -to avoid this behavior you must set the duplicate attribute -to a value other than its default, "add".

+

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 users. If you wish to avoid this behavior you must set the duplicate +attribute to a value other than its default, add.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
destfilethe EAR file to create.Yesdestfilethe EAR file to create.Yes
appxmlThe deployment descriptor to use (META-INF/application.xml).Yes, unless update is set to trueappxmlThe deployment descriptor to use (META-INF/application.xml).Yes, unless update is set to true
basedirthe directory from which to jar the files.Nobasedirthe directory from which to jar the files.No
compressNot only store data but also compress them, - defaults to true. Unless you set the keepcompression - attribute to false, this will apply to the entire archive, not - only the files you've added while updating.NocompressNot only store data but also compress them. Unless you set the keepcompression + attribute to false, this will apply to the entire archive, not only the files you've + added while updating.No; defaults to true
keepcompressionFor entries coming from existing archives (like - nested zipfilesets or while updating the archive), keep - the compression as it has been originally instead of using the - compress attribute. Defaults to false. Since Apache Ant - 1.6NokeepcompressionFor entries coming from existing archives (like nested zipfilesets or while + updating the archive), keep the compression as it has been originally instead of using the + compress attribute. Since Apache Ant 1.6No; defaults to false
encodingThe character encoding to use for filenames - inside the archive. Defaults to UTF8. It is not - recommended to change this value as the created archive will most - likely be unreadable for Java otherwise. -
See also the discussion in the - zip task page
NoencodingThe character encoding to use for filenames inside the archive. It is not + recommended to change this value as the created archive will most likely be unreadable for + Java otherwise.
See also the discussion in the zip + task page
No; defaults to UTF8
filesonlyStore only file entries, defaults to falseNofilesonlyStore only file entries.No; defaults to false
includescomma- or space-separated list of patterns of files that must be - included. All files are included when omitted.Noincludescomma- or space-separated list of patterns of files that must be included.No; defaults to all (**)
includesfilethe name of a file. Each line of this file is - taken to be an include patternNoincludesfilename of a file. Each line of this file is taken to be an include pattern.No
excludescomma- or space-separated list of patterns of files that must be - excluded. No files (except default excludes) are excluded when omitted.Noexcludescomma- or space-separated list of patterns of files that must be excluded.No; defaults to default excludes or none if defaultexcludes is no
excludesfilethe name of a file. Each line of this file is - taken to be an exclude patternNoexcludesfilename of a file. Each line of this file is taken to be an exclude pattern.No
defaultexcludesindicates whether default excludes should be used or not - ("yes"/"no"). Default excludes are used when omitted.Nodefaultexcludesindicates whether default excludes should be used or not (yes|no).No; defaults to yes
manifestthe manifest file to use.Nomanifestthe manifest file to use.No
filesetmanifestbehavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. 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. Default value is "skip". - Nofilesetmanifestbehavior 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
whenmanifestonlybehavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".Nowhenmanifestonlybehavior when no files match. Valid values are fail, skip, + and create.No; defaults to create
manifestencodingThe encoding used to read the JAR manifest, when a manifest file is specified.No, defaults to the platform encoding.manifestencodingThe encoding used to read the JAR manifest, when a manifest file is specified.No; defaults to default JVM character encoding
indexwhether 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. Defaults to - false.Noindexwhether 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
indexMetaInfwhether 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. Defaults to false
- Since Ant 1.8.0.
NoindexMetaInfwhether 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
updateindicates whether to update or overwrite - the destination file if it already exists. Default is "false".Noupdateindicates whether to update or overwrite the destination file if it already exists.No; default is false
duplicatebehavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". Noduplicatebehavior when a duplicate file is found. Valid values are add, preserve, + and fail.No; default is add
roundupWhether the file modification times will be - rounded up to the next even number of seconds.
- Zip archives store file modification times with a granularity of - two seconds, so the times will either be rounded up or down. If - you round down, the archive will always seem out-of-date when you - rerun the task, so the default is to round up. Rounding up may - lead to a different type of problems like JSPs inside a web - archive that seem to be slightly more recent than precompiled - pages, rendering precompilation useless.
- Defaults to true. Since Ant 1.6.2
NoroundupWhether the file modification times will be rounded up to the next even number of + seconds.
Zip archives store file modification times with a granularity of 2 seconds, so + the times will either be rounded up or down. If you round down, the archive will always seem + out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a + different type of problems like JSPs inside a web archive that seem to be slightly more recent + than precompiled pages, rendering precompilation useless.
Since Ant 1.6.2
No; defaults to true
levelNon-default level at which file compression should be - performed. Valid values range from 0 (no compression/fastest) to 9 - (maximum compression/slowest). Since Ant 1.7NolevelNon-default level at which file compression should be performed. Valid values range + from 0 (no compression/fastest) to 9 (maximum compression/slowest). Since Ant + 1.7No
preserve0permissionswhen updating an archive or adding entries from a - different archive Ant will assume that a Unix permissions value of - 0 (nobody is allowed to do anything to the file/directory) means - that the permissions haven't been stored at all rather than real - permissions and will instead apply its own default values.
- Set this attribute to true if you really want to preserve the - original permission field. Since Ant 1.8.0 +
preserve0permissionswhen updating an archive or adding entries from a different archive Ant will assume that a + Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means + that the permissions haven't been stored at all rather than real permissions and will instead + apply its own default values.
Set this attribute to true if you really want to + preserve the original permission field. Since Ant 1.8.0
No, default is falseNo; default is false
useLanguageEncodingFlagWhether to set the language encoding flag if the - encoding is UTF-8. This setting doesn't have any effect if the - encoding is not UTF-8. - Since Ant 1.8.0. -
See also the discussion in the - zip task page
No, default is trueuseLanguageEncodingFlagWhether to set the language encoding flag if the encoding is UTF-8. This setting doesn't + have any effect if the encoding is not UTF-8. Since Ant 1.8.0.
See also + the discussion in the zip task page
No; default is true
createUnicodeExtraFieldsWhether to create unicode extra fields to store - the file names a second time inside the entry's metadata. -
Possible values are "never", "always" and "not-encodeable" - which will only add Unicode extra fields if the file name cannot - be encoded using the specified encoding. - Since Ant 1.8.0. -
See also the discussion in the - zip task page
No, default is "never"createUnicodeExtraFieldsWhether to create Unicode extra fields to store the file names a second time inside the + entry's metadata.
Possible values are never, always + and not-encodeable which will only add Unicode extra fields if the file name cannot be + encoded using the specified encoding. Since Ant 1.8.0.
See also + the discussion in the zip task page
No; default is never
fallbacktoUTF8Whether to use UTF-8 and the language encoding - flag instead of the specified encoding if a file name cannot be - encoded using the specified encoding. - Since Ant 1.8.0. -
See also the discussion in the - zip task page
No, default is falsefallbacktoUTF8Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a + file name cannot be encoded using the specified encoding. Since Ant 1.8.0.
See + also the discussion in the zip task page
No; default is false
mergeClassPathAttributesWhether to merge the Class-Path attributes found - in different manifests (if merging manifests). If false, only - the attribute of the last merged manifest will be preserved. - Since Ant 1.8.0. -
unless you also set flattenAttributes to true this may - result in manifests containing multiple Class-Path attributes - which violates the manifest specification.
No, default is falsemergeClassPathAttributesWhether to merge the Class-Path attributes found in different manifests (if + merging manifests). If false, only the attribute of the last merged manifest will be + preserved. Since Ant 1.8.0.
unless you also set flattenAttributes + to true this may result in manifests containing multiple Class-Path + attributes which violates the manifest specification.
No; default is false
flattenAttributesWhether to merge attributes occurring more than - once in a section (this can only happen for the Class-Path - attribute) into a single attribute. - Since Ant 1.8.0.No, default is falseflattenAttributesWhether to merge attributes occurring more than once in a section (this can only happen for + the Class-Path attribute) into a single attribute. Since Ant + 1.8.0.No; default is false
zip64ModeWhen to use Zip64 extensions for entries. The - possible values are "never", "always" and "as-needed". - Since Ant 1.9.1. -
See also the discussion in the - zip task page
No, default is "never"zip64ModeWhen to use Zip64 extensions for entries. The possible values + are never, always and as-needed. Since Ant 1.9.1.
See also + the discussion in the zip task page
No; default is never

Nested elements

metainf

-

The nested metainf element specifies a FileSet. All files included in this fileset will -end up in the META-INF directory of the ear file. If this -fileset includes a file named MANIFEST.MF, the file is -ignored and you will get a warning.

+

The nested metainf element specifies +a FileSet. All files included in this fileset will end up in +the META-INF directory of the ear file. If this fileset includes a file +named MANIFEST.MF, the file is ignored and you will get a warning.

manifest, indexjars, service

-These are inherited from <jar> +

These are inherited from <jar>

Example

-    <ear destfile="${build.dir}/myapp.ear" appxml="${src.dir}/metadata/application.xml">
-      <fileset dir="${build.dir}" includes="*.jar,*.war"/>
-    </ear>
-
+<ear destfile="${build.dir}/myapp.ear" appxml="${src.dir}/metadata/application.xml"> + <fileset dir="${build.dir}" includes="*.jar,*.war"/> +</ear>
diff --git a/manual/Tasks/echo.html b/manual/Tasks/echo.html index 49f5bc67a..5a0c383fe 100644 --- a/manual/Tasks/echo.html +++ b/manual/Tasks/echo.html @@ -26,161 +26,143 @@

Echo

Description

-

Echoes a message to the current loggers and listeners which -means System.out unless overridden. A level -can be specified, which controls at what logging level the message is -filtered at. -

-The task can also echo to a file, in which case the option to append rather -than overwrite the file is available, and the level option is -ignored

+

Echoes a message to the current loggers and listeners which means System.out unless +overridden. A level can be specified, which controls at what logging level the message is +filtered at.

+

The task can also echo to a file, in which case the option to append rather than overwrite the +file is available, and the level option is ignored

Parameters

- +
- - - + + + - - - + + + - - - + + + - - + - - + - + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
messagethe message to echo.No. Text may also be included in a - character section within this element. If neither is included a - blank line will be emitted in the output.messagethe message to echo.No; defaults to a blank line unless text is included in a character section within this + element
filethe file to write the message to.No; only one of these may be used.filethe file to write the message to.No; only one of these may be used
outputthe Resource + outputthe Resource to write the message to (see note). Since Apache Ant 1.8
appendAppend to an existing file (or - - open a new file / overwrite an existing file)? Default false. + appendAppend to an existing file + (or open a new file / overwrite an existing file)? No; ignored unless output indicates a - filesystem destination.No; ignored unless output indicates a filesystem destination, default + is false
levelControl the level at which this message is reported. - One of "error", "warning", "info", "verbose", "debug" (decreasing order)No - default is "warning".levelControl the level at which this message is reported. One + of error, warning, info, verbose, debug (decreasing + order)No; default is warning
encodingencoding to use, default is ""; the local system encoding. since Ant 1.7Noencodingencoding to use. since Ant 1.7No; defaults to default JVM character encoding
forceOverwrite read-only destination - files. since Ant 1.8.2No; defaults to false.forceOverwrite read-only destination files. since Ant 1.8.2No; defaults to false

Examples

-
-<echo message="Hello, world"/>
-
-
-<echo message="Embed a line break:${line.separator}"/>
-
-
-<echo>Embed another:${line.separator}</echo>
-
-
-<echo>This is a longer message stretching over
+
<echo message="Hello, world"/>
+
<echo message="Embed a line break:${line.separator}"/>
+
<echo>Embed another:${line.separator}</echo>
+
<echo>This is a longer message stretching over
 two lines.
-</echo>
-
-
-<echo>
+</echo>
+
<echo>
 This is a longer message stretching over
 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 04 February 2004 / End of Line handling - for more details. +</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.

<echo message="Deleting drive C:" level="debug"/>
-A message which only appears in -debug mode. +

A message which only appears in -debug mode.

<echo level="error">
 Imminent failure in the antimatter containment facility.
 Please withdraw to safe location at least 50km away.
-</echo>
-
-A message which appears even in -quiet mode. +</echo> +

A message which appears even in -quiet mode.

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

Generate a shell script by echoing to a file. Note the use of a double $ symbol to stop +Ant filtering out the single $ during variable expansion.

-

Depending on the loglevel Ant runs, messages are print out or silently -ignored: +

Depending on the log level Ant runs at, messages are print out or silently ignored:

- - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +
Ant-Statement-quiet, -qno statement-verbose, -v-debug, -dAnt command line-quiet, -qno switch-verbose, -v-debug, -d
<echo message="This is error message." level="error" />
okokokok
<echo message="This is error message." level="error"/>
okokokok
<echo message="This is warning message." />
okokokok
<echo message="This is warning message."/>
okokokok
<echo message="This is warning message." level="warning" />
okokokok
<echo message="This is warning message." level="warning"/>
okokokok
<echo message="This is info message." level="info" />
not loggedokokok
<echo message="This is info message." level="info"/>
not loggedokokok
<echo message="This is verbose message." level="verbose" />
not loggednot loggedokok
<echo message="This is verbose message." level="verbose"/>
not loggednot loggedokok
<echo message="This is debug message." level="debug" />
not loggednot loggednot loggedok
<echo message="This is debug message." level="debug"/>
not loggednot loggednot loggedok
diff --git a/manual/Tasks/echoproperties.html b/manual/Tasks/echoproperties.html index bb81568d7..b30bd866c 100644 --- a/manual/Tasks/echoproperties.html +++ b/manual/Tasks/echoproperties.html @@ -27,59 +27,50 @@

echoproperties

Description

-

Displays all the current properties (or a subset of them specified -by a nested <propertyset>) in the project. The -output can be sent to a file if desired. This task can be used as a -somewhat contrived means of returning data from an -<ant> invocation, but is really for debugging build +

Displays all the current properties (or a subset of them specified by a +nested <propertyset>) in the project. The output can be sent to a file if +desired. This task can be used as a somewhat contrived means of returning data from an +ant invocation, but is really for debugging build files.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
destfileIf specified, the value indicates the name of the - file to send the output of the statement to. The generated output file - is compatible for loading by any Java application as a property file. - If not specified, then the output will go to the Apache Ant log.NodestfileIf specified, the value indicates the name of the file to send the output of the statement + to. The generated output file is compatible for loading by any Java application as a property + file.No; by default, output to the log
prefix - a prefix which is used to filter the properties: - only properties whose names start with this prefix will be echoed. - Noprefixa prefix which is used to filter the properties: only properties whose names start with this + prefix will be echoed.No
regex - a regular expression which is used to filter the - properties: - only those properties whose names match it will be echoed. - Noregexa regular expression which is used to filter the properties: only those properties whose + names match it will be echoed.No
failonerrorBy default, the "failonerror" attribute is enabled. - If an error occurs while writing the properties to a file, and this - attribute is enabled, then a BuildException will be thrown, causing the - build to fail. If disabled, then IO errors will be reported as a log - statement, and the build will continue without failure from this task.NofailonerrorIf an error occurs while writing the properties to a file, and this attribute is enabled, + then a BuildException will be thrown, causing the build to fail. If disabled, then IO errors + will be reported as a log statement, and the build will continue without failure from this + task.No; default is true
formatOne of text or xml. - Determines the output format. Defaults to text.NoformatOne of text or xml. Determines the output format.No; defaults to text
@@ -87,12 +78,10 @@ files.

propertyset

-

You can specify subsets of properties to be echoed with propertysets. Using -propertysets gives more control on which properties will be -picked up. The attributes prefix and regex are just -shortcuts that use propertysets internally. -

+

You can specify subsets of properties to be echoed +with propertysets. Using propertysets gives +more control on which properties will be picked up. The attributes prefix +and regex are just shortcuts that use propertysets internally.

since Ant 1.6.

@@ -100,33 +89,30 @@ shortcuts that use propertysets internally.
<echoproperties/>

Report the current properties to the log.

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

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

+

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

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

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

+

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

<echoproperties prefix="java."/>
-

List all properties beginning with "java."

+

List all properties beginning with java.

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

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

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

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

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

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

+

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

-  <echoproperties>
-    <propertyset>
-      <propertyref regex=".*ant.*"/>
-    </propertyset>
-  </echoproperties>
-
+<echoproperties> + <propertyset> + <propertyref regex=".*ant.*"/> + </propertyset> +</echoproperties> diff --git a/manual/Tasks/echoxml.html b/manual/Tasks/echoxml.html index c0dec59e7..dd5a63e5f 100644 --- a/manual/Tasks/echoxml.html +++ b/manual/Tasks/echoxml.html @@ -28,35 +28,32 @@

Description

Echo nested XML to the console or a file. Since Apache Ant 1.7

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileThe file to receive the XML. If omitted nested - XML will be echoed to the log.NofileThe file to receive the XML.No; by default nested XML is echoed to the log
appendWhether to append file, if specified.NoappendWhether to append file, if specified.No
namespacePolicySets the namespace policy as defined - by org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy. - Valid values are ignore, elementsOnly, or all. - Since Apache Ant 1.8 - No, default ignorenamespacePolicySets the namespace policy as defined + by org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy. Valid values + are ignore, elementsOnly, or all. Since Apache Ant 1.8No; default ignore

Parameters specified as nested elements

-Nested XML content is required. +

Nested XML content is required.

Examples

<echoxml file="subbuild.xml">
@@ -65,9 +62,8 @@ Nested XML content is required.
       <echo>foo</echo>
     </target>
   </project>
-</echoxml>
-
-

Creates an Ant buildfile, subbuild.xml.

+</echoxml> +

Creates an Ant buildfile, subbuild.xml.

diff --git a/manual/Tasks/ejb.html b/manual/Tasks/ejb.html index f8de104de..e113eea0f 100644 --- a/manual/Tasks/ejb.html +++ b/manual/Tasks/ejb.html @@ -36,7 +36,7 @@
  • Conor MacNeill
  • Cyrille Morvan (cmorvan@ingenosya.com)
  • Greg Nelson (gn@sun.com)
  • -
  • Rob van Oostrum(rob@springwellfarms.ca)
  • +
  • Rob van Oostrum (rob@springwellfarms.ca)

  • @@ -48,83 +48,75 @@

    Introduction

    -

    Ant provides a number of optional tasks for developing 1.x and 2.x -Enterprise Java Beans (EJBs). -In general these tasks are specific to the particular vendor's EJB Server.

    +

    Ant provides a number of optional tasks for developing 1.x and +2.x Enterprise +Java Beans (EJBs). In general these tasks are specific to the particular vendor's EJB +Server.

    The tasks support:

    -

    - Vendors such as BEA and IBM now provide custom Ant tasks to work with their - particular products. More importantly, EJB3.0 renders this whole process obsolete. - Accordingly, development of these tasks is effectively frozen. Bug reports - and especially patches are welcome, but there is no pressing need to add - support for new application servers. Nobody should be writing new EJB2.x applications - and definitely not new EJB2.x servers. -

    +

    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 +of these tasks is effectively frozen. Bug reports and especially patches are welcome, but there is +no pressing need to add support for new application servers. Nobody should be writing new EJB 2.x +applications and definitely not new EJB 2.x servers.


    EJB Tasks

    - - - - - - - - - - - - + + + + + + + + + + +
    TaskApplication Servers
    blgenclientBorland Application Server 4.5 and 5.x
    iplanet-ejbciPlanet Application Server 6.0
    ejbjarNested Elements
    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
    TaskApplication Servers
    blgenclientBorland Application Server 4.5 and 5.x
    iplanet-ejbciPlanet Application Server 6.0
    ejbjarNested Elements
    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

    +

    ddcreator

    -

    Description:

    -

    ddcreator will compile a set of Weblogic text-based deployment descriptors into a serialized -EJB deployment descriptor. The selection of which of the text-based descriptors are to be compiled -is based on the standard Ant include and exclude selection mechanisms. -

    +

    Description

    +

    ddcreator will compile a set of WebLogic text-based deployment descriptors into a +serialized EJB deployment descriptor. The selection of which of the text-based descriptors are to be +compiled is based on the standard Ant include and exclude selection +mechanisms.

    -

    Parameters:

    - +

    Parameters

    +
    - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    descriptorsThis is the base directory from which descriptors are selected.YesdescriptorsThis is the base directory from which descriptors are selected.Yes
    destThe directory where the serialized deployment descriptors will be writtenYesdestThe directory where the serialized deployment descriptors will be writtenYes
    classpathThis is the classpath to use to run the underlying weblogic ddcreator tool. - This must include the weblogic.ejb.utils.DDCreator classNoclasspathThis is the classpath to use to run the underlying WebLogic ddcreator tool. + This must include the weblogic.ejb.utils.DDCreator classNo

    Examples

    @@ -133,69 +125,67 @@ is based on the standard Ant include and exclude selection mechanisms. dest="${gen.classes}" classpath="${descriptorbuild.classpath}"> <include name="*.txt"/> -</ddcreator> - +</ddcreator>

    ejbc

    -

    Description:

    -

    The ejbc task will run Weblogic's ejbc tool. This tool will take a serialized deployment descriptor, -examine the various EJB interfaces and bean classes and then generate the required support classes -necessary to deploy the bean in a Weblogic EJB container. This will include the RMI stubs and skeletons -as well as the classes which implement the bean's home and remote interfaces.

    -

    -The ant task which runs this tool is able to compile several beans in a single operation. The beans to be -compiled are selected by including their serialized deployment descriptors. The standard Ant -include and exclude constructs can be used to select the deployment descriptors -to be included.

    -

    -Each descriptor is examined to determine whether the generated classes are out of date and need to be -regenerated. The deployment descriptor is de-serialized to discover the home, remote and +

    Description

    +

    The ejbc task will run WebLogic's ejbc tool. This tool will take a +serialized deployment descriptor, examine the various EJB interfaces and bean classes and then +generate the required support classes necessary to deploy the bean in a WebLogic EJB container. This +will include the RMI stubs and skeletons as well as the classes which implement the bean's home and +remote interfaces.

    +

    The Ant task which runs this tool is able to compile several beans in a single operation. The +beans to be compiled are selected by including their serialized deployment descriptors. The standard +Ant include and exclude constructs can be used to select the deployment +descriptors to be included.

    +

    Each descriptor is examined to determine whether the generated classes are out of date and need +to be regenerated. The deployment descriptor is de-serialized to discover the home, remote and implementation classes. The corresponding source files are determined and checked to see their modification times. These times and the modification time of the serialized descriptor itself are -compared with the modification time of the generated classes. If the generated classes are not present -or are out of date, the ejbc tool is run to generate new versions.

    -

    Parameters:

    - +compared with the modification time of the generated classes. If the generated classes are not +present or are out of date, the ejbc tool is run to generate new versions.

    +

    Parameters

    +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    descriptorsThis is the base directory from which the serialized deployment descriptors are selected.YesdescriptorsThis is the base directory from which the serialized deployment descriptors are + selected.Yes
    destThe base directory where the generated classes, RIM stubs and RMI skeletons are writtenYesdestThe base directory where the generated classes, RIM stubs and RMI skeletons are writtenYes
    manifestThe name of a manifest file to be written. This manifest will contain an entry for each EJB processedYesmanifestThe name of a manifest file to be written. This manifest will contain an entry for each EJB + processedYes
    srcThe base directory of the source tree containing the source files of the home interface, - remote interface and bean implementation classes.YessrcThe base directory of the source tree containing the source files of the home interface, + remote interface and bean implementation classes.Yes
    classpathThis classpath must include both the weblogic.ejbc class and the - class files of the bean, home interface, remote interface, etc of the bean being - processed.NoclasspathThis classpath must include both the weblogic.ejbc class and the class files of + the bean, home interface, remote interface, etc of the bean being processed.No
    keepgeneratedControls whether ejbc will keep the - intermediate Java files used to build the class files. This can be - useful when debugging.No, defaults to false.keepgeneratedControls whether ejbc will keep the intermediate java files used to build the + class files. This can be useful when debugging.No; defaults to false

    Examples

    @@ -206,112 +196,83 @@ or are out of date, the ejbc tool is run to generate new versions.

    manifest="${build.manifest}" classpath="${descriptorbuild.classpath}"> <include name="*.ser"/> -</ejbc> - +</ejbc>

    iplanet-ejbc

    -

    -Description:

    -Task to compile EJB stubs and skeletons for the iPlanet Application Server -6.0. Given a standard EJB 1.1 XML descriptor as well as an iAS-specific -EJB descriptor, this task will generate the stubs and skeletons required -to deploy the EJB to iAS. Since the XML descriptors can include multiple -EJBs, this is a convenient way of specifying many EJBs in a single Ant -task. -

    For each EJB specified, the task will locate the three classes that -comprise the EJB in the destination directory. If these class files -cannot be located in the destination directory, the task will fail. The -task will also attempt to locate the EJB stubs and skeletons in this directory. -If found, the timestamps on the stubs and skeletons will be checked to -ensure they are up to date. Only if these files cannot be found or if they -are out of date will the iAS ejbc utility be called to generate new stubs -and skeletons.

    -

    -Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

    Description

    +

    Task to compile EJB stubs and skeletons for the iPlanet Application Server 6.0. Given a standard +EJB 1.1 XML descriptor as well as an iAS-specific EJB descriptor, this task will generate the stubs +and skeletons required to deploy the EJB to iAS. Since the XML descriptors can include multiple +EJBs, this is a convenient way of specifying many EJBs in a single Ant task.

    +

    For each EJB specified, the task will locate the three classes that comprise the EJB in the +destination directory. If these class files cannot be located in the destination directory, the +task will fail. The task will also attempt to locate the EJB stubs and skeletons in this directory. +If found, the timestamps on the stubs and skeletons will be checked to ensure they are up to +date. Only if these files cannot be found or if they are out of date will the iAS ejbc +utility be called to generate new stubs and skeletons.

    +

    Parameters

    - +
    AttributeDescriptionRequired
    ejbdescriptorStandard EJB 1.1 XML descriptor (typically titled "ejb-jar.xml").Yes
    iasdescriptoriAS-specific EJB XML descriptor (typically titled "ias-ejb-jar.xml").Yes
    destThe is the base directory where the RMI stubs and skeletons -are written. In addition, the class files for each bean (home interface, -remote interface, and EJB implementation) must be found in this directory.Yes
    classpathThe classpath used when generating EJB stubs and skeletons. -If omitted, the classpath specified when Ant was started will be used. -Nested "classpath" elements may also be used.No
    keepgeneratedIndicates whether or not the Java source files which are -generated by ejbc will be saved or automatically deleted. If "yes", the -source files will be retained. If omitted, it defaults to "no".
    + + + + + - - + + + + + - - + + + + + - + + + + + - - + + + + + - - + + + + + - + + + + + - - + + + + +
    AttributeDescriptionRequired
    No
    ejbdescriptorStandard EJB 1.1 XML descriptor (typically titled ejb-jar.xml).Yes
    debug
    iasdescriptoriAS-specific EJB XML descriptor (typically titled ias-ejb-jar.xml).Yes
    Indicates whether or not the ejbc utility should log additional debugging -statements to the standard output. If "yes", the additional debugging statements -will be generated. If omitted, it defaults to "no".
    destThe is the base directory where the RMI stubs and skeletons are written. In addition, the + class files for each bean (home interface, remote interface, and EJB implementation) must be + found in this directory.Yes
    -
    No
    -
    classpathThe classpath used when generating EJB stubs and skeletons. Nested classpath + elements may also be used.No; defaults to the classpath specified when Ant was started
    iashome
    keepgeneratedIndicates whether or not the Java source files which are generated by ejbc will + be saved or automatically deleted. If yes, the source files will be retained.No; defaults to no
    May be used to specify the "home" directory for this iAS installation. -This is used to find the ejbc utility if it isn't included in the user's -system path. If specified, it should refer to the "[install-location]/iplanet/ias6/ias" -directory. If omitted, the ejbc utility must be on the user's system path.
    debugIndicates whether or not the ejbc utility should log additional debugging + statements to the standard output. If yes, the additional debugging statements will be + generated.No; defaults to no
    No
    iashomeMay be used to specify the "home" directory for this iAS installation. This is used to find + the ejbc utility if it isn't included in the user's system path. If specified, it + should refer to the [install-location]/iplanet/ias6/ias directory.No; by default the ejbc utility must be on the user's system path
    -

    -Examples

    +

    Examples

     <iplanet-ejbc ejbdescriptor="ejb-jar.xml"
    @@ -330,127 +291,114 @@ Examples
                       <pathelement path="."/>
                       <pathelement path="${build.classpath}"/>
                   </classpath>
    -</iplanet-ejbc>
    -
    +</iplanet-ejbc>

    wlrun

    -

    Description:

    +

    Description

    -

    The wlrun task is used to start a weblogic server. The task runs -a weblogic instance in a separate Java Virtual Machine. A number of parameters -are used to control the operation of the weblogic instance. Note that the task, -and hence Ant, will not complete until the weblogic instance is stopped.

    +

    The wlrun task is used to start a WebLogic server. The task runs a WebLogic instance +in a separate JVM. A number of parameters are used to control the operation of the WebLogic +instance. Note that the task, and hence Ant, will not complete until the WebLogic instance is +stopped.

    -

    Parameters:

    - +

    Parameters

    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + - - - - + + +
    AttributeDescriptionRequired for 4.5.1 and 5.1Required for 6.0AttributeDescriptionRequired for 4.5.1 and 5.1Required for 6.0
    BEA HomeThe location of the BEA Home where the server's config is defined. - If this attribute is present, wlrun assumes that the server will - be running under Weblogic 6.0N/AYesBEAhomeThe location of the BEAhome where the server's config is stored. If this + attribute is present, wlrun assumes that the server will be running under + WebLogic 6.0N/AYes
    homeThe location of the weblogic home that is to be used. This is the location - where weblogic is installed.YesYes. Note this is the absolute location, not relative to - BEA home.homeThe location of the WebLogic "home" where WebLogic is installed.YesYes. Note this is the absolute location, not relative to BEAhome.
    DomainThe domain to which the server belongs.N/AYesDomainThe domain to which the server belongs.N/AYes
    classpathThe classpath to be used with the Java Virtual Machine that runs the Weblogic - Server. Prior to Weblogic 6.0, this is typically set to the Weblogic - boot classpath. Under Weblogic 6.0 this should include all the - weblogic jarsYesYesclasspathThe classpath to be used with the JVM that runs the WebLogic Server. Prior to WebLogic 6.0, + this is typically set to the WebLogic boot classpath. Under WebLogic 6.0 this should include + all the WebLogic jarsYes
    wlclasspathThe weblogic classpath used by the Weblogic Server.NoN/AwlclasspathThe WebLogic classpath used by the WebLogic Server.NoN/A
    propertiesThe name of the server's properties file within the weblogic home directory - used to control the weblogic instance.YesN/ApropertiesThe name of the server's properties file within the WebLogic home directory used to control + the WebLogic instance.YesN/A
    nameThe name of the weblogic server within the weblogic home which is to be run. - This defaults to "myserver"NoNonameThe name of the WebLogic server within the WebLogic home which is to be run.No; defaults to myserver
    policyThe name of the security policy file within the weblogic home directory that - is to be used. If not specified, the default policy file weblogic.policy - is used.NoNopolicyThe name of the security policy file within the WebLogic home directory that is to be + used.No; defaults to weblogic.policy
    usernameThe management username used to manage the serverN/ANousernameThe management username used to manage the serverN/ANo
    passwordThe server's management passwordN/AYespasswordThe server's management passwordN/AYes
    pkPasswordThe private key password so the server can decrypt the SSL - private key fileN/ANopkPasswordThe private key password so the server can decrypt the SSL private key fileN/ANo
    jvmargsAdditional argument string passed to the Java Virtual Machine used to run the - Weblogic instance.NoNojvmargsAdditional argument string passed to the JVM used to run the WebLogic instance.No
    weblogicMainClassname of the main class for weblogicNoNoweblogicMainClassname of the main class for WebLogicNo

    Nested Elements

    -

    The wlrun task supports nested <classpath> and <wlclasspath> -elements to set the respective classpaths.

    +

    The wlrun task supports nested <classpath> +and <wlclasspath> elements to set the respective classpaths.

    Examples

    -

    This example shows the use of wlrun to run a server under Weblogic 5.1

    +

    This example shows the use of wlrun to run a server under WebLogic 5.1

         <wlrun taskname="myserver"
    @@ -461,1351 +409,1195 @@ elements to set the respective classpaths.

    properties="myserver/myserver.properties"/>
    -

    This example shows wlrun being used to run the petstore server under -Weblogic 6.0

    +

    This example shows wlrun being used to run the petstore server under +WebLogic 6.0

    -    <wlrun taskname="petstore"
    -           classpath="${weblogic.classes}"
    -           name="petstoreServer"
    -           domain="petstore"
    -           home="${weblogic.home}"
    -           password="petstorePassword"
    -           beahome="${bea.home}"/>
    -
    +<wlrun taskname="petstore" + classpath="${weblogic.classes}" + name="petstoreServer" + domain="petstore" + home="${weblogic.home}" + password="petstorePassword" + beahome="${bea.home}"/>

    wlstop

    -

    Description:

    +

    Description

    -

    The wlstop task is used to stop a weblogic instance which is -currently running. To shut down an instance you must supply both a username and -a password. These will be stored in the clear in the build script used to stop -the instance. For security reasons, this task is therefore only appropriate in a -development environment.

    +

    The wlstop task is used to stop a WebLogic instance which is currently running. To +shut down an instance you must supply both a username and a password. These will be stored in the +clear in the build script used to stop the instance. For security reasons, this task is therefore +only appropriate in a development environment.

    -

    This task works for most version of Weblogic, including 6.0. You need to -specify the BEA Home to have this task work correctly under 6.0

    +

    This task works for most versions of WebLogic, including 6.0. You need to specify +the BEAHome to have this task work correctly under 6.0

    -

    Parameters:

    - +

    Parameters

    +
    - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    BEAHomeThis attribute selects Weblogic 6.0 shutdown.NoBEAHomeThis attribute selects WebLogic 6.0 shutdown.No
    classpathThe classpath to be used with the Java Virtual Machine that runs the Weblogic - Shutdown command.YesclasspathThe classpath to be used with the JVM that runs the WebLogic Shutdown command.Yes
    userThe username of the account which will be used to shutdown the serverYesuserThe username of the account which will be used to shutdown the serverYes
    passwordThe password for the account specified in the user parameter.YespasswordThe password for the account specified in the user parameter.Yes
    urlThe URL which describes the port to which the server is listening for T3 connections. - For example, t3://localhost:7001YesurlThe URL which describes the port to which the server is listening for T3 connections. For + example, t3://localhost:7001Yes
    delayThe delay in seconds after which the server will stop. This defaults to an - immediate shutdown.NodelayThe delay in seconds after which the server will stop.No; default is 0 (immediate shutdown)

    Nested Element

    -

    The classpath of the wlstop task can be set by a <classpath> nested element.

    +

    The classpath of the wlstop task can be set by a <classpath> +nested element.

    Examples

    -

    This example show the shutdown for a Weblogic 6.0 server

    +

    This example show the shutdown for a WebLogic 6.0 server

    -    <wlstop classpath="${weblogic.classes}"
    -            user="system"
    -            url="t3://localhost:7001"
    -            password="foobar"
    -            beahome="${bea.home}"/>
    -
    +<wlstop classpath="${weblogic.classes}" + user="system" + url="t3://localhost:7001" + password="foobar" + beahome="${bea.home}"/>

    ejbjar

    -

    Description:

    +

    Description

    -

    This task is designed to support building of EJB jar files (EJB 1.1 & 2.0). -Support is currently provided for 'vanilla' EJB jar files - i.e. those containing only -the user generated class files and the standard deployment descriptor. Nested -elements provide support for vendor specific deployment tools. These currently -include:

    +

    This task is designed to support building of EJB jar files (EJB 1.1 & 2.0). Support is +currently provided for 'vanilla' EJB jar files—i.e. those containing only the user generated +class files and the standard deployment descriptor. Nested elements provide support for vendor +specific deployment tools. These currently include:

    - -

    The task works as a directory scanning task, and performs an action for each -deployment descriptor found. As such the includes and excludes should be set -to ensure that all desired EJB descriptors are found, but no application -server descriptors are found. For each descriptor found, ejbjar will parse the -deployment descriptor to determine the necessary class files which implement the -bean. These files are assembled along with the deployment descriptors into a -well formed EJB jar file. Any support files which need to be included in the -generated jar can be added with the <support> nested element. For each -class included in the jar, ejbjar will scan for any super classes or super +

    The task works as a directory scanning task, and performs an action for each deployment +descriptor found. As such the includes and excludes should be set to +ensure that all desired EJB descriptors are found, but no application server descriptors are +found. For each descriptor found, ejbjar will parse the deployment descriptor to +determine the necessary class files which implement the bean. These files are assembled along with +the deployment descriptors into a well formed EJB jar file. Any support files which need to be +included in the generated jar can be added with the <support> nested element. For +each class included in the jar, ejbjar will scan for any super classes or super interfaces. These will be added to the generated jar.

    -

    If no nested vendor-specific deployment elements are present, the task will -simply generate a generic EJB jar. Such jars are typically used as the input to -vendor-specific deployment tools. For each nested deployment element, a vendor -specific deployment tool is run to generate a jar file ready for deployment in -that vendor's EJB container.

    - -

    The jar files are only built if they are out of date. Each deployment tool -element will examine its target jar file and determine if it is out of date with -respect to the class files and 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.

    +

    If no nested vendor-specific deployment elements are present, the task will simply generate a +generic EJB jar. Such jars are typically used as the input to vendor-specific deployment tools. For +each nested deployment element, a vendor specific deployment tool is run to generate a jar file +ready for deployment in that vendor's EJB container.

    -

    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 jar files are only built if they are out of date. Each deployment tool element will examine +its target jar file and determine if it is out of date with respect to the class files and +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.

    -

    Naming Convention

    +

    Naming Convention

    -Ejbjar handles the processing of multiple beans, and it uses a set of naming -conventions to determine the name of the generated EJB jars. The naming convention -that is used is controlled by the "naming" attribute. It supports the -following values +Ejbjar handles the processing of multiple beans, and it uses a set of naming +conventions to determine the name of the generated EJB jars. The naming convention that is used is +controlled by the naming attribute. It supports the following values
    - -
    descriptor
    -

    This is the default naming scheme. The name of the generated bean is derived from the -name of the deployment descriptor. For an Account bean, for example, the deployment -descriptor would be named Account-ejb-jar.xml. Vendor specific descriptors are -located using the same naming convention. The weblogic bean, for example, would be named -Account-weblogic-ejb-jar.xml. Under this arrangement, the deployment descriptors +

    descriptor
    +

    This is the default naming scheme. The name of the generated bean is derived from the name of +the deployment descriptor. For an Account bean, for example, the deployment descriptor +would be named Account-ejb-jar.xml. Vendor specific descriptors are located using the +same naming convention. The WebLogic bean, for example, would be +named Account-weblogic-ejb-jar.xml. Under this arrangement, the deployment descriptors can be separated from the code implementing the beans, which can be useful when the same bean code -is deployed in separate beans. -

    - -

    This scheme is useful when you are using one bean per EJB jar and where you may be - deploying the same bean classes in different beans, with different deployment characteristics.

    - -
    ejb-name
    -

    This naming scheme uses the <ejb-name> element from the deployment descriptor to -determine the bean name. In this situation, the descriptors normally use the generic -descriptor names, such as ejb-jar.xml along with any associated vendor specific descriptor -names. For example, If the value of the <ejb-name> were to be given in the deployment descriptor -as follows:

    -
    <ejb-jar>
    +is deployed in separate beans.

    +

    This scheme is useful when you are using one bean per EJB jar and where you may be deploying the +same bean classes in different beans, with different deployment characteristics.

    + +
    ejb-name
    +

    This naming scheme uses the <ejb-name> element from the deployment +descriptor to determine the bean name. In this situation, the descriptors normally use the generic +descriptor names, such as ejb-jar.xml along with any associated vendor specific +descriptor names. For example, If the value of the <ejb-name> were to be given in +the deployment descriptor as follows:

    +
    +<ejb-jar>
         <enterprise-beans>
             <entity>
                 <ejb-name>Sample</ejb-name>
    -            <home>org.apache.ant.ejbsample.SampleHome</home>
    -
    -

    -then the name of the generated bean would be Sample.jar -

    -

    -This scheme is useful where you want to use the standard deployment descriptor names, which may be more -compatible with other EJB tools. This scheme must have one bean per jar. -

    -
    directory
    -

    -In this mode, the name of the generated bean jar is derived from the directory -containing the deployment descriptors. Again the deployment descriptors typically use -the standard filenames. For example, if the path to the deployment descriptor is -/home/user/dev/appserver/dd/sample, then the generated -bean will be named sample.jar -

    -

    -This scheme is also useful when you want to use standard style descriptor names. It is often -most useful when the descriptors are located in the same directory as the bean source code, -although that is not mandatory. This scheme can handle multiple beans per jar. -

    - -
    basejarname
    -

    -The final scheme supported by the <ejbjar> task is used when you want to specify the generated -bean jar name directly. In this case the name of the generated jar is specified by the -"basejarname" attribute. Since all generated beans will have the same name, this task should -be only used when each descriptor is in its own directory. -

    - -

    -This scheme is most appropriate when you are using multiple beans per jar and only process a single -deployment descriptor. You typically want to specify the name of the jar and not derive it from the -beans in the jar. -

    - + <home>org.apache.ant.ejbsample.SampleHome</home> +

    then the name of the generated bean would be Sample.jar

    +

    This scheme is useful where you want to use the standard deployment descriptor names, which may +be more compatible with other EJB tools. This scheme must have one bean per jar.

    +
    directory
    +

    In this mode, the name of the generated bean jar is derived from the directory containing the +deployment descriptors. Again the deployment descriptors typically use the standard filenames. For +example, if the path to the deployment descriptor +is /home/user/dev/appserver/dd/sample, then the generated bean will be +named sample.jar

    +

    This scheme is also useful when you want to use standard style descriptor names. It is often most +useful when the descriptors are located in the same directory as the bean source code, although that +is not mandatory. This scheme can handle multiple beans per jar.

    + +
    basejarname
    +

    The final scheme supported by the <ejbjar> task is used when you want to +specify the generated bean jar name directly. In this case the name of the generated jar is +specified by the basejarname attribute. Since all generated beans will have the same +name, this task should be only used when each descriptor is in its own directory.

    + +

    This scheme is most appropriate when you are using multiple beans per jar and only process a +single deployment descriptor. You typically want to specify the name of the jar and not derive it +from the beans in the jar.

    Dependencies

    -

    In addition to the bean classes, ejbjar is able to ad additional classes to the generated -ejbjar. These classes are typically the support classes which are used by the bean's classes or as -parameters to the bean's methods.

    - -

    In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the 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. -

    - -

    The ejbjar task in Ant releases 1.5 and later 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. -

    - -

    In Ant 1.5, a new attribute, dependency has been introduced to allow the -buildfile to control what additional classes are added to the generated jar. It takes three -possible values

    +

    In addition to the bean classes, ejbjar is able to ad additional classes to the +generated EJB jar. These classes are typically the support classes which are used by the bean's +classes or as parameters to the bean's methods.

    + +

    In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the +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, a dependency attribute allows the buildfile to control what +additional classes are added to the generated jar. It takes three possible values

    -

    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:

    - +

    Parameters

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + +
    AttributeDescriptionRequired
    descriptordirThe base directory under which to scan for EJB deployment descriptors. If this attribute is + not specified, then the deployment descriptors must be located in the directory specified by + the srcdir attribute.No
    srcdirThe base directory containing the .class files that make up the bean. Included are + the home-, remote-, pk- + and implementation- classes and all classes that these depend on. Note that this + can be the same as the descriptordir if all files are in the same directory + tree.Yes
    destdirThe base directory into which generated jar files are deposited. Jar files are deposited in + directories corresponding to their location within the descriptordir + namespace. Note that this attribute is only used if the task is generating generic jars + (i.e. no vendor-specific deployment elements have been specified).Yes, unless vendor-specific deployment elements have been specified.
    cmpversionEither 1.0 or 2.0.
    A CMP 2.0 implementation exists currently only for + JBoss.
    No; default is 1.0
    namingControls the naming convention used to name generated EJB jars. Please refer to the + description above.No
    basejarnameThe base name that is used for the generated jar files. If this attribute is specified, the + generic jar file name will use this value as the prefix (followed by the value specified in + the genericjarsuffix attribute) and the resultant EJB jar file (followed by any + suffix specified in the nested element).No
    basenameterminatorString value used to substring out a string from the name of each deployment descriptor + found, which is then used to locate related deployment descriptors (e.g. the WebLogic + descriptors). For example, a basename of . and a deployment descriptor + called FooBean.ejb-jar.xml would result in a basename of FooBean which + would then be used to find FooBean.weblogic-ejb-jar.xml + and FooBean.weblogic-cmp-rdbms-jar.xml, as well as to create the filenames of the + jar files as FooBean-generic.jar and FooBean-wl.jar. This attribute + is not used if the basejarname attribute is specified.No; defaults to -
    genericjarsuffixString value appended to the basename of the deployment descriptor to create the filename of + the generic EJB jar file.No; defaults to -generic.jar
    classpathThis classpath is used when resolving classes which are to be added to the jar. Typically + nested deployment tool elements will also support a classpath which will be combined with this + classpath when resolving classesNo
    flatdestdirSet this attribute to true if you want all generated jars to be placed in the root + of the destdir, rather than according to the location of the deployment + descriptor within the descriptordir hierarchy.No
    AttributeDescriptionRequired
    descriptordirThe base directory under which to scan for EJB - deployment descriptors. If this attribute is not - specified, then the deployment descriptors must be - located in the directory specified by the 'srcdir' - attribute.No
    srcdirThe base directory containing the .class files that - make up the bean. Included are the home- remote- pk- - and implementation- classes and all classes, that these - depend on. Note that this can be the same as the - descriptordir if all files are in the same directory - tree.Yes
    destdirThe base directory into which generated jar files are - deposited. Jar files are deposited in directories - corresponding to their location within the descriptordir - namespace. Note that this attribute is only used if the - task is generating generic jars (i.e. no vendor-specific - deployment elements have been specified).Yes, unless vendor-specific deployment elements - have been specified.
    cmpversionEither 1.0 or 2.0.
    - Default is 1.0.
    - A CMP 2.0 implementation exists currently only for JBoss.
    No
    namingControls the naming convention used to name generated - EJB jars. Please refer to the description above.No
    basejarnameThe base name that is used for the generated jar files. - If this attribute is specified, the generic jar file name - will use this value as the prefix (followed by the value - specified in the 'genericjarsuffix' attribute) and the - resultant ejb jar file (followed by any suffix specified - in the nested element).No
    basenameterminatorString value used to substring out a string from the name - of each deployment descriptor found, which is then used to - locate related deployment descriptors (e.g. the WebLogic - descriptors). For example, a basename of '.' and a - deployment descriptor called 'FooBean.ejb-jar.xml' would - result in a basename of 'FooBean' which would then be used - to find FooBean.weblogic-ejb-jar.xml and - FooBean.weblogic-cmp-rdbms-jar.xml, as well as to create - the filenames of the jar files as FooBean-generic.jar and - FooBean-wl.jar. This attribute is not used if the - 'basejarname' attribute is specified.No, defaults to '-'.
    genericjarsuffixString value appended to the basename of the deployment - descriptor to create the filename of the generic EJB jar - file.No, defaults to '-generic.jar'.
    classpathThis classpath is used when resolving classes which - are to be added to the jar. Typically nested deployment - tool elements will also support a classpath which - will be combined with this classpath when resolving - classesNo.
    flatdestdirSet this attribute to true if you want all generated jars - to be placed in the root of the destdir, rather than - according to the location of the deployment descriptor - within the descriptor dir hierarchy.No.
    dependencyThis attribute controls which additional classes and interfaces - are added to the jar. Please refer to the description - aboveNo.
    manifestthe manifest file to use, if any.NodependencyThis attribute controls which additional classes and interfaces are added to the jar. Please + refer to the description aboveNo
    manifestthe manifest file to use, if any.No

    Nested Elements

    -

    In addition to the vendor specific nested elements, the ejbjar task provides -three nested elements.

    +

    In addition to the vendor specific nested elements, the ejbjar task provides three +nested elements.

    Classpath

    -

    The <classpath> nested element allows the classpath -to be set. It is useful when setting the classpath from a reference path. In all -other respects the behaviour is the same as the classpath attribute.

    +

    The <classpath> nested element allows the classpath to be set. It is useful +when setting the classpath from a reference path. In all other respects the behaviour is the same as +the classpath attribute.

    dtd

    -

    The <dtd> element is used to specify the local location of DTDs to be -used when parsing the EJB deployment descriptor. Using a local DTD is much -faster than loading the DTD across the net. If you are running ejbjar behind a -firewall you may not even be able to access the remote DTD. The supported -vendor-specific nested elements know the location of the required DTDs within -the vendor class hierarchy and, in general, this means <dtd> elements are -not required. It does mean, however, that the vendor's class hierarchy must be -available in the classpath when Ant is started. If your want to run Ant without -requiring the vendor classes in the classpath, you would need to use a -<dtd> element.

    +

    The <dtd> element is used to specify the local location of DTDs to be used +when parsing the EJB deployment descriptor. Using a local DTD is much faster than loading the DTD +across the net. If you are running ejbjar behind a firewall you may not even be able to +access the remote DTD. The supported vendor-specific nested elements know the location of the +required DTDs within the vendor class hierarchy and, in general, this means <dtd> +elements are not required. It does mean, however, that the vendor's class hierarchy must be +available in the classpath when Ant is started. If your want to run Ant without requiring the vendor +classes in the classpath, you would need to use a <dtd> element.

    - +
    - - - + + + - - - + + + - - - + + +
    AttributeDescriptionRequiredAttributeDescriptionRequired
    publicIdThe public Id of the DTD for which the location is being providedYespublicIdThe public Id of the DTD for which the location is being providedYes
    locationThe location of the local copy of the DTD. This can either be a - file or a resource loadable from the classpath.YeslocationThe location of the local copy of the DTD. This can either be a file or a resource loadable + from the classpath.Yes

    support

    -

    The <support> nested element is used to supply additional classes -(files) to be included in the generated jars. The <support> element is a -FileSet, so it can either reference a fileset declared elsewhere or it can be -defined in-place with the appropriate <include> and <exclude> nested -elements. The files in the support fileset are added into the generated EJB jar -in the same relative location as their location within the support fileset. Note -that when ejbjar generates more than one jar file, the support files are added -to each one.

    +

    The <support> nested element is used to supply additional classes (files) to +be included in the generated jars. The <support> element is +a FileSet, so it can either reference a fileset declared +elsewhere or it can be defined in-place with the appropriate <include> +and <exclude> nested elements. The files in the support fileset are added into +the generated EJB jar in the same relative location as their location within the support +fileset. Note that when ejbjar generates more than one jar file, the support files are +added to each one.

    Vendor-specific deployment elements

    -Each vendor-specific nested element controls the generation of a deployable jar -specific to that vendor's EJB container. The parameters for each supported -deployment element are detailed here. - +

    Each vendor-specific nested element controls the generation of a deployable jar specific to that +vendor's EJB container. The parameters for each supported deployment element are detailed here.

    Jboss element

    -

    The jboss element searches for the JBoss specific deployment descriptors and adds them -to the final ejb jar file. JBoss has two deployment descriptors:

    -