You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2008/08/05 01:17:52 UTC
svn commit: r682537 - in /maven/plugins/trunk/maven-changes-plugin/src:
it/announcement-generate-custom-template/
it/announcement-generate-custom-template/src/changes/
it/report-changes-generation/ it/report-changes-generation/src/changes/
it/report-ch...
Author: olamy
Date: Mon Aug 4 16:17:51 2008
New Revision: 682537
URL: http://svn.apache.org/viewvc?rev=682537&view=rev
Log:
[MCHANGES-47] Add support for multiple <issue> and <due-to> tags in changes.xml
restore maven 1 compatibility
Modified:
maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/goals.txt
maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/pom.xml
maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/src/changes/changes.xml
maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml
maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml
maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh
maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/pom.xml
maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/src/changes/changes.xml
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java
maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo
maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesValidatorMojoTest.java
maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java
maven/plugins/trunk/maven-changes-plugin/src/test/unit/changes.xml
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/goals.txt?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/goals.txt (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/goals.txt Mon Aug 4 16:17:51 2008
@@ -1 +1 @@
-changes:announcement-generate
\ No newline at end of file
+changes:changes-validate changes:announcement-generate
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/pom.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/pom.xml Mon Aug 4 16:17:51 2008
@@ -45,11 +45,35 @@
<changesPluginVersion>@pom.version@</changesPluginVersion>
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>${changesPluginVersion}</version>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
- <version>${changesPluginVersion}</version>
+ <version>${changesPluginVersion}</version>
+ <executions>
+ <execution>
+ <id>validate-changes</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>changes-validate</goal>
+ </goals>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/src/changes/changes.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/src/changes/changes.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/announcement-generate-custom-template/src/changes/changes.xml Mon Aug 4 16:17:51 2008
@@ -17,7 +17,8 @@
under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/changes/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<properties>
<title>Changes report Project</title>
<author email="zloug@toto.com">Mr Zloug</author>
@@ -37,8 +38,12 @@
</release>
<release version="1.0" date="2005-01-01" description="First release">
- <action dev="me" type="update">
+ <action dev="me" type="update" issue="MCHANGES-47" due-to="others" due-to-email="others@users.com">
Uploaded documentation on how to use the plugin.
+ <fixes issue="MCHANGES-88"/>
+ <fixes issue="JIRA-YYY"/>
+ <dueto name="John Doe" email="john@doe.com"/>
+ <dueto name="Jane Doe"/>
</action>
</release>
</body>
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml Mon Aug 4 16:17:51 2008
@@ -38,12 +38,21 @@
</dependencies>
<issueManagement>
<system>jira</system>
- <url>http://localhost</url>
+ <url>http://localhost/bla</url>
</issueManagement>
<properties>
<changesPluginVersion>@pom.version@</changesPluginVersion>
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>${changesPluginVersion}</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -71,7 +80,7 @@
<artifactId>maven-changes-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
- <issueLinkTemplate>myjira/browse/%ISSUE%</issueLinkTemplate>
+ <issueLinkTemplate>http://myjira/browse/%ISSUE%</issueLinkTemplate>
</configuration>
<reportSets>
<reportSet>
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml Mon Aug 4 16:17:51 2008
@@ -31,15 +31,23 @@
<action dev="me" type="fix" issue="MCHANGES-88">
Enable retrieving component-specific issues.
</action>
- <action dev="jruiz" type="remove" due-to="others" due-to-email="users@users.com">
+ <action dev="jruiz" type="remove">
The element type " link " must be terminated by the matching end-tag.
Deleted the erroneous code.
+ <fixes issue="MCHANGES-1"/>
+ <fixes issue="JIRA-12"/>
+ <dueto name="John Doe" email="john@doe.com"/>
+ <dueto name="Jane Doe"/>
</action>
</release>
<release version="1.0" date="2005-01-01" description="First release">
- <action dev="me" type="update" issue="MCHANGES-47, MCHANGES-88" due-to="others,someone" due-to-email="others@users.com">
+ <action dev="me" type="update" issue="MCHANGES-47" due-to="others" due-to-email="others@users.com">
Uploaded documentation on how to use the plugin.
+ <fixes issue="MCHANGES-88"/>
+ <fixes issue="JIRA-YYY"/>
+ <dueto name="John Doe" email="john@doe.com"/>
+ <dueto name="Jane Doe"/>
</action>
</release>
</body>
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh Mon Aug 4 16:17:51 2008
@@ -43,7 +43,7 @@
return false;
}
- indexOf = reportContent.indexOf( "<a href=\"myjira/browse/MCHANGES-88\">MCHANGES-88</a>" );
+ indexOf = reportContent.indexOf( "<a href=\"http://myjira/browse/MCHANGES-88\" class=\"externalLink\">MCHANGES-88</a>" );
if ( indexOf < 0)
{
System.err.println( "changes-report.html doesn't contains jira issue link" );
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/pom.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/pom.xml Mon Aug 4 16:17:51 2008
@@ -44,11 +44,32 @@
<changesPluginVersion>@pom.version@</changesPluginVersion>
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>${changesPluginVersion}</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
- <version>${changesPluginVersion}</version>
+ <version>${changesPluginVersion}</version>
+ <executions>
+ <execution>
+ <id>validate-changes</id>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>changes-validate</goal>
+ </goals>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/src/changes/changes.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/src/changes/changes.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-system/src/changes/changes.xml Mon Aug 4 16:17:51 2008
@@ -17,7 +17,8 @@
under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/changes/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<properties>
<title>Changes report Project</title>
<author email="zloug@toto.com">Mr Zloug</author>
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java Mon Aug 4 16:17:51 2008
@@ -21,16 +21,19 @@
import java.io.File;
import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
-import java.util.StringTokenizer;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.util.HtmlTools;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.changes.model.Action;
+import org.apache.maven.plugins.changes.model.DueTo;
+import org.apache.maven.plugins.changes.model.FixedIssue;
import org.apache.maven.plugins.changes.model.Release;
/**
@@ -192,7 +195,7 @@
for ( int idx = 0; idx < actionList.size(); idx++ )
{
Action action = (Action) actionList.get( idx );
-
+
sink.tableRow();
sinkShowTypeIcon( sink, action.getType() );
@@ -201,7 +204,8 @@
sink.rawText( action.getAction() );
- if ( StringUtils.isNotEmpty( action.getIssue() ) )
+ // no null check needed classes from modello return a new ArrayList
+ if ( StringUtils.isNotEmpty( action.getIssue() ) || ( !action.getFixedIssues().isEmpty() ) )
{
sink.text( " " + bundle.getString( "report.changes.text.fixes" ) + " " );
@@ -213,14 +217,14 @@
}
else
{
- constructIssueLink( action.getIssue(), system, sink );
+ constructIssueLink( action.getIssue(), system, sink, action.getFixedIssues() );
}
sink.text( "." );
}
- if ( StringUtils.isNotEmpty( action.getDueTo() ) )
+ if ( StringUtils.isNotEmpty( action.getDueTo() ) || ( !action.getDueTos().isEmpty() ) )
{
- constructDueTo( sink, action, bundle );
+ constructDueTo( sink, action, bundle, action.getDueTos() );
}
sink.tableCell_();
@@ -466,65 +470,82 @@
}
/**
- * MCHANGES-47 issue can be comma separated
* @param issue the current String
*/
- private void constructIssueLink( String issue, String system, Sink sink )
+ private void constructIssueLink( String issue, String system, Sink sink, List fixes )
{
- // null check has been done before
- StringTokenizer tokenizer = new StringTokenizer( issue, "," );
+
+ if ( StringUtils.isNotEmpty( issue ) )
+ {
+ sink.link( parseIssueLink( issue, system ) );
- while ( tokenizer.hasMoreTokens() )
+ sink.text( issue );
+
+ sink.link_();
+ }
+
+ for ( Iterator iterator = fixes.iterator(); iterator.hasNext(); )
{
- String currentIssueId = tokenizer.nextToken();
- sink.link( parseIssueLink( currentIssueId, system ) );
+ FixedIssue fixedIssue = (FixedIssue) iterator.next();
+ String currentIssueId = fixedIssue.getIssue();
+ if ( StringUtils.isNotEmpty( currentIssueId ) )
+ {
- sink.text( currentIssueId );
+ sink.link( parseIssueLink( currentIssueId, system ) );
- sink.link_();
+ sink.text( currentIssueId );
+
+ sink.link_();
+ }
}
}
/**
- * MCHANGES-47 due-to can be comma separated (we will support due-to-email comma separated)
*
* @param sink
* @param action
* @param bundle
*/
- private void constructDueTo( Sink sink, Action action, ResourceBundle bundle )
+ private void constructDueTo( Sink sink, Action action, ResourceBundle bundle, List dueTos )
{
- // null check has been done before
- StringTokenizer tokenizer = new StringTokenizer( action.getDueTo(), "," );
- String[] emails = StringUtils.split( action.getDueToEmail(), ',' );
- if (emails == null)
+ // creat a Map which key : dueTo name, value : dueTo email
+ Map namesEmailMap = new LinkedHashMap();
+ namesEmailMap.put( action.getDueTo(), action.getDueToEmail() );
+
+ for (Iterator iterator = dueTos.iterator();iterator.hasNext();)
+ {
+ DueTo dueTo = (DueTo) iterator.next();
+ namesEmailMap.put( dueTo.getName(), dueTo.getEmail() );
+ }
+
+ if (namesEmailMap.isEmpty())
{
- // NPE free
- emails = new String[]{""};
+ return;
}
+
sink.text( " " + bundle.getString( "report.changes.text.thanx" ) + " " );
int i = 0;
- while ( tokenizer.hasMoreTokens() )
+ for (Iterator iterator = namesEmailMap.keySet().iterator(); iterator.hasNext();)
{
- String currentDueTo = tokenizer.nextToken();
- String currentDueToEmail = emails.length > i ? emails[i] : null;
+ String currentDueTo = (String) iterator.next();
+ String currentDueToEmail = (String) namesEmailMap.get( currentDueTo );
i++;
if ( StringUtils.isNotEmpty( currentDueToEmail ) )
{
sinkLink( sink, currentDueTo, "mailto:" + currentDueToEmail );
}
- else
+ else if ( StringUtils.isNotEmpty( currentDueTo ) )
{
sink.text( currentDueTo );
}
- if ( i <= tokenizer.countTokens() )
+ if ( i < namesEmailMap.size() )
{
- sink.text( "," );
+ sink.text( ", " );
}
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo Mon Aug 4 16:17:51 2008
@@ -89,7 +89,7 @@
<name>Body</name>
<version>1.0.0</version>
<fields>
- <field xml.listStyle="flat">
+ <field xml.listStyle="flat" xml.tagName="release">
<name>releases</name>
<version>1.0.0</version>
<association>
@@ -134,7 +134,7 @@
A short description of this release.
</description>
</field>
- <field xml.listStyle="flat">
+ <field xml.listStyle="flat" xml.tagName="action">
<name>actions</name>
<version>1.0.0</version>
<association>
@@ -170,7 +170,7 @@
</field>
</fields>
</class>
- <class>
+ <class xsd.compositor="sequence">
<name>Action</name>
<version>1.0.0</version>
<description>
@@ -260,7 +260,25 @@
<version>1.0.0</version>
<type>String</type>
<description>fix date</description>
- </field>
+ </field>
+ <field xml.listStyle="flat" xml.tagName="fixes" xml.associationTagName="fixes">
+ <name>fixedIssues</name>
+ <version>1.0.0</version>
+ <association>
+ <type>FixedIssue</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ <description>A list of fix issues.</description>
+ </field>
+ <field xml.listStyle="flat" xml.tagName="dueto" xml.associationTagName="dueto">
+ <name>dueTos</name>
+ <version>1.0.0</version>
+ <association>
+ <type>DueTo</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ <description>A list of contibutors for this issue.</description>
+ </field>
</fields>
<codeSegments>
<codeSegment>
@@ -277,6 +295,48 @@
</codeSegment>
</codeSegments>
</class>
+ <class xsd.compositor="sequence">
+ <name>DueTo</name>
+ <version>1.0.0</version>
+ <description>
+ Extras Name and Email of the person to be credited for this change. This can be used when a patch is submitted by a non-committer.
+ </description>
+ <fields>
+ <field xml.attribute="true">
+ <name>name</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Name of the person to be credited for this change.</description>
+ </field>
+ <field xml.attribute="true">
+ <name>email</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Name of the person to be credited for this change.</description>
+ </field>
+ </fields>
+ </class>
+ <class xsd.compositor="sequence">
+ <name>FixedIssue</name>
+ <version>1.0.0</version>
+ <description>
+ A fixed issue.
+ </description>
+ <fields>
+ <field xml.attribute="true">
+ <name>issue</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ <![CDATA[
+ <p>Id of the issue related to this change. This is the id in your issue tracking system.</p>
+ <p>The Changes plugin will generate a URL out of this id. The URL is constructed using the value of the issueLinkTemplate parameter.</p>
+ <p>See the <a href="changes-report.html">changes-report mojo</a> for more details.</p>
+ ]]>
+ </description>
+ </field>
+ </fields>
+ </class>
</classes>
</model>
Modified: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesValidatorMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesValidatorMojoTest.java?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesValidatorMojoTest.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesValidatorMojoTest.java Mon Aug 4 16:17:51 2008
@@ -51,6 +51,7 @@
File changesXml = new File( getBasedir(), "/src/test/unit/changes.xml" );
setVariableValueToObject( mojo, "xmlPath", changesXml );
setVariableValueToObject( mojo, "changesXsdVersion", "1.0.0" );
+ setVariableValueToObject( mojo, "failOnError", Boolean.TRUE );
mojo.execute();
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java Mon Aug 4 16:17:51 2008
@@ -1,8 +1,13 @@
package org.apache.maven.plugin.changes;
import java.io.File;
+import java.util.Iterator;
+import java.util.List;
import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.plugins.changes.model.Action;
+import org.apache.maven.plugins.changes.model.FixedIssue;
+import org.apache.maven.plugins.changes.model.Release;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
@@ -139,6 +144,21 @@
ChangesXML changesXML = new ChangesXML( changesFile, new MockLog() );
assertNotNull( changesXML.getChangesDocument() );
assertEquals( "Changes report Project", changesXML.getTitle() );
+
+ List releases = changesXML.getReleaseList();
+ assertEquals( 2, releases.size() );
+ for ( Iterator iterator = releases.iterator(); iterator.hasNext(); )
+ {
+ Release release = (Release) iterator.next();
+ if ( "1.0".equals( release.getVersion() ) )
+ {
+ Action action = (Action) release.getActions().get( 0 );
+ assertEquals( 2, action.getFixedIssues().size() );
+ assertEquals( "JIRA-XXX", ( (FixedIssue) action.getFixedIssues().get( 0 ) ).getIssue() );
+ assertEquals( "JIRA-YYY", ( (FixedIssue) action.getFixedIssues().get( 1 ) ).getIssue() );
+ assertEquals( 2, action.getDueTos().size() );
+ }
+ }
}
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/test/unit/changes.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/unit/changes.xml?rev=682537&r1=682536&r2=682537&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/unit/changes.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/unit/changes.xml Mon Aug 4 16:17:51 2008
@@ -41,6 +41,10 @@
<release version="1.0" date="2005-01-01" description="First release">
<action dev="me" type="update" date="2008-01-01">
Uploaded documentation on how to use the plugin.
+ <fixes issue="JIRA-XXX"/>
+ <fixes issue="JIRA-YYY"/>
+ <dueto name="John Doe" email="john@doe.com"/>
+ <dueto name="Jane Doe"/>
</action>
</release>
</body>