Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.7.1
    • Component/s: jira
    • Labels:
      None
    • Environment:
      OS: Mac
      Maven: 3.0.4
      Java: 1.6
      Jira: 5.0.3
      maven-changes-plugin: 2.6
    • Number of attachments :
      1

      Description

      Cannot generate jira-report or announcement-mail using Jira 5.0.3. These goals worked perfectly with Jira 4.X

      [INFO] --- maven-changes-plugin:2.6:announcement-generate (default-cli) @ hello-world ---
      May 2, 2012 4:16:55 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
      WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
      May 2, 2012 4:16:56 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
      WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
      [ERROR] Error accessing http://jira.xy.z/jira/browse/ABC
      java.lang.NullPointerException
      	at org.apache.maven.plugin.jira.JiraHelper.getPidFromJira(JiraHelper.java:142)
      	at org.apache.maven.plugin.jira.AbstractJiraDownloader.doExecute(AbstractJiraDownloader.java:389)
      	at org.apache.maven.plugin.announcement.AnnouncementMojo.getJiraReleases(AnnouncementMojo.java:723)
      	at org.apache.maven.plugin.announcement.AnnouncementMojo.execute(AnnouncementMojo.java:488)
      	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.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:320)
      	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)
      [WARNING] JIRA file codebase/target/jira-announcement.xml doesn't exist.
      
      

        Activity

        Hide
        cosmo added a comment - - edited

        Attached patch with a simple fix for Jira 5.
        ---------------------------------------------

        Jira 5.0.1 has additional instances of data-pid="12345" format which causes key to be null when parsing projectPage. Adding ? before search pattern ?pid= fixes the issue by finding the required pattern ?pid=12345&amp
        Also Verified with older version of Jira 4.X

        Jira 5 projectPage is as below...

        <li>
          <a class="create-issue-type lnk" data-pid="10150" data-issue-type="3"  title="A task that needs to be done." href="/jira/secure/CreateIssue.jspa?pid=10150&amp;issuetype=3"><img src="/jira/images/icons/task.gif" alt="" width="16" height="16" />Task</a>
        </li>
        
        Show
        cosmo added a comment - - edited Attached patch with a simple fix for Jira 5. --------------------------------------------- Jira 5.0.1 has additional instances of data-pid="12345" format which causes key to be null when parsing projectPage. Adding ? before search pattern ?pid= fixes the issue by finding the required pattern ?pid=12345&amp Also Verified with older version of Jira 4.X Jira 5 projectPage is as below... <li> <a class= "create-issue-type lnk" data-pid= "10150" data-issue-type= "3" title= "A task that needs to be done." href= "/jira/secure/CreateIssue.jspa?pid=10150&amp;issuetype=3" ><img src= "/jira/images/icons/task.gif" alt= "" width=" 16 " height=" 16" />Task</a> </li>
        Hide
        Olivier Lamy added a comment -

        fixed r1334151
        Thanks!

        Show
        Olivier Lamy added a comment - fixed r1334151 Thanks!
        Hide
        cosmo added a comment -

        Thanks for accepting.
        Any plans for releasing 2.8 soon?
        https://jira.codehaus.org/browse/MCHANGES/fixforversion/18463

        Show
        cosmo added a comment - Thanks for accepting. Any plans for releasing 2.8 soon? https://jira.codehaus.org/browse/MCHANGES/fixforversion/18463

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            cosmo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: