ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r720059 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
Date Sun, 23 Nov 2008 22:34:35 GMT
Author: maartenc
Date: Sun Nov 23 14:34:35 2008
New Revision: 720059

URL: http://svn.apache.org/viewvc?rev=720059&view=rev
Log:
Fixed a problem with the regexp used for listing the possible values of a token, this is causing
problems in combination with for instance the ivy:buildnumber task (IVY-970)

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java?rev=720059&r1=720058&r2=720059&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java Sun
Nov 23 14:34:35 2008
@@ -72,10 +72,11 @@
                     } else {
                         namePattern = pattern.substring(slashIndex + 1);
                     }
-                    String acceptNamePattern = ".*"
+                    namePattern = namePattern.replaceAll("\\.", "\\\\.");
+                    String acceptNamePattern = ".*?"
                             + IvyPatternHelper.substituteToken(namePattern, token, "([^"
+ fileSep
-                                    + "]+)") + ".*";
-                    Pattern p = Pattern.compile(acceptNamePattern.toString());
+                                    + "]+)") + "($|" + fileSep + ".*)" ;
+                    Pattern p = Pattern.compile(acceptNamePattern);
                     for (Iterator iter = all.iterator(); iter.hasNext();) {
                         String path = (String) iter.next();
                         Matcher m = p.matcher(path);



Mime
View raw message