Maven 2.x Changes Plugin

statusIds are ignored for announcement-generate goal

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 2.3
  • Fix Version/s: None
  • Component/s: announcement
  • Labels:
    None
  • Environment:
    maven 2.2.1, windows XP, java 1.6.0_13, jira 3.13.5#360
  • Number of attachments :
    0

Description

I am trying to configure the changes plugin to retrieve issues from our jira system. the jira-report goal works as expected, generating the xml based on the parameters, including statusIds. when i use announcement-generate, the statusIds are ignored and only Closed issues are returned in the jira-announcements.xml file.
here is my current configuration...

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${maven.changes.plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>jira-report</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>          
          <onlyCurrentVersion>true</onlyCurrentVersion>
          
          <columnNames>Type,Key,Summary,Assignee,Status,Resolution,Fix Version</columnNames>
          <sortColumnNames>Type,Key DESC</sortColumnNames>

          <resolutionIds>Fixed</resolutionIds>
          <statusIds>Resolved,Closed</statusIds>
          
          
          <maxEntries>100</maxEntries>
          
          <smtpHost>smtpserver</smtpHost>
          <smtpPort implementation="java.lang.Integer">25</smtpPort>
          <toAddresses>
            <toAddress implementation="java.lang.String">me@email.com</toAddress>
          </toAddresses>
          
          <!-- only applies to generating & sending announcements -->
          <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
          <generateJiraAnnouncement>true</generateJiraAnnouncement>
          
        </configuration>
      </plugin>

executing "mvn clean changes:announcement-generate"
results in

[INFO] ------------------------------------------------------------------------
[INFO] Building Capps
[INFO] task-segment: [clean, changes:announcement-generate]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory c:\workspace\Framework_CAPPS2_OD3\CAPPS2\target
[INFO] [changes:announcement-generate {execution: default-cli}]
Feb 3, 2010 5:27:29 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
[ERROR] maven-changes-plugin: None of the configured sortColumnNames 'null' are correct.
[INFO] Downloading from JIRA at: http://xxxxxxx/secure/IssueNavigator.jspa?view=rss&pid=10944&statusIds=6&resolutionIds=1&tempMax=100&reset=true&decorator=none
Feb 3, 2010 5:27:30 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
[INFO] Creating announcement file from JIRA releases...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Couldn't find the release '2.0.7' among the supplied releases.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Feb 03 17:27:30 EST 2010
[INFO] Final Memory: 23M/254M
[INFO] ------------------------------------------------------------------------

Even though there is an error, the jira-announcements.xml file gets generated.

<rss version="0.92" >
<channel>
<title>xxxxxxxxxxx</title>
<link>http://xxxxxx/secure/IssueNavigator.jspa?reset=true&amp;pid=10944&amp;status=6&amp;resolution=1&amp;sorter/field=issuekey&amp;sorter/order=DESC</link>
<description>An XML representation of a search request</description>
<language>en-us</language> <issue start="0" end="7" total="7" /> <build-info>
<version>3.13.5</version>
<build-number>360</build-number>
<build-date>07-07-2009</build-date>
<edition>Enterprise</edition>
</build-info>

..[items]..

</channel>
</rss>

You can tell by the <link> tag in the xml that the only status retrieved was CLOSED (status=6).

I'm not sure why the build error is popping up & i still get the generated file. I suppose there are 2 issues here.

Activity

Hide
Dennis Lundberg added a comment -

In which section of your POM do you have the configuration? My guess is that it's in the <reporting> section. If that is the case then the announcement-generate goal won't see it, because that is a build goal and not a report goal. For the announcement-generate goal to see the configuration it needs to be in the <build> section of the POM.

Show
Dennis Lundberg added a comment - In which section of your POM do you have the configuration? My guess is that it's in the <reporting> section. If that is the case then the announcement-generate goal won't see it, because that is a build goal and not a report goal. For the announcement-generate goal to see the configuration it needs to be in the <build> section of the POM.
Hide
rob fellows added a comment -

Yes, you are correct it is in the reporting section. I've moved the configuration to the build section and i no longer see the restriction of status in the jira-announcement.xml.

Show
rob fellows added a comment - Yes, you are correct it is in the reporting section. I've moved the configuration to the build section and i no longer see the restriction of status in the jira-announcement.xml.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: