From notifications-return-30185-archive-asf-public=cust-asf.ponee.io@ant.apache.org Wed Feb 28 08:01:25 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2682A18067A for ; Wed, 28 Feb 2018 08:01:23 +0100 (CET) Received: (qmail 69052 invoked by uid 500); 28 Feb 2018 07:01:23 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 66943 invoked by uid 99); 28 Feb 2018 07:01:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2018 07:01:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 897A9F4E41; Wed, 28 Feb 2018 07:01:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: gintas@apache.org To: notifications@ant.apache.org Date: Wed, 28 Feb 2018 07:01:42 -0000 Message-Id: <3dafb397681045f897d9ab136fcc8707@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [27/47] ant git commit: Use HTML 5(-ish), fix links http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/renameextensions.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/renameextensions.html b/manual/Tasks/renameextensions.html index 664edfd..d8f2381 100644 --- a/manual/Tasks/renameextensions.html +++ b/manual/Tasks/renameextensions.html @@ -25,94 +25,81 @@

RenameExtensions

-

Deprecated

-

This task has been deprecated. Use the move -task with a glob mapper instead.

+

Deprecated

+

This task has been deprecated. Use the move task +with a glob mapper instead.

Description

-

Renames files in the srcDir directory ending with the -fromExtension string so that they end with the -toExtension string. Files are only replaced if -replace is true -

-

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 srcDir) as well as the nested -<include>, <exclude> and -<patternset> elements.

+

Renames files in the srcDir directory ending with the fromExtension string +so that they end with the toExtension string. Files are only replaced +if replace is true.

+

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 srcDir) as well as the +nested <include>, <exclude> +and <patternset> elements.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
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
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
fromExtensionThe string that files must end in to be renamedYesfromExtensionThe string that files must end in to be renamedYes
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
replaceWhether the file being renamed to should be - replaced if it already existsNoreplaceWhether the file being renamed to should be replaced if it already existsNo
srcDirThe starting directory for files to search inYessrcDirThe starting directory for files to search inYes
toExtensionThe string that renamed files will end with on - completionYestoExtensionThe string that renamed files will end with on completionYes

Examples

-
<renameext srcDir="/source/project1"
-              includes="**"
-              excludes="**/samples/*"
-              fromExtension=".java.keep"
-              toExtension=".java"
-              replace="true"/>
-  
+
+<renameext srcDir="/source/project1"
+           includes="**"
+           excludes="**/samples/*"
+           fromExtension=".java.keep"
+           toExtension=".java"
+           replace="true"/>
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/replace.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/replace.html b/manual/Tasks/replace.html index c2981cd..3e2d011 100644 --- a/manual/Tasks/replace.html +++ b/manual/Tasks/replace.html @@ -26,141 +26,128 @@

Replace

Description

-

Replace is a directory based task for replacing the occurrence of a given string with another string -in selected file.

-

If you want to replace a text that crosses line boundaries, you -must use a nested <replacetoken> element.

+

Replace is a directory based task for replacing the occurrence of a given string +with another string in selected file.

+

If you want to replace a text that crosses line boundaries, you must use a +nested <replacetoken> element.

-

The output file is only written if it differs from the existing -file. This prevents spurious rebuilds based on unchanged files which -have been regenerated by this task.

+

The output file is only written if it differs from the existing file. This prevents spurious +rebuilds based on unchanged files which have been regenerated by this task.

Parameters

- +
- - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
filefile for which the token should be replaced.Exactly one of the twofilefile for which the token should be replaced.Exactly one of the two
dirThe base directory to use when replacing a token in - multiple files.dirThe base directory to use when replacing a token in multiple files.
encodingThe encoding of the files upon which replace operates.No - defaults to default JVM encodingencodingThe encoding of the files upon which replace operates.No; defaults to default JVM character encoding
tokenthe token which must be replaced.Yes, unless a nested - replacetoken element or the replacefilterfile - attribute is used.tokenthe token which must be replaced.Yes, unless a nested replacetoken element or the replacefilterfile + attribute is used.
valuethe new value for the token. When omitted, an empty string - ("") is used.Novaluethe new value for the token.No; defaults to empty string ()
summaryIndicates whether a summary of the replace operation - should be produced, detailing how many token occurrences - and files were processed - No, by default no summary is producedsummaryIndicates whether a summary of the replace operation should be produced, detailing how many + token occurrences and files were processedNo; defaults to no summary
propertyFilevalid property file from which properties specified using nested <replacefilter> elements are drawn.Yes only if property attribute of <replacefilter> is used.propertyFilevalid property file from which properties specified using + nested <replacefilter> elements are drawn.Yes, only if property attribute of <replacefilter> is + used.
replacefilterfilevalid property file. Each property will be - treated as a replacefilter where token is the name of - the property and value is the properties value. - No.replacefilterfilevalid property file. Each property will be treated as a replacefilter + where token is the name of the property and value is the property's + value.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
preserveLastModifiedKeep the file timestamp(s) even if the file(s) - is(are) modified. since Apache Ant 1.8.0.No, defaults to falsepreserveLastModifiedKeep the file timestamp(s) even if the file(s) is(are) modified. since Apache Ant + 1.8.0.No; defaults to false
failOnNoReplacementsWhether to fail the build if the task didn't do - anything. since Ant 1.8.0.No, defaults to falsefailOnNoReplacementsWhether to fail the build if the task didn't do anything. since Ant 1.8.0.No; defaults to false

Examples

-
  <replace file="${src}/index.html" token="@@@" value="wombat"/>
-

replaces occurrences of the string "@@@" with the string -"wombat", in the file ${src}/index.html.

+
<replace file="${src}/index.html" token="@@@" value="wombat"/>
+

replaces occurrences of the string @@@ with the string wombat, in the +file ${src}/index.html.

Parameters specified as nested elements

-

This task forms an implicit FileSet and -supports most attributes of <fileset> as well as the -nested <include>, <exclude> and -<patternset> elements.

-

Since Ant 1.8.0 this task supports any filesystem - based resource - collections as nested elements.

+

This task forms an implicit FileSet and supports most +attributes of <fileset> as well as the +nested <include>, <exclude> +and <patternset> elements.

+

Since Ant 1.8.0, this task supports any filesystem +based resource collections as nested elements.

replacetoken and replacevalue

-

If either the text you want to replace or the replacement text -cross line boundaries, you can use nested elements to specify -them.

+

If either the text you want to replace or the replacement text cross line boundaries, you can use +nested elements to specify them.

The elements support attributes:

- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
expandPropertiesWhether to expand properties in the nested text. - Since Ant 1.8.0.No, defaults to true.expandPropertiesWhether to expand properties in the nested text. Since Ant 1.8.0.No; defaults to true

Examples

@@ -169,71 +156,73 @@ them.

<include name="**/*.html"/> <replacetoken><![CDATA[multi line token]]></replacetoken> -</replace> - -

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

+</replace> +

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

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

replacefilter

-

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

- +

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

+
- - - + + + - - - + + - - - + + + - - + +
AttributeDescriptionRequiredAttributeDescriptionRequired
tokenThe string to search for.Yes unless a nested replacetoken + tokenThe string to search for.Yes, unless a nested replacetoken is specified
valueThe replacement string.Either may be specified, but not both. Both can be omitted, if desired.valueThe replacement string.Either may be specified, but not both. Both can be omitted, if desired.
propertyName of the property whose value is to serve as the replacement value.propertyName of the property whose value is to serve as the replacement value.
-

Since Ant 1.8.0 token and value can be specified as nested elements - just like in the task itself.

-

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

+

Since Ant 1.8.0, token and value can be specified as nested +elements just like in the task itself.

+

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

Examples

-<replace
-    file="configure.sh"
-    value="defaultvalue"
-    propertyFile="src/name.properties">
-  <replacefilter
-    token="@token1@"/>
-  <replacefilter
-    token="@token2@"
-    value="value2"/>
-  <replacefilter
-    token="@token3@"
-    property="property.key"/>
+<replace file="configure.sh"
+         value="defaultvalue"
+         propertyFile="src/name.properties">
+  <replacefilter token="@token1@"/>
+  <replacefilter token="@token2@"
+                 value="value2"/>
+  <replacefilter token="@token3@"
+                 property="property.key"/>
   <replacefilter>
     <replacetoken>@token4@</replacetoken>
     <replacevalue>value4</replacevalue>
   </replacefilter>
-</replace>
-
-

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

-

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

+</replace> +

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

+

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

http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/replaceregexp.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/replaceregexp.html b/manual/Tasks/replaceregexp.html index 68f2c72..923373c 100644 --- a/manual/Tasks/replaceregexp.html +++ b/manual/Tasks/replaceregexp.html @@ -25,73 +25,71 @@

ReplaceRegExp

Description

-

ReplaceRegExp is a directory based task for replacing the -occurrence of a given regular expression with a substitution pattern -in a selected file or set of files.

+

ReplaceRegExp is a directory based task for replacing the occurrence of a given +regular expression with a substitution pattern in a selected file or set of files.

-

The output file is only written if it differs from the existing -file. This prevents spurious rebuilds based on unchanged files which -have been regenerated by this task.

+

The output file is only written if it differs from the existing file. This prevents spurious +rebuilds based on unchanged files which have been regenerated by this task.

-

Similar to regexp -type mappers this task needs a supporting regular expression -library and an implementation of -org.apache.tools.ant.util.regexp.Regexp. -See details in the documentation of the Regexp Type.

+

Similar to regexp type mappers this task needs a +supporting regular expression library and an implementation +of org.apache.tools.ant.util.regexp.Regexp. See details in the documentation of +the Regexp Type.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - + - + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
filefile for which the regular expression should be replaced.Yes if no nested <fileset> is usedfilefile for which the regular expression should be replaced.Yes, unless nested <fileset> is used
matchThe regular expression pattern to match in the file(s)Yes, if no nested <regexp> is usedmatchThe regular expression pattern to match in the file(s)Yes, unless nested <regexp> is used
replaceThe substitution pattern to place in the file(s) in place - of the regular expression.Yes, if no nested <substitution> is usedreplaceThe substitution pattern to place in the file(s) in place of the regular expression.Yes, unless nested <substitution> is used
flagsThe flags to use when matching the regular expression. For more - information, consult the Perl5 syntax
- g : Global replacement. Replace all occurrences found
- i : Case Insensitive. Do not consider case in the match
- m : Multiline. Treat the string as multiple lines of input, using "^" and "$" as the start or end of any line, respectively, rather than start or end of string.
- s : Singleline. Treat the string as a single line of input, using "." to match any character, including a newline, which normally, it would not match.
+
flagsThe flags to use when matching the regular expression. For more information, consult the + Perl 5 syntax
+ g : Global replacement. Replace all occurrences found
+ i : Case Insensitive. Do not consider case in the match
+ m : Multiline. Treat the string as multiple lines of input, using ^ + and $ as the start or end of any line, respectively, rather than start or end of + string.
+ s : Singleline. Treat the string as a single line of input, using . to match + any character, including a newline, which normally, it would not match.
NoNo
bylineProcess the file(s) one line at a time, executing the replacement - on one line at a time (true/false). This is useful if you - want to only replace the first occurrence of a regular expression on - each line, which is not easy to do when processing the file as a whole. - Defaults to false.NobylineProcess the file(s) one line at a time, executing the replacement on one line at a time + (true|false). This is useful if you want to only replace the first occurrence of a + regular expression on each line, which is not easy to do when processing the file as a + whole.No; defaults to false
encodingThe encoding of the file. since Apache Ant 1.6No - defaults to default JVM encodingencodingThe encoding of the file. since Apache Ant 1.6No; defaults to default JVM character encoding
preserveLastModifiedKeep the file timestamp(s) even if the file(s) - is(are) modified. since Ant 1.8.0.No, defaults to falsepreserveLastModifiedKeep the file timestamp(s) even if the file(s) is(are) modified. since Ant + 1.8.0.No; defaults to false

Examples

@@ -99,93 +97,81 @@ See details in the documentation of the FileSet - element.

+

This task supports a nested FileSet element.

Since Ant 1.8.0, this task supports any filesystem - based resource - collections as nested elements.

-

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

+based resource collections as nested elements.

+

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

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

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

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

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

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

Examples

 <replaceregexp byline="true">
-  <regexp pattern="OldProperty=(.*)"/>
-  <substitution expression="NewProperty=\1"/>
-  <fileset dir=".">
-    <include name="*.properties"/>
-  </fileset>
-</replaceregexp>
-
-

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

- -
<replaceregexp match="\s+" replace=" " flags="g" byline="true">
+    <regexp pattern="OldProperty=(.*)"/>
+    <substitution expression="NewProperty=\1"/>
+    <fileset dir=".">
+        <include name="*.properties"/>
+    </fileset>
+</replaceregexp>
+

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

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

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

+</replaceregexp> +

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

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

would converted to

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

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

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

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

+
one\ntwo\nthree

would converted to

 one
 two
-three
-
+three

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

 <root>
-  <text>line breaks \n should work in text</text>
-  <attribute value="but breaks \n attributes" />
-</root>
-
+ <text>line breaks \n should work in text</text> + <attribute value="but breaks \n attributes"/> +</root> http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/resourcecount.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/resourcecount.html b/manual/Tasks/resourcecount.html index 39d9627..6e0649e 100644 --- a/manual/Tasks/resourcecount.html +++ b/manual/Tasks/resourcecount.html @@ -27,58 +27,59 @@

ResourceCount

Description

-

Display or set a property containing the size of a nested - Resource Collection. - Can also be used as a condition. Since Apache Ant 1.7

+

Display or set a property containing the size of a +nested Resource Collection. Can also be used as a +condition. Since Apache Ant 1.7

Parameters

- +
- - - + + + - - - + + - - - + + + + - - - + + + - - - + + + + + + + + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
propertyThe property to set. If omitted the results are written - to the log. Ignored when processing as a condition.NoTaskCondition
refidA reference - to a Resource Collection. - Yes, unless a nested Resource Collection is supplied - propertyThe property to set.No; by default, output value to the logIgnored
countComparison count for processing as a condition.Yes, in condition moderefidA reference to a Resource Collection.Yes, unless a nested Resource Collection is supplied
whenComparison type: "equal", "eq", "greater", "gt", "less", - "lt", "ge" (greater or equal), "ne" (not equal), "le" (less or equal) - for use when operating as a condition.No; default is "equal"countComparison count.IgnoredYes
whenComparison + type: equal, eq, greater, gt, less, lt, ge + (greater or equal), ne (not equal), le (less or equal).IgnoredNo; default is equal

Parameters specified as nested elements

Resource Collection

-

A single - Resource Collection -should be specified via a nested element or the refid attribute. -

+

A single Resource Collection should be specified +via a nested element or the refid attribute.

Examples

-
<resourcecount property="count.foo">
-  <filelist dir="." files="foo,bar" />
-</resourcecount>
-
-

Stores the number of resources in the specified filelist (two) -in the property named count.foo.

+
+<resourcecount property="count.foo">
+  <filelist dir="." files="foo,bar"/>
+</resourcecount>
+

Stores the number of resources in the specified filelist (two) in the property +named count.foo.

 <project>
@@ -96,10 +97,9 @@ in the property named count.foo.

</tokens> </resourcecount> <echo>The file '${file}' has ${file.lines} lines.</echo> -</project> -
-

Stores the number of lines of the current buildfile in the property file.lines. -Requires Ant 1.7.1+ as <concat> has to be resource.

+</project> +

Stores the number of lines of the current buildfile in the property file.lines. +Requires Ant 1.7.1+ as <concat> has to be a resource.

http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/retry.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/retry.html b/manual/Tasks/retry.html index 360019f..f847928 100644 --- a/manual/Tasks/retry.html +++ b/manual/Tasks/retry.html @@ -24,27 +24,27 @@

Retry

Description

-

Retry is a container which executes a single nested task until either: there is no failure; or: -its retrycount has been exceeded. If this happens a BuildException is thrown. -Since Apache Ant 1.7.1

+

Retry is a container which executes a single nested task until either: there is no +failure; or: its retrycount has been exceeded. If this happens a BuildException is +thrown. Since Apache Ant 1.7.1

Parameters

- +
- - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
retrycountnumber of times to attempt to execute the nested taskYesretrycountnumber of times to attempt to execute the nested taskYes
retrydelaynumber of milliseconds to wait between retry attempts - task. Since Apache Ant 1.8.3No, defaults to no delayretrydelaynumber of milliseconds to wait between retry attempts task. Since Apache Ant + 1.8.3No; defaults to no delay

Any valid Ant task may be embedded within the retry task.

@@ -53,9 +53,9 @@ its retrycount has been exceeded. If this happens a BuildException is t
 <retry retrycount="3">
   <get src="http://www.unreliable-server.com/unreliable.tar.gz"
-       dest="/home/retry/unreliable.tar.gz" />
-</retry>
-
-

This example shows how to use <retry> to wrap a task which must interact with an unreliable network resource.

+ dest="/home/retry/unreliable.tar.gz"/> +</retry> +

This example shows how to use <retry> to wrap a task which must interact with +an unreliable network resource.

http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/rexec.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/rexec.html b/manual/Tasks/rexec.html index c3940fc..609d0c2 100644 --- a/manual/Tasks/rexec.html +++ b/manual/Tasks/rexec.html @@ -26,20 +26,21 @@

