You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Eric Blanchard (JIRA)" <ji...@codehaus.org> on 2011/09/28 14:30:17 UTC

[jira] Created: (MCHANGELOG-125) Support regexp capturing group in issueIDRegexPattern configuration property

Support regexp capturing group in issueIDRegexPattern configuration property
----------------------------------------------------------------------------

                 Key: MCHANGELOG-125
                 URL: https://jira.codehaus.org/browse/MCHANGELOG-125
             Project: Maven 2.x Changelog Plugin
          Issue Type: Improvement
    Affects Versions: 2.3
         Environment: Any
            Reporter: Eric Blanchard


In order to support more complex issue id detection in changelog comments, I propose to support regexp capturing group in <issueIDRegexPattern /> configuration property.

For example, with a Trac Issues Management System, I use
  <issueIDRegexPattern>#(\d+)</issueIDRegexPattern>
  <issueLinkUrl>http://trac.host/path/to/trac/project/ticket/%ISSUE%</issueLinkUrl>
and the %ISSUE% keyword will be replaced by the issue number (without the prefixing '#')

I have successfully tested a simple modification of ChangeLogReport.java / sinkIssueLink() / line: 1319
replace:
            String match = matcher.group();
by:
            String match;
            if(matcher.groupCount() == 1) {
                match = matcher.group(1);
            } else {
                match = matcher.group();
            }

Hope this little modification can be adopted and put in 2.3 release.

Best regards.
--
Eric




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCHANGELOG-125) Support regexp capturing group in issueIDRegexPattern configuration property

Posted by "Markus Spann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCHANGELOG-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294309#comment-294309 ] 

Markus Spann commented on MCHANGELOG-125:
-----------------------------------------

I'm totally with Eric on this issue. A single capturing group as described would be most helpful.
Our tickets are incrementing integers. The regex \d{2,} is really too fuzzy.
                
> Support regexp capturing group in issueIDRegexPattern configuration property
> ----------------------------------------------------------------------------
>
>                 Key: MCHANGELOG-125
>                 URL: https://jira.codehaus.org/browse/MCHANGELOG-125
>             Project: Maven 2.x Changelog Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.3
>         Environment: Any
>            Reporter: Eric Blanchard
>
> In order to support more complex issue id detection in changelog comments, I propose to support regexp capturing group in <issueIDRegexPattern /> configuration property.
> For example, with a Trac Issues Management System, I use
>   <issueIDRegexPattern>#(\d+)</issueIDRegexPattern>
>   <issueLinkUrl>http://trac.host/path/to/trac/project/ticket/%ISSUE%</issueLinkUrl>
> and the %ISSUE% keyword will be replaced by the issue number (without the prefixing '#')
> I have successfully tested a simple modification of ChangeLogReport.java / sinkIssueLink() / line: 1319
> replace:
>             String match = matcher.group();
> by:
>             String match;
>             if(matcher.groupCount() == 1) {
>                 match = matcher.group(1);
>             } else {
>                 match = matcher.group();
>             }
> Hope this little modification can be adopted and put in 2.3 release.
> Best regards.
> --
> Eric

--
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