vmassol 2004/04/18 13:59:42
Modified: announcement/xdocs navigation.xml changes.xml properties.xml
announcement/src/plugin-resources announcement.jsl
announcement plugin.jelly plugin.properties
Log:
Applied MPANNOUNCEMENT-2. Added more information when running the plugin. Also added
a check to verify if the announcement version matches an entry in the
<code>changes.xml</code> file. Thanks Fabrizio!
Revision Changes Path
1.3 +5 -2 maven-plugins/announcement/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/xdocs/navigation.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- navigation.xml 4 Mar 2004 17:58:48 -0000 1.2
+++ navigation.xml 18 Apr 2004 20:59:42 -0000 1.3
@@ -23,11 +23,14 @@
<body>
<links>
- <item name="Maven" href="http://maven.apache.org/"/>
+ <item name="Maven" href="http://maven.apache.org/"/>
</links>
<menu name="Overview">
- <item name="Goals" href="/goals.html" />
+ <item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
+ </menu>
+ <menu name="Downloads">
+ <item name="Announcement plugin 1.0"
href="http://www.ibiblio.org/maven/maven/plugins/maven-announcement-plugin-1.0.jar"/>
</menu>
</body>
</project>
1.7 +7 -5 maven-plugins/announcement/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/xdocs/changes.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- changes.xml 12 Apr 2004 19:46:04 -0000 1.6
+++ changes.xml 18 Apr 2004 20:59:42 -0000 1.7
@@ -25,17 +25,19 @@
</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:
+ <action dev="vmassol" type="add" issue="MPANNOUNCEMENT-2" due-to="Fabrizio
Giustina">
+ Added more information when running the plugin. Also added a check to
+ verify if the announcement version matches an entry in the
+ <code>changes.xml</code> file.
+ </action>
+ <action dev="vmassol" type="add" issue="MPANNOUNCEMENT-1" due-to="Fabrizio
Giustina">
+ Several new additions 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>
1.4 +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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- properties.xml 12 Apr 2004 19:46:04 -0000 1.3
+++ properties.xml 18 Apr 2004 20:59:42 -0000 1.4
@@ -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>No</td>
+ <td>Yes</td>
<td>
Version for which to create a release note.
</td>
<td>
- No default value
+ <code>${pom.version}</code>
</td>
</tr>
</table>
1.6 +1 -1 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- announcement.jsl 12 Apr 2004 19:46:04 -0000 1.5
+++ announcement.jsl 18 Apr 2004 20:59:42 -0000 1.6
@@ -73,7 +73,7 @@
<j:whitespace trim="false">
You can download the ${pom.name} here:
-${pom.distributionDirectory}
+${pom.url}
Have fun!
-The development team
1.4 +22 -4 maven-plugins/announcement/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/plugin.jelly,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- plugin.jelly 12 Apr 2004 19:46:03 -0000 1.3
+++ plugin.jelly 18 Apr 2004 20:59:42 -0000 1.4
@@ -24,7 +24,9 @@
xmlns:ant="jelly:ant"
xmlns:define="jelly:define"
xmlns:util="jelly:util"
- xmlns:doc="doc">
+ xmlns:doc="doc"
+ xmlns:maven="jelly:maven"
+ xmlns:jsl="jelly:jsl">
<goal name="announcement" prereqs="announcement:generate"
description="Generate release announcement"/>
@@ -35,12 +37,28 @@
<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>
+
+ <echo>Generating announcement for release ${maven.announcement.version}
...</echo>
<util:file var="inputFile" name="${maven.docs.src}/changes.xml"/>
<x:parse var="doc" xml="${inputFile}"/>
-
+
+ <maven:property var="versionVariable" name="maven.announcement.version"
defaultValue="${pom.currentVersion}"/>
+
+ <jsl:stylesheet select="$doc">
+ <jsl:template match="document/body/release">
+ <x:set var="version" select="string(@version)"/>
+ <j:if test="${versionVariable.equals(version)}">
+ <x:set var="versionFound" select="string(@version)"/>
+ </j:if>
+ </jsl:template>
+ </jsl:stylesheet>
+
+ <j:if test="${versionFound == null}">
+ <ant:fail>The release '${maven.announcement.version}' could not be found in
change log</ant:fail>
+ </j:if>
+
+
<j:set var="stylesheetURI"
value="file:${plugin.resources}/announcement.jsl"/>
<j:file
1.5 +1 -1 maven-plugins/announcement/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/announcement/plugin.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- plugin.properties 12 Apr 2004 19:46:03 -0000 1.4
+++ plugin.properties 18 Apr 2004 20:59:42 -0000 1.5
@@ -20,4 +20,4 @@
# Version for which to create a release note. This property needs to
# be defined in your project. For example:
-# maven.announcement.version = 1.0
+maven.announcement.version = ${pom.version}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]