You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mirko Friedenhagen (JIRA)" <ji...@codehaus.org> on 2011/12/11 21:16:02 UTC
[jira] (MENFORCER-125) requireProperty documentation's example for
property.version uses wrong regex
Mirko Friedenhagen created MENFORCER-125:
--------------------------------------------
Summary: requireProperty documentation's example for property.version uses wrong regex
Key: MENFORCER-125
URL: https://jira.codehaus.org/browse/MENFORCER-125
Project: Maven 2.x Enforcer Plugin
Issue Type: Bug
Components: Standard Rules
Affects Versions: 1.0.1
Environment: 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"
Reporter: Mirko Friedenhagen
Attachments: fix-documentation-for-requireProperty.patch
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MENFORCER-125) requireProperty documentation's example for
property.version uses wrong regex
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MENFORCER-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier closed MENFORCER-125.
-------------------------------
Resolution: Fixed
Patch applied in [r1242803|http://svn.apache.org/viewvc?view=revision&revision=1242803], thanks!
> requireProperty documentation's example for property.version uses wrong regex
> -----------------------------------------------------------------------------
>
> Key: MENFORCER-125
> URL: https://jira.codehaus.org/browse/MENFORCER-125
> Project: Maven 2.x Enforcer Plugin
> Issue Type: Bug
> Components: Standard Rules
> Affects Versions: 1.0.1
> Environment: 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"
> Reporter: Mirko Friedenhagen
> Assignee: Paul Gier
> Fix For: 1.1
>
> Attachments: fix-documentation-for-requireProperty.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MENFORCER-125) requireProperty documentation's example for
property.version uses wrong regex
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MENFORCER-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier updated MENFORCER-125:
--------------------------------
Fix Version/s: 1.1
Assignee: Paul Gier
> requireProperty documentation's example for property.version uses wrong regex
> -----------------------------------------------------------------------------
>
> Key: MENFORCER-125
> URL: https://jira.codehaus.org/browse/MENFORCER-125
> Project: Maven 2.x Enforcer Plugin
> Issue Type: Bug
> Components: Standard Rules
> Affects Versions: 1.0.1
> Environment: 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"
> Reporter: Mirko Friedenhagen
> Assignee: Paul Gier
> Fix For: 1.1
>
> Attachments: fix-documentation-for-requireProperty.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira