Add a new page in the report to describe the changes in the next release of each project

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@426290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier 2006-07-27 22:33:26 +00:00
parent 6b05f3eb53
commit 3627e1de4e
10 changed files with 409 additions and 161 deletions

View File

@ -34,37 +34,40 @@
========================================================================
-->
<goal name="multichanges:init">
<j:if test="${!multichanges_init_already_executed}">
<!-- Default reactor properties from the Multiproject plug-in -->
<!-- Make sure the multiproject plugin is loaded -->
<m:set plugin="maven-multiproject-plugin" property="foo" value="bar"/>
<m:get var="mBasedir" property="maven.multiproject.basedir" plugin="maven-multiproject-plugin"/>
<m:property var="dBasedir" name="maven.multichanges.basedir" defaultValue="${mBasedir}"/>
<m:get var="mIncludes" property="maven.multiproject.includes" plugin="maven-multiproject-plugin"/>
<m:property var="dIncludes" name="maven.multichanges.includes" defaultValue="${mIncludes}"/>
<m:get var="mExcludes" property="maven.multiproject.excludes" plugin="maven-multiproject-plugin"/>
<m:property var="dExcludes" name="maven.multichanges.excludes" defaultValue="${mExcludes}"/>
<m:get var="mIgnoreFailures" property="maven.multiproject.ignoreFailures" plugin="maven-multiproject-plugin"/>
<m:property var="dIgnoreFailures" name="maven.multichanges.ignoreFailures" defaultValue="${mIgnoreFailures}"/>
<ant:dirname property="dataReportDir" file="${maven.multichanges.data}"/>
<ant:mkdir dir="${dataReportDir}"/>
<!-- Copy the images -->
<mkdir dir="${maven.docs.dest}/images"/>
<copy todir="${maven.docs.dest}/images">
<fileset dir="${plugin.resources}/images"/>
</copy>
<j:set var="multichanges_init_already_executed" value="true"/>
</j:if>
</goal>
<!--
========================================================================
Generate a multiproject release report, providing a unified view of
the latest release of projects.
========================================================================
-->
<goal name="multichanges:report" prereqs="multichanges:generates-releases-report,multichanges:generates-releases-rss"/>
<goal name="multichanges:report" prereqs="multichanges:generates-releases-report,multichanges:generates-next-releases-report,multichanges:generates-releases-rss"/>
<goal name="multichanges:generates-releases-file" prereqs="multichanges:init">
<j:if test="${!multichanges_generates_releases_file_already_executed}">
<j:useBean var="dateFormatter" class="org.apache.maven.plugin.multichanges.util.DateFormatter"/>
<!-- Gather project list using the maven reactor -->
<m:reactor
basedir="${dBasedir}"
@ -74,10 +77,6 @@
postProcessing="true"
collectOnly="true"
ignoreFailures="${dIgnoreFailures}"/>
<ant:dirname property="dataReportDir" file="${maven.multichanges.data}"/>
<ant:mkdir dir="${dataReportDir}"/>
<j:file name="${maven.multichanges.data}" prettyPrint="true" xmlns="release">
<releases>
<j:forEach var="reactorProject" items="${reactorProjects}">
@ -85,83 +84,152 @@
<x:attribute name="name">
${reactorProject.name}
</x:attribute>
<x:attribute name="groupId">
${reactorProject.groupId}
</x:attribute>
<x:attribute name="artifactId">
${reactorProject.artifactId}
</x:attribute>
<x:attribute name="url">
${reactorProject.url}
</x:attribute>
<x:attribute name="nextVersion">
${reactorProject.currentVersion}
</x:attribute>
<util:file var="changesAsFile"
name="${reactorProject.context.getVariable('maven.docs.src')}/changes.xml"/>
<j:choose>
<!-- If there's a changes.xml file -->
<j:when test="${changesAsFile.exists()}">
<x:parse var="doc" xml="${changesAsFile}"/>
<!-- Extract latest version. We assume it is contained in
the first <release> tag found -->
<!-- TODO: Improve algorithm by writing a java bean -->
<x:set var="versionElems"
select="$doc//release[contains(@date,'-')]"/>
<!-- We parse it -->
<x:parse var="doc" xml="${changesAsFile}"/>
<x:set var="firstRelease" select="$doc//release[1]"/>
<j:choose>
<j:when test="${not(versionElems.isEmpty())}">
<x:attribute name="version">
${versionElems.get(0).attributeValue('version')}
</x:attribute>
<x:attribute name="date">
${versionElems.get(0).attributeValue('date')}
</x:attribute>
<!-- If in this file there is at least one release entry
and this release has at least one action-->
<j:when test="${firstRelease!=null and !firstRelease.isEmpty()}">
<j:choose>
<!-- If this is the last release (with a release date) ? -->
<j:when test="${dateFormatter.isChangesDate(firstRelease.get(0).attributeValue('date'))}">
<x:element name="last">
<x:copyOf select="$doc//release[1]"/>
</x:element>
<!-- We have no information about the next release -->
<x:element name="next">
<x:element name="release">
<j:choose>
<!-- If the POM version wasn't modified since the last release -->
<j:when test="${reactorProject.currentVersion.equals(firstRelease.get(0).attributeValue('version'))}">
<x:attribute name="version">No future version planned</x:attribute>
</j:when>
<j:otherwise>
<x:attribute name="version">${reactorProject.currentVersion} but no changes registred actually.</x:attribute>
</j:otherwise>
</j:choose>
<x:attribute name="date">Not scheduled</x:attribute>
</x:element>
</x:element>
</j:when>
<!-- Otherwise this is for a future release -->
<j:otherwise>
<x:element name="next">
<x:copyOf select="$doc//release[1]"/>
</x:element>
<x:set var="secondRelease" select="$doc//release[2]"/>
<j:choose>
<!-- If there is another release and it's the last release -->
<j:when test="${secondRelease!=null and !secondRelease.isEmpty()}">
<x:element name="last">
<x:copyOf select="$doc//release[2]"/>
</x:element>
</j:when>
<!-- This was never released -->
<j:otherwise>
<x:element name="last">
<x:element name="release">
<x:attribute name="version">Never released</x:attribute>
<x:attribute name="date">Never released</x:attribute>
</x:element>
</x:element>
</j:otherwise>
</j:choose>
</j:otherwise>
</j:choose>
</j:when>
<!-- There's no releases entries in the changes file -->
<j:otherwise>
<x:attribute name="version">
Not released
</x:attribute>
<x:attribute name="date">
Not released
</x:attribute>
<!-- We have no information about the last release -->
<x:element name="last">
<x:element name="release">
<x:attribute name="version">No information available</x:attribute>
<x:attribute name="date">No information available</x:attribute>
</x:element>
</x:element>
<!-- We have no information about the next release -->
<x:element name="next">
<x:element name="release">
<x:attribute name="version">${reactorProject.currentVersion} but no changes registred actually.</x:attribute>
<x:attribute name="date">No information available</x:attribute>
</x:element>
</x:element>
</j:otherwise>
</j:choose>
</j:choose>
</j:when>
<!-- There's no changes file -->
<j:otherwise>
<x:attribute name="version">
No information available
</x:attribute>
<x:attribute name="date">
No information available
</x:attribute>
<!-- We have no information about the last release -->
<x:element name="last">
<x:element name="release">
<x:attribute name="version">No information available</x:attribute>
<x:attribute name="date">No information available</x:attribute>
</x:element>
</x:element>
<!-- We have no information about the next release -->
<x:element name="next">
<x:element name="release">
<x:attribute name="version">${reactorProject.currentVersion}</x:attribute>
<x:attribute name="date">No information available</x:attribute>
</x:element>
</x:element>
</j:otherwise>
</j:choose>
</x:element>
</j:forEach>
</releases>
</j:file>
<j:set var="multichanges_generates_releases_file_already_executed" value="true"/>
</j:if>
</goal>
<goal name="multichanges:generates-releases-report" prereqs="multichanges:generates-releases-file">
<ant:dirname property="reportDir" file="${maven.multichanges.report}"/>
<ant:mkdir dir="${reportDir}"/>
<j:if test="${!multichanges_generates_releases_already_executed}">
<doc:jsl
input="${maven.multichanges.data}"
output="${maven.multichanges.report}.xml"
stylesheet="${plugin.resources}/releases.jsl"
outputMode="xml"
prettyPrint="true"/>
<j:set var="multichanges_generates_releases_already_executed" value="true"/>
</j:if>
</goal>
<goal name="multichanges:generates-next-releases-report" prereqs="multichanges:generates-releases-file">
<j:if test="${!multichanges_generates_next_releases_already_executed}">
<doc:jsl
input="${maven.multichanges.data}"
output="${maven.multichanges.report}-next.xml"
stylesheet="${plugin.resources}/next-releases.jsl"
outputMode="xml"
prettyPrint="true"/>
<j:set var="multichanges_generates_next_releases_already_executed" value="true"/>
</j:if>
</goal>
<goal name="multichanges:generates-releases-rss" prereqs="multichanges:generates-releases-file">
<j:if test="${!multichanges_generates_releases_rss_already_executed}">
<tstamp>
<format property="currentDate" pattern="EEE, dd MMM yyyy HH:mm:ss Z" locale="en"/>
</tstamp>
<tstamp>
<format property="currentYear" pattern="yyyy"/>
</tstamp>
</tstamp>
<!-- Generate a RSS feed of the changes -->
<doc:jsl
input="${maven.multichanges.data}"
@ -170,13 +238,8 @@
encoding="${maven.docs.outputencoding}"
outputMode="xml"
prettyPrint="false"/>
<!-- Copy the images -->
<mkdir dir="${maven.docs.dest}/images"/>
<copy todir="${maven.docs.dest}/images">
<fileset dir="${plugin.resources}/images"/>
</copy>
<j:set var="multichanges_generates_releases_rss_already_executed" value="true"/>
</j:if>
</goal>
<!--
@ -186,10 +249,15 @@
-->
<goal name="maven-multichanges-plugin:register">
<doc:registerReport
name="Releases"
name="Latest releases"
pluginName="multichanges"
link="${maven.multichanges.report}"
description="Report on latest project releases."/>
description="Report on latest projects releases."/>
<doc:registerReport
name="Next releases"
pluginName="multichanges"
link="${maven.multichanges.report}-next"
description="Report on next projects releases."/>
</goal>
<!--
@ -198,7 +266,8 @@
========================================================================
-->
<goal name="maven-multichanges-plugin:deregister">
<doc:deregisterReport name="Releases"/>
<doc:deregisterReport name="Latest releases"/>
<doc:deregisterReport name="Next releases"/>
</goal>
</project>

