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 2003/11/16 23:48:57 UTC
cvs commit: maven-plugins project.properties
vmassol 2003/11/16 14:48:57
Modified: . project.properties
Added: announcement project.xml project.properties .cvsignore
plugin.jelly plugin.properties
announcement/xdocs changes.xml .cvsignore navigation.xml
goals.xml index.xml properties.xml
announcement/src/plugin-resources announcement.jsl
announcement/src/main/org/apache/maven/announcement
Formatter.java
Log:
New plugin. Automatically generate release notes.
Revision Changes Path
1.1 maven-plugins/announcement/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<extend>../project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-announcement-plugin</id>
<name>Maven Announcement plugin</name>
<currentVersion>1.0-SNAPSHOT</currentVersion>
<shortDescription>Produce release announcement</shortDescription>
<url>http://maven.apache.org/reference/plugins/announcement/</url>
<!-- TODO: Create JIRA project and replace xxxx by JIRA project id -->
<issueTrackingUrl>http://jira.codehaus.org/BrowseProject.jspa?id=xxxx</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/announcement/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/announcement/</connection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/announcement/</url>
</repository>
<developers>
<developer>
<name>Vincent Massol</name>
<id>vmassol</id>
<email>vmassol@pivolis.com</email>
<organization>Pivolis</organization>
<roles>
<role>Creator</role>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<dependencies/>
<reports>
<report>maven-changes-plugin</report>
<report>maven-changelog-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-license-plugin</report>
<report>maven-linkcheck-plugin</report>
</reports>
</project>
1.1 maven-plugins/announcement/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.license.licenseFile=${basedir}/../LICENSE.txt
1.1 maven-plugins/announcement/.cvsignore
Index: .cvsignore
===================================================================
target
velocity.log
maven.log
build.properties
.classpath
.project
1.1 maven-plugins/announcement/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:x="jelly:xml"
xmlns:ant="jelly:ant"
xmlns:define="jelly:define"
xmlns:util="jelly:util"
xmlns:doc="doc">
<goal name="announcement" prereqs="announcement:generate"
description="Generate release announcement"/>
<goal name="announcement:generate"
description="Generate release announcement">
<util:file var="inputFile" name="${maven.docs.src}/changes.xml"/>
<x:parse var="doc" xml="${inputFile}"/>
<j:set var="stylesheetURI"
value="file:${plugin.resources}/announcement.jsl"/>
<j:file
name="${maven.build.dir}/announcement.txt"
outputMode="xml"
omitXmlDeclaration="true"
prettyPrint="false">
<j:include uri="${stylesheetURI.toString()}"/>
</j:file>
</goal>
<goal name="announcement:text" prereqs="announcement:generate"
description="Generate release announcement">
<util:file var="inputFile" name="${maven.docs.src}/changes.xml"/>
<x:parse var="doc" xml="${inputFile}"/>
<j:set var="stylesheetURI"
value="file:${plugin.resources}/announcement.jsl"/>
<j:file
name="${maven.build.dir}/announcement.xml"
outputMode="xml"
prettyPrint="false">
<j:include uri="${stylesheetURI.toString()}"/>
</j:file>
</goal>
</project>
1.1 maven-plugins/announcement/plugin.properties
Index: plugin.properties
===================================================================
# -------------------------------------------------------------------
# Properties for the Announcement plugin
# -------------------------------------------------------------------
# Version for which to create a release note.
maven.announcement.version = ${pom.currentVersion}
1.1 maven-plugins/announcement/xdocs/changes.xml
Index: changes.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Announcement plugin changes</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<release version="1.0" date="in CVS">
<action dev="vmassol" type="add">
Initial creation.
</action>
</release>
</body>
</document>
1.1 maven-plugins/announcement/xdocs/.cvsignore
Index: .cvsignore
===================================================================
stylesheets
1.1 maven-plugins/announcement/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven Announcement plugin">
<title>Maven Announcement plugin</title>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
</menu>
</body>
</project>
1.1 maven-plugins/announcement/xdocs/goals.xml
Index: goals.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Announcement plugin goals</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<section name="Goals">
<table>
<tr><th>Goal</th><th>Description</th></tr>
<tr>
<td>announcement:text</td>
<td>
Generate text release announcement.
</td>
</tr>
</table>
</section>
</body>
</document>
1.1 maven-plugins/announcement/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Announcement plugin</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<section name="Maven Announcement plugin">
<p>
Generates release announcements. It takes information from the
POM and from the <code>changes.xml</code> file and using a template
generates release information.
</p>
</section>
</body>
</document>
1.1 maven-plugins/announcement/xdocs/properties.xml
Index: properties.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>Announcement plugin properties</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<section name="Announcement plugin properties">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th><th>Default</th></tr>
<tr>
<td>maven.announcement.version</td>
<td>Yes</td>
<td>
Version for which to create a release note.
</td>
<td>
${pom.currentVersion}
</td>
</tr>
</table>
</section>
</body>
</document>
1.1 maven-plugins/announcement/src/plugin-resources/announcement.jsl
Index: announcement.jsl
===================================================================
<?xml version="1.0"?>
<jsl:stylesheet
select="$doc"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:x="jelly:xml"
xmlns="dummy" trim="true">
<jsl:template match="document/body/release">
<x:set var="version" select="string(@version)"/>
<j:set var="versionVariable" value="${context.getVariable('maven.announcement.version')}"/>
<j:if test="${versionVariable.equals(version)}">
<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:expr value="${formattedHeader}"/>
<!-- TODO: Need line break here -->
<j:expr value="${pom.url}"/>
<!-- TODO: Need line break here -->
<j:expr value="Changes in this version include (last changes first):"/>
<x:forEach var="action" select="action">
<x:set var="text" select="string($action)"/>
<j:expr value="o "/>
<j:forEach var="line" items="${formatter.format(text,75)}">
<!-- TODO: Need to add 3 spaces on second line and thereafter -->
<j:expr value="${line}"/>
</j:forEach>
</x:forEach>
<!-- TODO: Need line break here -->
<j:expr value="This plugin has been tested with Maven [TODO]. Using it with"/>
<j:expr value="another version of Maven is at your own risks! :-)"/>
<!-- TODO: Need line break here -->
<j:expr value="You can download the ${pom.name} here:"/>
<j:expr value="${maven.repo.remote}/${pom.groupId}/jars/${pom.artifactId}-${versionVariable}.jar"/>
<!-- TODO: Need line break here -->
<j:expr value="Have fun!"/>
<j:expr value="-The development team"/>
</j:if>
</jsl:template>
<jsl:template match="@*"/>
<jsl:template match="text()"/>
</jsl:stylesheet>
1.1 maven-plugins/announcement/src/main/org/apache/maven/announcement/Formatter.java
Index: Formatter.java
===================================================================
package org.apache.maven.announcement;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Maven" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Maven", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
/**
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
*
* @version $Id: Formatter.java,v 1.1 2003/11/16 22:48:57 vmassol Exp $
*/
public class Formatter
{
public static List format(String text, int column)
{
StringTokenizer st = new StringTokenizer(text, " \t\r\n");
List strings = new ArrayList();
StringBuffer buffer = new StringBuffer();
while (st.hasMoreTokens())
{
String token = (String) st.nextToken();
if (buffer.length() + token.length() <= column)
{
buffer.append(token);
buffer.append(' ');
}
else
{
buffer.append('\r');
buffer.append('\n');
strings.add(buffer.toString());
buffer = new StringBuffer();
buffer.append(token);
buffer.append(' ');
}
}
buffer.append('\r');
buffer.append('\n');
strings.add(buffer.toString());
return strings;
}
}
1.3 +4 -0 maven-plugins/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/maven-plugins/project.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.properties 5 Oct 2003 07:57:37 -0000 1.2
+++ project.properties 16 Nov 2003 22:48:57 -0000 1.3
@@ -5,6 +5,10 @@
# Enable HTML to xdoc transformation
maven.html2xdoc.enabled=true
+# Choose aggregators to use for the dashboard plugin report
+maven.dashboard.aggregators = csall,clovertpc,cloverloc,cloverncloc
+maven.clover.report.xml=true
+
#------------------------------------------------------------------
# M U L T I P R O J E C T - A L L P L U G I N G S
#------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org