This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 5e286d274 record new failOnError attribute of replaceregexp
5e286d274 is described below
commit 5e286d2746a33e09da8cb941167c6cc8360d6895
Author: Stefan Bodewig <[email protected]>
AuthorDate: Fri Nov 17 06:11:40 2023 +0100
record new failOnError attribute of replaceregexp
see #206
---
WHATSNEW | 8 ++++++++
manual/Tasks/replaceregexp.html | 9 +++++++++
.../org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java | 1 +
3 files changed, 18 insertions(+)
diff --git a/WHATSNEW b/WHATSNEW
index c598d4485..cde56282d 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -43,6 +43,14 @@ Changes that could break older environments:
updated to launch in a forked JVM so that the System.exit() call
will not impact the JVM in which Ant process runs.
+Other changes:
+--------------
+
+ * <replaceregexp> has a new failOnError attirbute which, when
+ enabled, makes the task throw a BuildException for certain error
+ cases that will only be logged otherwise.
+ Github Pull Request #206
+
Fixed bugs:
-----------
diff --git a/manual/Tasks/replaceregexp.html b/manual/Tasks/replaceregexp.html
index 5077fbcba..2523e6a36 100644
--- a/manual/Tasks/replaceregexp.html
+++ b/manual/Tasks/replaceregexp.html
@@ -95,6 +95,15 @@ documentation of the <a
href="../Types/regexp.html#implementation">Regexp Type</
1.8.0</em>.</td>
<td>No; defaults to <q>false</q></td>
</tr>
+ <tr>
+ <td>failonerror</td>
+ <td>Stop the build process if certain file operations fail.<br/>
+ For historical reasons the task swallows and logs certain
+ failure cases, enabling this option makes sure the exception
+ make the build fail instead.
+ <em>since Ant 1.10.15</em></td>
+ <td>No; defaults to <q>false</q></td>
+ </tr>
</table>
<h3>Examples</h3>
<pre>
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index aca6d1ac6..61bcc6799 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -325,6 +325,7 @@ public class ReplaceRegExp extends Task {
* If false, note errors but continue.
*
* @param failonerror true or false
+ * @since Ant 1.10.15
*/
public void setFailOnError(boolean failonerror) {
this.failonerror = failonerror;