View File

@ -12,7 +12,7 @@ import org.apache.commons.logging.LogFactory;
* (yyyy-MM-dd) to a date in RSS format (RFC 822).
*
*/
public class RssDateFormatter {
public class DateFormatter {
/**
* The date format used in changes report file (changes.xml used in
* maven-changes-plugin).
@ -24,12 +24,12 @@ public class RssDateFormatter {
* The date format defined in RFC 822 and used in RSS feeds.
*/
private final static SimpleDateFormat rfc822DF = new SimpleDateFormat(
"EEE, dd MMM yyyy HH:mm:ss Z",Locale.ENGLISH);
"EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);
/**
* Log for debug output
*/
private static Log log = LogFactory.getLog(RssDateFormatter.class);
private static Log log = LogFactory.getLog(DateFormatter.class);
/**
* Converts a date in the changes plugin format (yyyy-MM-dd) to a date in
@ -54,4 +54,21 @@ public class RssDateFormatter {
return "";
}
}
/**
* Test if a String is a date in the changes plugin format (yyyy-MM-dd).
*
* @param aString
* the string to test
* @return true if the String can be parsed as a Date in the format
* yyyy-MM-dd.
*/
public static final boolean isChangesDate(final String aString) {
try {
changesSDF.parse(aString);
return true;
} catch (ParseException e) {
return false;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* ========================================================================
*
* Copyright 2004-2006 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ========================================================================
-->
<jsl:stylesheet
select="$doc"
xmlns:doc="doc"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:x="jelly:xml"
xmlns:maven="jelly:maven"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns="dummy"
trim="false">
<jsl:template match="releases">
<document>
<properties>
<title>Next releases</title>
</properties>
<body>
<section name="Next releases">
<jsl:applyTemplates select="project[count(next/release/action)>0]"/>
</section>
<section name="And the others ...">
<table>
<tr>
<th>Project name</th>
<th>Next release</th>
</tr>
<x:set var="projects" sort="@name" descending="false" select="project[count(next/release/action)=0]"/>
<j:forEach var="project" items="${projects}">
<j:set var="date"><x:expr select="$project/next/release/@date"/></j:set>
<j:set var="artifactId"><x:expr select="$project/@artifactId"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
</j:otherwise>
</j:choose>
<tr>
<td>
<a href="${baseUrl}"><x:expr select="$project/@name"/></a>
</td>
<td>
<x:expr select="$project/next/release/@version"/>
</td>
</tr>
</j:forEach>
</table>
</section>
</body>
</document>
</jsl:template>
<jsl:template match="project">
<maven:get var="maven.multiproject.aggregateDir" plugin="maven-multiproject-plugin" property="maven.multiproject.aggregateDir"/>
<maven:get var="maven.multiproject.navigation" plugin="maven-multiproject-plugin" property="maven.multiproject.navigation"/>
<j:set var="navType" value="${maven.multiproject.navigation}"/>
<j:set var="artifactId"><x:expr select="@artifactId"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="@url"/></j:set>
</j:otherwise>
</j:choose>
<j:set var="sectionName"><x:expr select="@name"/> - Release <x:expr select="next/release/@version"/></j:set>
<j:set var="version"><x:expr select="next/release/@version"/></j:set>
<subsection name="${sectionName}">
<table>
<tr><th style='width:50px'>Type</th><th>Changes</th><th style='width:70px'>By</th></tr>
<jsl:applyTemplates select="next/release/*"/>
</table>
</subsection>
</jsl:template>
<jsl:template match="action">
<j:set var="type"><x:expr select="@type"/></j:set>
<j:set var="dev"><x:expr select="@dev"/></j:set>
<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>
<x:if select="$currentAction/description">
<jsl:applyTemplates select="description"/>
</x:if>
<x:if select="not($currentAction/description)">
<jsl:applyTemplates trim="false"/>
</x:if>
<j:set var="template" value="${maven.changes.issue.template}"/>
<j:set var="trackerURL" value="${pom.issueTrackingUrl}"/>
<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>
${issue}
<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 ${issue}.
</j:if>
</x: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="${baseUrl}/team-list.html#${dev}">${dev}</a></td>
</tr>
</jsl:template>
<jsl:template match="description">
<jsl:applyTemplates trim="false"/>
</jsl:template>
<jsl:template match="*">
<jsl:copy trim="false">
<jsl:applyTemplates trim="false"/>
</jsl:copy>
</jsl:template>
<!-- element values don't pass through as text -->
<jsl:template match="@*"/>
<!-- CDATA and text nodes pass-thru -->
<jsl:template match="text()">
<x:expr select="."/>
</jsl:template>
</jsl:stylesheet>

View File

@ -35,102 +35,63 @@
<th>Project name</th>
<th>Latest stable release</th>
<th>Release date</th>
<th>Current version</th>
</tr>
<j:useBean var="dateFormatter" class="org.apache.maven.plugin.multichanges.util.DateFormatter"/>
<maven:get var="maven.multiproject.aggregateDir" plugin="maven-multiproject-plugin" property="maven.multiproject.aggregateDir"/>
<maven:get var="maven.multiproject.navigation" plugin="maven-multiproject-plugin" property="maven.multiproject.navigation"/>
<j:set var="navType" value="${maven.multiproject.navigation}"/>
<x:set var="projects" sort="@date" descending="true" select="project[not(@date = 'Not released') and not(@date = 'No information available')]"/>
<x:set var="projects" sort="last/release/@date" descending="true" select="project"/>
<j:forEach var="project" items="${projects}">
<j:set var="artifactId"><x:expr select="$project/@artifactId"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
</j:otherwise>
</j:choose>
<tr>
<td>
<a href="${baseUrl}/downloads.html"><x:expr select="$project/@name"/></a>
</td>
<td>
<j:set var="version"><x:expr select="$project/@version"/></j:set>
<a href="${baseUrl}/announcements/announcement-${version}.txt"><x:expr select="$project/@version"/></a>
</td>
<td>
<x:expr select="$project/@date"/>
</td>
<td>
<x:expr select="$project/@nextVersion"/>
</td>
</tr>
<j:set var="date"><x:expr select="$project/last/release/@date"/></j:set>
<j:if test="${dateFormatter.isChangesDate(date)}">
<j:set var="artifactId"><x:expr select="$project/@artifactId"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
</j:otherwise>
</j:choose>
<tr>
<td>
<a href="${baseUrl}/downloads.html"><x:expr select="$project/@name"/></a>
</td>
<td>
<j:set var="version"><x:expr select="$project/last/release/@version"/></j:set>
<a href="${baseUrl}/announcements/announcement-${version}.txt"><x:expr select="$project/last/release/@version"/></a>
</td>
<td>
<x:expr select="$project/last/release/@date"/>
</td>
</tr>
</j:if>
</j:forEach>
<x:set var="projects" sort="@date" descending="true" select="project[@date = 'Not released']"/>
<x:set var="projects" sort="@name" descending="true" select="project"/>
<j:forEach var="project" items="${projects}">
<j:set var="artifactId"><x:expr select="$project/@artifactId"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
</j:otherwise>
</j:choose>
<tr>
<td>
<a href="${baseUrl}/downloads.html"><x:expr select="$project/@name"/></a>
</td>
<td>
<x:expr select="$project/@version"/>
</td>
<td>
<x:expr select="$project/@date"/>
</td>
<td>
<x:expr select="$project/@nextVersion"/>
</td>
</tr>
</j:forEach>
<x:set var="projects" sort="@date" descending="true" select="project[@date = 'No information available']"/>
<j:forEach var="project" items="${projects}">
<j:set var="artifactId"><x:expr select="$project/@artifactId"/></j:set>
<j:set var="version"><x:expr select="$project/@version"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
</j:otherwise>
</j:choose>
<tr>
<j:choose>
<j:when test="${version eq 'No information available'}">
<td>
<x:expr select="$project/@name"/>
</td>
<td>
<x:expr select="$project/@version"/>
</td>
</j:when>
<j:otherwise>
<td>
<a href="${baseUrl}/downloads.html"><x:expr select="$project/@name"/></a>
</td>
<td>
<a href="${baseUrl}/announcements/announcement-${version}.txt"><x:expr select="$project/@version"/></a>
</td>
</j:otherwise>
</j:choose>
<td>
<x:expr select="$project/@date"/>
</td>
<td>
<x:expr select="$project/@nextVersion"/>
</td>
</tr>
<j:set var="date"><x:expr select="$project/last/release/@date"/></j:set>
<j:if test="${!dateFormatter.isChangesDate(date)}">
<j:set var="artifactId"><x:expr select="$project/@artifactId"/></j:set>
<j:choose>
<j:when test="${navType eq 'aggregate'}">
<j:set var="baseUrl" value="${maven.multiproject.aggregateDir}${artifactId}"/>
</j:when>
<j:otherwise>
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
</j:otherwise>
</j:choose>
<tr>
<td>
<a href="${baseUrl}"><x:expr select="$project/@name"/></a>
</td>
<td>
<x:expr select="$project/last/release/@version"/>
</td>
<td>
<x:expr select="$project/last/release/@date"/>
</td>
</tr>
</j:if>
</j:forEach>
</table>
</section>

View File

@ -20,7 +20,7 @@
-->
<jsl:stylesheet select="$doc" xmlns:jsl="jelly:jsl" xmlns:x="jelly:xml" xmlns:j="jelly:core" xmlns="dummy" trim="false">
<!-- This needs to be instantiated here to be available in the template matches -->
<j:useBean var="rssDateFormatter" class="org.apache.maven.plugin.multichanges.util.RssDateFormatter"/>
<j:useBean var="dateFormatter" class="org.apache.maven.plugin.multichanges.util.DateFormatter"/>
<jsl:template match="releases">
<rss version="2.0">
<channel>
@ -30,17 +30,20 @@
<lastBuildDate>${currentDate}</lastBuildDate>
<language>en-us</language>
<copyright>Copyright ${currentYear} ${pom.organization.name}</copyright>
<x:set var="projects" sort="@date" descending="true" select="project[not(@date = 'Not released') and not(@date = 'No information available')]"/>
<x:set var="projects" sort="last/release/@date" descending="true" select="project"/>
<j:forEach var="project" items="${projects}">
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
<j:set var="version"><x:expr select="$project/@version"/></j:set>
<j:set var="date"><x:expr select="$project/@date"/></j:set>
<j:set var="date"><x:expr select="$project/last/release/@date"/></j:set>
<j:if test="${dateFormatter.isChangesDate(date)}">
<j:set var="baseUrl"><x:expr select="$project/@url"/></j:set>
<j:set var="version"><x:expr select="$project/last/release/@version"/></j:set>
<j:set var="date"><x:expr select="$project/last/release/@date"/></j:set>
<item>
<title><x:expr select="$project/@name"/> <x:expr select="$project/@version"/> released.</title>
<title><x:expr select="$project/@name"/> <x:expr select="$project/last/release/@version"/> released.</title>
<link>${baseUrl}/announcements/announcement-${version}.txt</link>
<guid>${baseUrl}/announcements/announcement-${version}.txt</guid>
<pubDate>${rssDateFormatter.convertDate(date)}</pubDate>
<pubDate>${dateFormatter.convertDate(date)}</pubDate>
</item>
</j:if>
</j:forEach>
</channel>
</rss>

View File

@ -24,7 +24,9 @@
</properties>
<body>
<release version="1.3-SNAPSHOT" date="In SVN">
<action dev="aheritier" type="add">New page to describe the next releases.</action>
<action dev="aheritier" type="add">New RSS feed for releases.</action>
<action dev="aheritier" type="update">New internal format to store information about releases.</action>
<action dev="aheritier" type="update">Remove usage of the deprecated dependency-handle tag.</action>
</release>
<release version="1.2" date="2006-01-07">