cmcginty
cmcginty

Reputation: 116968

Can Ant ReplaceRegexp task fail if the match is not found?

Ant's Replace task has a nice option called failOnNoReplacements. Is something like this supported by ReplaceRegexp?

Upvotes: 2

Views: 733

Answers (1)

EJK
EJK

Reputation: 12527

It looks like the answer is no, that task does not have such an option. For one thing it is not documented.

Secondly, if you browse the source, http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java, you will see that there is no such attribute in the class. It looks like the only exceptions thrown by the task are when it is invoked with invalid arguments.

Upvotes: 2

Related Questions