You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2004/04/12 21:46:04 UTC
cvs commit: maven-plugins/announcement/src/plugin-resources announcement.jsl
vmassol 2004/04/12 12:46:04
Modified: announcement project.xml plugin.jelly plugin.properties
announcement/xdocs changes.xml properties.xml
announcement/src/plugin-resources announcement.jsl
Log:
- 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.
Revision Changes Path
1.10 +12 -8 maven-plugins/announcement/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/project.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- project.xml 10 Apr 2004 00:59:22 -0000 1.9
+++ project.xml 12 Apr 2004 19:46:03 -0000 1.10
@@ -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>
1.3 +7 -1 maven-plugins/announcement/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/plugin.jelly,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- plugin.jelly 4 Mar 2004 17:58:48 -0000 1.2
+++ plugin.jelly 12 Apr 2004 19:46:03 -0000 1.3
@@ -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"
@@ -31,6 +31,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}"/>
1.4 +3 -2 maven-plugins/announcement/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/plugin.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- plugin.properties 4 Mar 2004 17:58:48 -0000 1.3
+++ plugin.properties 12 Apr 2004 19:46:03 -0000 1.4
@@ -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
1.6 +13 -0 maven-plugins/announcement/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/xdocs/changes.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- changes.xml 10 Mar 2004 12:53:33 -0000 1.5
+++ changes.xml 12 Apr 2004 19:46:04 -0000 1.6
@@ -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>
1.3 +2 -2 maven-plugins/announcement/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/xdocs/properties.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- properties.xml 4 Mar 2004 17:58:48 -0000 1.2
+++ properties.xml 12 Apr 2004 19:46:04 -0000 1.3
@@ -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>
1.5 +71 -25 maven-plugins/announcement/src/plugin-resources/announcement.jsl
Index: announcement.jsl
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/src/plugin-resources/announcement.jsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- announcement.jsl 6 Jan 2004 20:48:07 -0000 1.4
+++ announcement.jsl 12 Apr 2004 19:46:04 -0000 1.5
@@ -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)}"/>
+ <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}
- <!-- TODO: Find out why brackets are added -->
+Changes in this version include:</j:whitespace>
- <j:whitespace trim="false">${formattedHeader}
+ <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>
-${pom.url}
+ <j:whitespace trim="false">
+
+You can download the ${pom.name} here:
+${pom.distributionDirectory}
-Changes in this version include (last changes first):
+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 @@
${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="@*"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org