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!
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115023 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}
|
||||
@@ -73,7 +73,7 @@ Changes in this version include:</j:whitespace>
|
||||
<j:whitespace trim="false">
|
||||
|
||||
You can download the ${pom.name} here:
|
||||
${pom.distributionDirectory}
|
||||
${pom.url}
|
||||
|
||||
Have fun!
|
||||
-The development team
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user