You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by lt...@apache.org on 2005/09/22 07:41:22 UTC
svn commit: r290896 - in /maven/maven-1/plugins/trunk/changes:
src/plugin-resources/changes.jsl xdocs/changes.xml xdocs/index.xml
Author: ltheussl
Date: Wed Sep 21 22:41:20 2005
New Revision: 290896
URL: http://svn.apache.org/viewcvs?rev=290896&view=rev
Log:
MPCHANGES-15,16: Add multiple issue/due-to support
Modified:
maven/maven-1/plugins/trunk/changes/src/plugin-resources/changes.jsl
maven/maven-1/plugins/trunk/changes/xdocs/changes.xml
maven/maven-1/plugins/trunk/changes/xdocs/index.xml
Modified: maven/maven-1/plugins/trunk/changes/src/plugin-resources/changes.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changes/src/plugin-resources/changes.jsl?rev=290896&r1=290895&r2=290896&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/src/plugin-resources/changes.jsl (original)
+++ maven/maven-1/plugins/trunk/changes/src/plugin-resources/changes.jsl Wed Sep 21 22:41:20 2005
@@ -112,7 +112,7 @@
</j:when>
<j:otherwise>
- <jsl:applyTemplates select="*"/>
+ <jsl:applyTemplates select="*"/>
</j:otherwise>
</j:choose>
</table>
@@ -125,32 +125,84 @@
<j:set var="issue"><x:expr select="@issue"/></j:set>
<j:set var="dueto"><x:expr select="@due-to"/></j:set>
<j:set var="duetoemail"><x:expr select="@due-to-email"/></j:set>
+ <!-- FIXME: Same hack as above -->
+ <x:set var="currentAction" select="."/>
<tr>
<td><img src="images/${type}.gif" alt="${type}" title="${type}"/></td>
<td>
- <jsl:applyTemplates trim="false"/>
+ <x:if select="$currentAction/description">
+ <jsl:applyTemplates select="description"/>
+ </x:if>
+ <x:if select="not($currentAction/description)">
+ <x:set var="text" select="string(.)"/>
+ ${text}
+ </x:if>
- <j:if test="${issue != ''}">
<j:useBean var="finder" class="org.apache.maven.changes.IssueFinder"/>
<j:set var="template" value="${maven.changes.issue.template}"/>
<j:set var="trackerURL" value="${pom.issueTrackingUrl}"/>
- Fixes <a href="${finder.getIssueURL(trackerURL,issue,template)}">${issue}</a>.
- </j:if>
+ <x:if select="$currentAction/fixes">
+ <j:set var="fixesTotal"><x:expr select="count(./fixes)"/></j:set>
+ <j:set var="fixesCount" value="1"/>
+ Fixes
+ <x:forEach var="item" select="./fixes">
+ <j:set var="issue"><x:expr select="@issue"/></j:set>
+ <a href="${finder.getIssueURL(trackerURL,issue,template)}">${issue}</a>
+ <j:choose>
+ <j:when test="${fixesCount == fixesTotal}">.</j:when>
+ <j:when test="${fixesCount == fixesTotal-1}"> and </j:when>
+ <j:otherwise>,</j:otherwise>
+ </j:choose>
+ <j:set var="fixesCount" value="${1+fixesCount}"/>
+ </x:forEach>
+ </x:if>
+ <x:if select="not($currentAction/fixes)">
+ <j:if test="${!empty(issue)}">
+ Fixes <a href="${finder.getIssueURL(trackerURL,issue,template)}">${issue}</a>.
+ </j:if>
+ </x:if>
- <j:if test="${dueto != ''}">
- <j:choose>
- <j:when test="${duetoemail != ''}">
- Thanks to <a href="mailto:${duetoemail}">${dueto}</a>.
- </j:when>
- <j:otherwise>
- Thanks to ${dueto}.
- </j:otherwise>
- </j:choose>
- </j:if>
+ <x:if select="$currentAction/dueto">
+ <j:set var="duetoTotal"><x:expr select="count(./dueto)"/></j:set>
+ <j:set var="duetoCount" value="1"/>
+ Thanks to
+ <x:forEach var="item" select="./dueto">
+ <j:set var="name"><x:expr select="@name"/></j:set>
+ <j:set var="email"><x:expr select="@email"/></j:set>
+ <j:if test="${!empty(email)}">
+ <a href="mailto:${email}">${name}</a>
+ </j:if>
+ <j:if test="${empty(email)}">
+ ${name}
+ </j:if>
+ <j:choose>
+ <j:when test="${duetoCount == duetoTotal}">.</j:when>
+ <j:when test="${duetoCount == duetoTotal-1}"> and </j:when>
+ <j:otherwise>,</j:otherwise>
+ </j:choose>
+ <j:set var="duetoCount" value="${1+duetoCount}"/>
+ </x:forEach>
+ </x:if>
+ <x:if select="not($currentAction/dueto)">
+ <j:if test="${!empty(dueto)}">
+ <j:choose>
+ <j:when test="${duetoemail != ''}">
+ Thanks to <a href="mailto:${duetoemail}">${dueto}</a>.
+ </j:when>
+ <j:otherwise>
+ Thanks to ${dueto}.
+ </j:otherwise>
+ </j:choose>
+ </j:if>
+ </x:if>
</td>
<td><a href="team-list.html#${dev}">${dev}</a></td>
- </tr>
+ </tr>
+ </jsl:template>
+
+ <jsl:template match="description">
+ <jsl:applyTemplates trim="false"/>
</jsl:template>
<jsl:template match="*">
Modified: maven/maven-1/plugins/trunk/changes/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changes/xdocs/changes.xml?rev=290896&r1=290895&r2=290896&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/changes/xdocs/changes.xml Wed Sep 21 22:41:20 2005
@@ -2,7 +2,7 @@
<!--
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,8 @@
</properties>
<body>
<release version="1.6-SNAPSHOT" date="in SVN">
+ <action dev="ltheussl" type="add" issue="MPCHANGES-15"> Add multiple due-to/due-to-email support.</action>
+ <action dev="ltheussl" type="add" issue="MPCHANGES-16"> Add multiple issue support.</action>
<action dev="ltheussl" type="fix" issue="MPCHANGES-24">The encoding of changes.xml is not preserved after <code>scm:prepare-release</code>.</action>
<action dev="aheritier" type="fix">Fix XTHML 1.0 compliance.</action>
<action dev="ltheussl" type="fix" issue="MPCHANGES-22" due-to="Mike Traum">Document description attribute of release element.</action>
Modified: maven/maven-1/plugins/trunk/changes/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changes/xdocs/index.xml?rev=290896&r1=290895&r2=290896&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/xdocs/index.xml (original)
+++ maven/maven-1/plugins/trunk/changes/xdocs/index.xml Wed Sep 21 22:41:20 2005
@@ -67,6 +67,35 @@
]]></source>
<p>
+ An alternative form of the <code><action></code> element
+ allows you to specify several issues and/or several due-to
+ elements:
+ </p>
+
+<source><![CDATA[
+ <action dev="vmassol" type="fix">
+ <description>Corrected bug blah blah.</description>
+ <fixes issue="JIRA-XXX"/>
+ <fixes issue="JIRA-YYY"/>
+ .
+ .
+ .
+ <dueto name="John Doe" email="john@doe.com"/>
+ <dueto name="Jane Doe"/>
+ .
+ .
+ </action>
+]]></source>
+
+ <p>
+ The <code><fixes></code> element takes one required <code>issue</code>
+ attribute, the <code><dueto></code> element requires only the <code>name</code>
+ attribute, the <code>email</code> is optional. Note that the <code><description></code>,
+ <code><fixes></code> and <code><dueto></code> elements take precedence over
+ any equivalent attributes defined in the <code><action></code> element.
+ </p>
+
+ <p>
A live Changes example report can be found
<a href="http://maven.apache.org/reference/plugins/changes/changes-report.html">here</a>.
</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org