RExec

Description

-Task to automate a remote rexec session. Just like the Telnet task, -it uses nested <read> to indicate strings to wait for, and -<write> tags to specify text to send to the remote process. +

Task to automate a remote rexec session. Just like the Telnet task, it uses +nested <read> to indicate strings to wait for, and +<write> tags to specify text to send to the remote +process.

-

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

+

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

-

You can specify the commands you want to execute as nested elements -or via the command attribute, we recommend you use the command -attribute. If you use the command attribute, you must use the -username and password attributes as well.

+

You can specify the commands you want to execute as nested elements or via the command +attribute, we recommend you use the command attribute. If you use the command +attribute, you must use the username and password attributes as well.

Parameters

- +
@@ -67,47 +68,40 @@ username and password attributes as well.

- - + + - - + +
Attribute Values
portthe port number of the remote rexec server. Defaults to port 512 in BSD Unix systems.Nothe port number of the remote rexec server.No; defaults to 512 in Unix
timeoutset a default timeout to wait for a response. Specified in seconds. Default is no timeout.Noset a default timeout to wait for a response, specified in seconds.No; default is no timeout

Nested Elements

-The input to send to the server, and responses to wait for, are -described as nested elements. +

The input to send to the server, and responses to wait for, are described as nested elements.

read

-

declare (as a text child of this element) a string to wait for. -The element supports the timeout attribute, which overrides any -timeout specified for the task as a whole. It also has a string -attribute, which is an alternative to specifying the string as -a text element. -

-It is not necessary to declare a closing <read> element like for the Telnet task. The connection is not broken until the command has completed and -the input stream (output of the command) is terminated. - +

declare (as a text child of this element) a string to wait for. The element supports +the timeout attribute, which overrides any timeout specified for the task as a whole. It +also has a string attribute, which is an alternative to specifying the string as a text +element.

+

It is not necessary to declare a closing <read> element like for +the Telnet task. The connection is not broken until the command has completed and the +input stream (output of the command) is terminated.

+

write

-

describes the text to send to the server. The echo boolean -attribute controls whether the string is echoed to the local log; -this is "true" by default -

+

describes the text to send to the server. The echo boolean attribute controls whether +the string is echoed to the local log; this is true by default.

Example

-A simple example of connecting to a server and running a command. +

A simple example of connecting to a server and running a command.

+ +
<rexec userid="bob" password="badpass" server="localhost" command="ls"/>
-
-<rexec userid="bob" password="badpass" server="localhost" command="ls"/>
-
+

The task can be used with other ports as well:

-The task can be used with other ports as well: -
-<rexec port="80" userid="bob" password="badpass" server="localhost" command="ls"/>
-
+
<rexec port="80" userid="bob" password="badpass" server="localhost" command="ls"/>
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/rmic.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/rmic.html b/manual/Tasks/rmic.html index 8ac52d5..9ba41b5 100644 --- a/manual/Tasks/rmic.html +++ b/manual/Tasks/rmic.html @@ -26,315 +26,282 @@

Rmic

Description

-

Runs the rmic compiler for a certain class.

-

Rmic can be run on a single class (as specified with the classname -attribute) or a number of classes at once (all classes below base that -are neither _Stub nor _Skel classes). If you want to rmic a single -class and this class is a class nested into another class, you have to -specify the classname in the form Outer$$Inner instead of -Outer.Inner.

-

It is possible to refine the set of files that are being rmiced. 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 +

Runs the rmic compiler for a certain class.

+

Rmic can be run on a single class (as specified with the classname attribute) or a +number of classes at once (all classes below base that are neither _Stub +nor _Skel classes). If you want to rmic a single class and this class is +a class nested into another class, you have to specify the classname in the +form Outer$$Inner instead of Outer.Inner.

+

It is possible to refine the set of files that are being rmiced. 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 base) as well as the nested -<include>, <exclude> and -<patternset> elements.

-

It is possible to use different compilers. This can be selected -with the "build.rmic" property, the compiler -attribute, or a nested element. Here are the choices:

+

This task forms an implicit FileSet and supports most +attributes of <fileset> (dir becomes base) as well as the +nested <include>, <exclude> +and <patternset> elements.

+

It is possible to use different compilers. This can be selected with +the build.rmic property, the compiler attribute, or a nested element. Here +are the choices:

    -
  • default -the default compiler (kaffe, sun or forking) for the platform. -
  • sun - the standard compiler of the JDK < 9
  • -
  • kaffe - the standard compiler of Kaffe
  • -
  • weblogic
  • -
  • forking - (since Apache Ant 1.7) the sun compiler forked into a separate process. - Since Ant 1.9.8, this is the default when running on JDK 9+.
  • -
  • xnew - (since Ant 1.7) the sun compiler forked into a separate process, - with the -Xnew option. This is the most reliable way to use -Xnew.
    - JDK 9 has removed support for -Xnew and since Ant 1.9.8 - this option will be rejected when running on JDK 9.
  • -
  • "" (empty string). This has the same behaviour as not setting the compiler attribute. - First the value of build.rmic is used if defined, and if not, the default - for the platform is chosen. If build.rmic is set to this, you get the default.
  • +
  • default—the default compiler (kaffe, sun or forking) for the + platform. +
  • sun—the standard compiler of the JDK < 9
  • +
  • kaffe—the standard compiler of Kaffe
  • +
  • weblogic
  • +
  • forking—(since Apache Ant 1.7) the sun compiler forked into a + separate process. Since Ant 1.9.8, this is the default when running on JDK 9+.
  • +
  • xnew—(since Ant 1.7) the sun compiler forked into a separate + process, with the -Xnew option. This is the most reliable way to + use -Xnew.
    JDK 9 has removed support for -Xnew and since Ant + 1.9.8 this option will be rejected when running on JDK 9.
  • +
  • (empty string). This has the same behaviour as not setting the compiler attribute. + First the value of build.rmic is used if defined, and if not, the default for the + platform is chosen. If build.rmic is set to this, you get the default.
-

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

+

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

Parameters

- +
- - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
basethe location to store the compiled files. - Also serves as the parent directory for any non-Fileset includes, etc. - (This functionality has remained unchanged.)*1
basethe location to store the compiled files. Also serves as the parent directory for any + non-Fileset includes, etc. (This functionality has remained unchanged.)See note
destdirthe location to store the compiled files.destdirthe location to store the compiled files.
classnamethe class for which to run rmic.Noclassnamethe class for which to run rmic.No
filteringindicates whether token filtering should take placeNofilteringindicates whether token filtering should take placeNo
sourcebasePass the "-keepgenerated" flag to rmic and - move the generated source file to the given sourcebase directory.NosourcebasePass the -keepgenerated flag to rmic and move the generated source + file to the given sourcebase directory.No
stubversionSpecify the JDK version for the generated stub code. - Specify "1.1" to pass the "-v1.1" option to rmic, - "1.2" for -v12, compat for -vcompat.
- Since Ant 1.7, if you do not specify a version, and do not ask - for iiop or idl files, "compat" is selected. - -
No, default="compat"stubversionSpecify the JDK version for the generated stub code. Specify 1.1 to pass + the -v1.1 option to rmic, 1.2 + for -v12, compat for -vcompat.
/Since Ant 1.7, if + you do not specify a version, and do not ask for .iiop or .idl + files, compat is selected.
No; default is compat
classpathThe classpath to use during compilationNoclasspathThe classpath to use during compilationNo
classpathrefThe classpath to use during compilation, given as reference to a PATH defined elsewhereNoclasspathrefThe classpath to use during compilation, given + as reference to a path defined elsewhereNo
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
verifycheck that classes implement Remote before handing them - to rmic (default is false)Noverifycheck that classes implement Remote before handing them to rmicNo; default is false
iiopindicates that portable (RMI/IIOP) stubs should be generatedNoiiopindicates that portable (RMI/IIOP) stubs should be generatedNo
iiopoptsadditional arguments for IIOP class generationNoiiopoptsadditional arguments for IIOP class generationNo
idlindicates that IDL output files should be generatedNoidlindicates that IDL output files should be generatedNo
idloptsadditional arguments for IDL file generationNoidloptsadditional arguments for IDL file generationNo
debuggenerate debug info (passes -g to rmic). Defaults to false.Nodebuggenerate debug info (passes -g to rmic)No; defaults to false
includeAntRuntimewhether to include the Ant run-time libraries; - defaults to yes.NoincludeAntRuntimewhether to include the Ant run-time librariesNo; defaults to yes
includeJavaRuntimewhether to include the default run-time - libraries from the executing VM; defaults to no.NoincludeJavaRuntimewhether to include the default run-time libraries from the executing JVMNo; defaults to no
extdirslocation of installed extensions.Noextdirslocation of installed extensionsNo
compilerThe compiler implementation to use. - If this attribute is not set, the value of the - build.rmic property, if set, will be used. - Otherwise, the default compiler for the current VM will be used. - (See the above list of valid - compilers.)NocompilerThe compiler implementation to use. (See the above list of + valid compilers.)No; defaults to the value of the build.rmic property, if set, and the default + compiler for the current JDK otherwise
executableComplete path to the rmic - executable to use in case of the forking - or xnew compiler. - Defaults to the rmic compiler of the Java version that is currently - running Ant.
- Since Ant 1.8.0.
NoexecutableComplete path to the rmic executable to use in case of the forking + or xnew compiler. Since Ant 1.8.0.No; defaults to the rmic compiler of JDK that is currently running Ant
listfilesIndicates whether the source files to be compiled will - be listed; defaults to no.
- Since Ant 1.8.0.
NolistfilesIndicates whether the source files to be compiled will be listed. Since Ant + 1.8.0.No; defaults to no
-

*1:

+

Note:

    -
  • Maintaining compatibility, base, when specified by - itself, serves as both the parent directory for any source files - AND the output directory.
  • -
  • destdir can be used to specify the output - directory, allowing for base to be used as the parent - directory for any source files.
  • -
  • At least one of either base or destdir - must be specified and exist, or a runtime error will - occur.
  • +
  • Maintaining compatibility, base, when specified by itself, serves as both the + parent directory for any source files AND the output directory.
  • +
  • destdir can be used to specify the output directory, allowing for base + to be used as the parent directory for any source files.
  • +
  • At least one of either base or destdir must be specified and exist, or a + runtime error will occur.

Parameters specified as nested elements

classpath and extdirs

-

Rmic's classpath and extdirs attributes are PATH like structure and can also be set via a nested -classpath and extdirs elements.

+

Rmic's classpath and extdirs attributes +are path-like structure and can also be set via a nested +classpath and extdirs elements.

compilerarg

-

You can specify additional command line arguments for the compiler -with nested <compilerarg> elements. These elements -are specified like Command-line -Arguments but have an additional attribute that can be used to -enable arguments only if a given compiler implementation will be -used.

- +

You can specify additional command line arguments for the compiler with +nested <compilerarg> elements. These elements are specified +like Command-line Arguments but have an additional attribute that +can be used to enable arguments only if a given compiler implementation will be used.

+
- - - + + + - - - + + + - + - + - + - - + - + - - + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
valueSee - Command-line Arguments.Exactly one of thesevalueSee Command-line Arguments.Exactly one of these
lineline
filefile
pathpath
prefixSee + prefixSee Command-line Arguments. Since Ant 1.8.NoNo
suffixNosuffixNo
compilerOnly pass the specified argument if the chosen - compiler implementation matches the value of this attribute. - Legal values are the - same as those in the above list of valid - compilers.)NocompilerOnly pass the specified argument if the chosen compiler implementation matches the value of + this attribute. Legal values are the same as those in the + above list of valid compilers.)No

compilerclasspath (since Ant 1.8.0)

-

A PATH like structure holding the - classpath to use when loading the compiler implementation if a - custom class has been specified. Doesn't have any effect when - using one of the built-in compilers.

+

A path-like structure holding the classpath to use when loading +the compiler implementation if a custom class has been specified. Doesn't have any effect when +using one of the built-in compilers.

-

Any nested element of a type that implements RmicAdapter - (since Ant 1.8.0)

+

Any nested element of a type that implements RmicAdapter (since Ant 1.8.0)

-

If a defined type implements the RmicAdapter - interface a nested element of that type can be used as an - alternative to the compiler attribute.

+

If a defined type implements the RmicAdapter interface a nested element of that type +can be used as an alternative to the compiler attribute.

Examples

-
  <rmic classname="com.xyz.FooBar" base="${build}/classes"/>
-

runs the rmic compiler for the class com.xyz.FooBar. The -compiled files will be stored in the directory ${build}/classes.

-
  <rmic base="${build}/classes" includes="**/Remote*.class"/>
-

runs the rmic compiler for all classes with .class -files below ${build}/classes whose classname starts with -Remote. The compiled files will be stored in the directory -${build}/classes.

+
<rmic classname="com.xyz.FooBar" base="${build}/classes"/>
+

runs the rmic compiler for the class com.xyz.FooBar. The compiled files +will be stored in the directory ${build}/classes.

+
<rmic base="${build}/classes" includes="**/Remote*.class"/>
+

runs the rmic compiler for all classes with .class files +below ${build}/classes whose classname starts with Remote. The compiled +files will be stored in the directory ${build}/classes.

-

If you want to use a custom - RmicAdapter org.example.MyAdapter you can either - use the compiler attribute:

+

If you want to use a custom RmicAdapter org.example.MyAdapter you can either use +the compiler attribute:

 <rmic classname="com.xyz.FooBar"
       base="${build}/classes"
-      compiler="org.example.MyAdapter"/>
-
+ compiler="org.example.MyAdapter"/>

or a define a type and nest this into the task like in:

 <componentdef classname="org.example.MyAdapter"
@@ -342,10 +309,8 @@ files below ${build}/classes whose classname starts with
 <rmic classname="com.xyz.FooBar"
       base="${build}/classes">
   <myadapter/>
-</rmic>
-
-

in which case your compiler adapter can support attributes and - nested elements of its own.

+</rmic> +

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

http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/rpm.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/rpm.html b/manual/Tasks/rpm.html index c430f62..158f121 100644 --- a/manual/Tasks/rpm.html +++ b/manual/Tasks/rpm.html @@ -26,97 +26,84 @@

Rpm

Description

-

- A basic task for invoking the rpm executable to build a RedHat Package Manager Linux installation - file. The task currently only works on Linux or other Unix platforms with rpm support. -

+

A basic task for invoking the rpm executable to build a RedHat Package Manager +Linux installation file. The task currently only works on Linux or other Unix platforms +with rpm support.

Parameters

- +
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
specFileThe name of the spec file to be used. This must be relative to the SPECS directory - under the root of the RPM set in the topDir attribute.YesspecFileThe name of the spec file to be used. This must be relative to the SPECS + directory under the root of the RPM set in the topDir attribute.Yes
topDir - This is the directory which will have the expected - subdirectories, SPECS, SOURCES, BUILD, SRPMS. If this isn't specified, - the default RPM directory of the system (or user, if ~/.rpmmacros defines it) is used (often - /usr/src/rpm.
- Defining a topdir will set %_topdir to the specified directory -there is no need - to edit your .rpmmacros file. -
No, but your build file is very brittle if it is not set.topDirThis is the directory which will have the expected + subdirectories, SPECS, SOURCES, BUILD, SRPMS. + If this isn't specified, the default RPM directory of the system (or user, + if ~/.rpmmacros defines it) is used (often /usr/src/rpm.
+ Defining a topdir will set %_topdir to the specified + directory—there is no need to edit your .rpmmacros file.
No, but your build file is very brittle if it is not set.
cleanBuildDirThis will remove the generated files in the BUILD - directory. - See the the --clean option of rpmbuild. - NocleanBuildDirThis will remove the generated files in the BUILD directory. See the + the --clean option of rpmbuild.No
removeSpecThis will remove the spec file from SPECS. - See the the --rmspec option of rpmbuild. - NoremoveSpecThis will remove the spec file from SPECS. See the the --rmspec + option of rpmbuild.No
removeSourceFlag (optional, default=false) - to remove the sources after the build. - See the the --rmsource option of rpmbuild.NoremoveSourceFlag to remove the sources after the build. See the --rmsource option + of rpmbuild.No; default is false
rpmBuildCommandThe executable to use for building the RPM. - Defaults to rpmbuild if it can be found or - rpm otherwise. Set this if you don't have either on - your PATH or want to use a different executable. Since Apache Ant - 1.6.NorpmBuildCommandThe executable to use for building the RPM. Set this if default executables are not on + PATH or a different executable is needed. Since Apache Ant 1.6.No; defaults to rpmbuild if it can be found or rpm otherwise
commandThe command to pass to the rpmbuild program. The default is "-bb"NocommandThe command to pass to the rpmbuild program.No; default is -bb
quietSuppress output. Defaults to false.NoquietSuppress output.No; defaults to false
output/errorWhere standard output and error goNooutput/errorWhere standard output and error go.No
failOnErrorStop the buildprocess if the RPM build command exits with - a non-zero returncode. Defaults to falseNofailOnErrorStop the build process if the RPM build command exits with a non-zero return code.No; defaults to false

Examples

-    <rpm
-        specFile="example.spec"
-        topDir="build/rpm"
-        cleanBuildDir="true"
-        failOnError="true"/>
-
+<rpm specFile="example.spec" + topDir="build/rpm" + cleanBuildDir="true" + failOnError="true"/>