Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.1
-
None
-
mvn --version
Apache Maven 3.0.4-RC3 (r1210461; 2011-12-05 14:58:54+0100)
Maven home: /usr/local/Cellar/maven/current/libexec
Java version: 1.6.0_29, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home
Default locale: de_DE, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"mvn --version Apache Maven 3.0.4-RC3 (r1210461; 2011-12-05 14:58:54+0100) Maven home: /usr/local/Cellar/maven/current/libexec Java version: 1.6.0_29, vendor: Apple Inc. Java home: /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home Default locale: de_DE, platform encoding: MacRoman OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"
-
Patch
Description
Using the example from http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html states to use <regex>(\d|-SNAPSHOT)$</regex> for checking that property.version ends in a digit or -SNAPSHOT. However the code in http://svn.apache.org/repos/asf/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProperty.java revision 805190 uses java.lang.String.matches in line 73. So 1.1-SNAPSHOT or 1.1 will not match. I attach a patch for the documentation which uses <regex>.*(\d|-SNAPSHOT)$</regex> which will succeed.