Maven Changelog Plugin
  1. Maven Changelog Plugin
  2. MCHANGELOG-70

Support a URL filter that enables JIRA/bugzilla/whatever IDs quoted in SCM message to be mapped to real URLs

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Labels:
      None
    • Number of attachments :
      5

      Description

      Eclipse Mylyn, plus other good behaviours (see JIRA Commit Acceptance Plugin) make it necessary to quote a task upon check-in. These task IDs can easily be mapped to URLs using simple regex pattern rules that can be defined in the plugin config.

      1. MCHANGELOG-70,71,72.patch
        11 kB
        John Allen
      2. MCHANGELOG-70,71,72.patch
        11 kB
        John Allen
      3. MCHANGELOG-70.patch
        5 kB
        John Allen
      4. MCHANGELOG-70.patch
        5 kB
        John Allen
      5. MCHANGELOG-70.patch
        5 kB
        John Allen

        Activity

        Hide
        John Allen added a comment -

        Patch provides two new options:

            /**
             * A pattern used to identify 'issue tracker' IDs such as those used by JIRA, 
             * Bugzilla and alike in the SCM commit messages. Any matched patterns
             * are replaced with <code>ticketLinkUrl<code> URL. The default
             * value is a JIRA-style ticket identification pattern.
             *
             * @parameter expression="${ticketLinkRegexPattern}" default-value="[a-zA-Z]{2,}-\d+"
             * @required
             */
            private String ticketLinkRegexPattern;
        
            /**
             * The issue tracker URL used in replacing any matched <code>ticketLinkRegexPattern</code>
             * found in the SCM commit messages. The default is URL is the codehaus JIRA
             * URL. If %TICKET% if found in the URL it is replaced with the matched ticket ID,
             * otherwise the matched ticket ID is appended to the URL.
             *
             * @parameter expression="${ticketLinkUrl}" default-value="http://jira.codehaus.org/browse/%TICKET%"
             * @required
             */
            private String ticketLinkUrl;
        

        Which, if defined, will replace any matching 'ticket identifiers' found in the commit messages with links to the ticket system based on the 'ticketLinkUrl' template string.

        Patch generated against trunk, revision 560535.

        Combined patch for MCHANGELOG-70, MCHANGELOG-71 and MCHANGELOG-72 to follow.

        Show
        John Allen added a comment - Patch provides two new options: /** * A pattern used to identify 'issue tracker' IDs such as those used by JIRA, * Bugzilla and alike in the SCM commit messages. Any matched patterns * are replaced with <code>ticketLinkUrl<code> URL. The default * value is a JIRA-style ticket identification pattern. * * @parameter expression= "${ticketLinkRegexPattern}" default -value= "[a-zA-Z]{2,}-\d+" * @required */ private String ticketLinkRegexPattern; /** * The issue tracker URL used in replacing any matched <code>ticketLinkRegexPattern</code> * found in the SCM commit messages. The default is URL is the codehaus JIRA * URL. If %TICKET% if found in the URL it is replaced with the matched ticket ID, * otherwise the matched ticket ID is appended to the URL. * * @parameter expression= "${ticketLinkUrl}" default -value= "http: //jira.codehaus.org/browse/%TICKET%" * @required */ private String ticketLinkUrl; Which, if defined, will replace any matching 'ticket identifiers' found in the commit messages with links to the ticket system based on the 'ticketLinkUrl' template string. Patch generated against trunk, revision 560535. Combined patch for MCHANGELOG-70 , MCHANGELOG-71 and MCHANGELOG-72 to follow.
        Hide
        John Allen added a comment -

        Mistake in the 'ticketLinkRegexPattern' default value - an extra escape character was required, i.e.

             * @parameter expression="${ticketLinkRegexPattern}" default-value="[a-zA-Z]{2,}-\d+"
        

        should have been:

             * @parameter expression="${ticketLinkRegexPattern}" default-value="[a-zA-Z]{2,}-\\d+"
        
        Show
        John Allen added a comment - Mistake in the 'ticketLinkRegexPattern' default value - an extra escape character was required, i.e. * @parameter expression= "${ticketLinkRegexPattern}" default -value= "[a-zA-Z]{2,}-\d+" should have been: * @parameter expression= "${ticketLinkRegexPattern}" default -value= "[a-zA-Z]{2,}-\\d+"
        Hide
        John Allen added a comment -

        Combined patch for MCHANGELOG-70, MCHANGELOG-71 and MCHANGELOG-72 - much easier to apply once the individuals have been reviewed and accepted.

        Show
        John Allen added a comment - Combined patch for MCHANGELOG-70 , MCHANGELOG-71 and MCHANGELOG-72 - much easier to apply once the individuals have been reviewed and accepted.
        Hide
        John Allen added a comment -

        fixes unit tests failures from NPEs due to a lack of parameter injected values.

        Show
        John Allen added a comment - fixes unit tests failures from NPEs due to a lack of parameter injected values.
        Hide
        John Allen added a comment -

        fixes NPEs in unit tests due to a lack of injected parameters.

        Show
        John Allen added a comment - fixes NPEs in unit tests due to a lack of injected parameters.
        Hide
        Dennis Lundberg added a comment -

        Fixed in r939060.
        Thanks!

        I changed the names of the parameters to look similar to the ones used in Maven Changes Plugin.

        Show
        Dennis Lundberg added a comment - Fixed in r939060 . Thanks! I changed the names of the parameters to look similar to the ones used in Maven Changes Plugin.

          People

          • Assignee:
            Dennis Lundberg
            Reporter:
            John Allen
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: