Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-292

announcement-generate goal doesn't respect useJql parameter

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10
    • Component/s: announcement, jira
    • Labels:
      None
    • Number of attachments :
      1

      Description

      When configured with the useJql parameter such that the changes plugin is able to pull a report from JIRA version 5.1 the announcement-mail goal does not appear to respect this.

      Executing the goal 'jira-report' generates the correct URL and produces the report successfully, however executing the goal 'announcement-mail' fails as if useJql is not specified. This may also be true for jiraUser and jiraPassword but it cant get that far due to the useJql error.

      Resulting error

      [ERROR] Error accessing http://jira.hostname.com/browse/PROJECTID
      java.lang.RuntimeException: The issue management URL in the POM does not include a pid, and it was not possible to extract it from the page at that URL.
      	at org.apache.maven.plugin.jira.AbstractJiraDownloader.getParameterBasedQueryURL(AbstractJiraDownloader.java:238)
      	at org.apache.maven.plugin.jira.AbstractJiraDownloader.doExecute(AbstractJiraDownloader.java:147)
      	at org.apache.maven.plugin.announcement.AnnouncementMojo.getJiraReleases(AnnouncementMojo.java:682)
      	at org.apache.maven.plugin.announcement.AnnouncementMojo.execute(AnnouncementMojo.java:454)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      

      Example configuration which causes the issue

      <useJql>true</useJql>
      <jiraUser>jirauserjiraUser>
      <jiraPassword>jirapwd</jiraPassword>
      <onlyCurrentVersion>true</onlyCurrentVersion>
      <toAddresses>
         <toAddress>address@domain.com</toAddress>
      </toAddresses>
      <smtpHost>hostname</smtpHost>
      <smtpPort implementation="java.lang.Integer">25</smtpPort>
      <issueManagementSystems>
         <issueManagementSystem>JIRA</issueManagementSystem>
      </issueManagementSystems>
      

        Activity

        Hide
        Dennis Lundberg added a comment -

        Hi

        I think that you mean the changes:announcement-generate goal. All the changes:announcement-mail goal does is send an email based on a previously generated template.

        The changes:announcement-generate goal does not yet support the useJql parameter, as can be seen in the plugin documentation:
        http://maven.apache.org/plugins/maven-changes-plugin/announcement-generate-mojo.html

        Show
        Dennis Lundberg added a comment - Hi I think that you mean the changes:announcement-generate goal. All the changes:announcement-mail goal does is send an email based on a previously generated template. The changes:announcement-generate goal does not yet support the useJql parameter , as can be seen in the plugin documentation: http://maven.apache.org/plugins/maven-changes-plugin/announcement-generate-mojo.html
        Hide
        Luca Tagliani added a comment -

        Attaching a proposed patch for enabling jql in announcement-generate

        Show
        Luca Tagliani added a comment - Attaching a proposed patch for enabling jql in announcement-generate
        Hide
        Dennis Lundberg added a comment -

        Fixed in r1577308.

        Show
        Dennis Lundberg added a comment - Fixed in r1577308 .

          People

          • Assignee:
            Dennis Lundberg
            Reporter:
            Andrew Murdoch
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: