You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/11/28 17:12:36 UTC
DO NOT REPLY [Bug 46309] New: Ant patterns are ridiculously poor
https://issues.apache.org/bugzilla/show_bug.cgi?id=46309
Summary: Ant patterns are ridiculously poor
Product: Ant
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: michel.rvb@gmail.com
The only way to express a path in any "include" tag is to use the so-called
pattern expressions. While regexp() had been providing a complete and
consistant pattern grammar for decades, the Ant pattern system uses a
completely broken grammar :
- only "*", "**" and "?" are allowed in the pattern grammar for variable
elements.
No way to express a character range or word list for example such as [a-z], or
{blah,foo}. No way to express a repetition number, etc. No way to express that
a particular character is to be repeated zero or N times (* or ? means ANY
character).
The documentation proudly affirms that "you have a powerful way to select just
the files you want.". This is ridiculous, in my opinion correct only at *ant*'s
sight, 1 mm up the ground level.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 46309] Ant patterns are ridiculously poor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46309
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
Target Milestone|--- |1.8.0
--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2008-11-28 08:28:57 PST ---
in a bad mood today, aren't we? I hope you feel better now.
Ant's patterns are sufficient for a wide range of use cases and you pretty
rarely need the full power of regular expressions. If you need the power,
writing a custom selector isn't too hard. In fact Ant's trunk has enhanced the
<filename> and <name> selectors to either use an Ant pattern or a regular
expression.
*** This bug has been marked as a duplicate of bug 45284 ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.