- Several new addtions that makes the plugin more generic: the team name is now taken from <code>pom.groupId</code>, "[]" are removed from the first line, changes are sorted by type, changes report issue number and due-to, the download link is generated from <code>pom.distributionDirectory</code> and the "plugin has been tested with..." line has been removed.

- Removed default value for the <code>maven.announcement.version</code> property. This property has to be set by the plugin user.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol committed 2004-04-12 19:46:04 +00:00
1 parent 9279803b4f
commit 23603eaa0c
6 files changed
+109 -39

No files matched your search

+7 -1
View File
@@ -1,4 +1,5 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
@@ -17,7 +18,6 @@
*/
-->
<project
xmlns:j="jelly:core"
xmlns:x="jelly:xml"
@@ -32,6 +32,12 @@
<goal name="announcement:generate"
description="Generate release announcement">
<j:if test="${context.getVariable('maven.announcement.version') == null}">
<ant:fail>The 'maven.announcement.version' property needs to be defined.</ant:fail>
</j:if>
<j:echo>Generating announcement for release ${maven.announcement.version} ...</j:echo>
<util:file var="inputFile" name="${maven.docs.src}/changes.xml"/>
<x:parse var="doc" xml="${inputFile}"/>
+3 -2
View File
@@ -18,5 +18,6 @@
# Properties for the Announcement plugin
# -------------------------------------------------------------------
# Version for which to create a release note.
## maven.announcement.version = ${pom.currentVersion}
# Version for which to create a release note. This property needs to
# be defined in your project. For example:
# maven.announcement.version = 1.0
+12 -8
View File
@@ -26,7 +26,6 @@
<currentVersion>1.1-SNAPSHOT</currentVersion>
<shortDescription>Produce release announcement</shortDescription>
<url>http://maven.apache.org/reference/plugins/announcement/</url>
<issueTrackingUrl>http://jira.codehaus.org/BrowseProject.jspa?id=10470</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/announcement/</siteDirectory>
<repository>
@@ -34,6 +33,18 @@
<developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:maven-plugins/announcement/</developerConnection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/announcement/</url>
</repository>
<versions>
<version>
<id>1.0</id>
<name>1.0</name>
<tag>MAVEN_ANNOUNCEMENT_1_0</tag>
</version>
<version>
<id>1.1</id>
<name>1.1</name>
<tag>HEAD</tag>
</version>
</versions>
<developers>
<developer>
<name>Vincent Massol</name>
@@ -63,11 +74,4 @@
<report>maven-license-plugin</report>
<report>maven-linkcheck-plugin</report>
</reports>
<versions>
<version>
<id>1.0</id>
<name>1.0</name>
<tag>MAVEN_ANNOUNCEMENT_1_0</tag>
</version>
</versions>
</project>
@@ -16,21 +16,84 @@
<j:useBean var="formatter" class="org.apache.maven.announcement.Formatter"/>
<j:set var="header" value="The Maven team is pleased to announce the ${pom.name} ${versionVariable} release!"/>
<j:set var="formattedHeader" value="${formatter.format(header,78)}"/>
<!-- TODO: Find out why brackets are added -->
<j:whitespace trim="false">${formattedHeader}
<j:set var="header" trim="true">
The ${pom.groupId} team is pleased to announce the ${pom.name} ${versionVariable} release!
</j:set>
<j:forEach var="line" items="${formatter.format(header,78)}">
<j:whitespace trim="false">${line}
</j:whitespace>
</j:forEach>
<j:whitespace trim="false">
${pom.url}
Changes in this version include (last changes first):
Changes in this version include:</j:whitespace>
<x:set var="actions" select="action[@type='add']" sort="@type" />
<j:if test="${!empty(actions)}">
<j:whitespace trim="false">
New Features:
</j:whitespace>
<j:forEach var="action" items="${actions}">
<x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
</j:forEach>
</j:if>
<x:set var="actions" select="action[@type='fix']" sort="@type" />
<j:if test="${!empty(actions)}">
<j:whitespace trim="false">
Fixed bugs:
</j:whitespace>
<j:forEach var="action" items="${actions}">
<x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
</j:forEach>
</j:if>
<x:set var="actions" select="action[@type='update']" sort="@type" />
<j:if test="${!empty(actions)}">
<j:whitespace trim="false">
Changes:
</j:whitespace>
<j:forEach var="action" items="${actions}">
<x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
</j:forEach>
</j:if>
<x:set var="actions" select="action[@type='remove']" sort="@type" />
<j:if test="${!empty(actions)}">
<j:whitespace trim="false">
Removed features:
</j:whitespace>
<j:forEach var="action" items="${actions}">
<x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
</j:forEach>
</j:if>
<j:whitespace trim="false">
You can download the ${pom.name} here:
${pom.distributionDirectory}
Have fun!
-The development team
</j:whitespace>
<x:forEach var="action" select="action">
<x:set var="text" select="string($action)"/>
</j:if>
</jsl:template>
<jsl:template match="action" trim="true">
<x:set var="body" select="string(.)"/>
<j:set var="counter" value=""/>
<j:set var="issue"><x:expr select="@issue"/></j:set>
<j:set var="dueto"><x:expr select="@due-to"/></j:set>
<j:set var="text" trim="true">
${body}<j:if test="${issue != ''}"> Fixes ${issue}.</j:if> <j:if test="${dueto != ''}"> Thanks to ${dueto}.</j:if>
</j:set>
<j:forEach var="line" items="${formatter.format(text,75)}">
<j:choose>
<j:when test="${counter.length() == '0'}">
@@ -42,25 +105,8 @@ o ${line}</j:whitespace>
${line}</j:whitespace>
</j:otherwise>
</j:choose>
<!-- TODO: Add reference to issue number if there's any -->
<j:set var="counter" value="${counter}X"/>
</j:forEach>
</x:forEach>
<j:whitespace trim="false">
This plugin has been tested with Maven [TODO]. Using it with
another version of Maven is at your own risks! :-)
You can download the ${pom.name} here:
${maven.repo.remote}/${pom.groupId}/jars/${pom.artifactId}-${versionVariable}.jar
Have fun!
-The development team
</j:whitespace>
</j:if>
</jsl:template>
<jsl:template match="@*"/>
+13
View File
@@ -24,6 +24,19 @@
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<release version="1.1" date="in CVS">
<action dev="vmassol" type="add" issue="MPANNOUNCEMENT-1">
Several new addtions that makes the plugin more generic:
the team name is now taken from <code>pom.groupId</code>,
"[]" are removed from the first line, changes are sorted by
type, changes report issue number and due-to, the download
link is generated from <code>pom.distributionDirectory</code>
and the "plugin has been tested with..." line has been removed.
</action>
<action dev="vmassol" type="update">
Removed default value for the <code>maven.announcement.version</code>
property. This property has to be set by the plugin user.</action>
</release>
<release version="1.0" date="2004-03-10">
<action dev="evenisse" type="update">Update to ASL v.2</action>
<action dev="jvanzyl" type="update">Remove the need for ${pom} interpolation in properties. The use of the maven:property tag is now used to glean a default property.</action>
+2 -2
View File
@@ -30,12 +30,12 @@
<tr><th>Property</th><th>Optional?</th><th>Description</th><th>Default</th></tr>
<tr>
<td>maven.announcement.version</td>
<td>Yes</td>
<td>No</td>
<td>
Version for which to create a release note.
</td>
<td>
${pom.currentVersion}
No default value
</td>
</tr>
</table>