You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2007/01/02 08:37:57 UTC

svn commit: r491756 - in /jakarta/commons/proper/dbcp/trunk: project.properties release-notes.jsl

Author: psteitz
Date: Mon Jan  1 23:37:56 2007
New Revision: 491756

URL: http://svn.apache.org/viewvc?view=rev&rev=491756
Log:
Added jsl and properties so maven announcement plugin can generate RELEASE-NOTES.txt

Added:
    jakarta/commons/proper/dbcp/trunk/release-notes.jsl
Modified:
    jakarta/commons/proper/dbcp/trunk/project.properties

Modified: jakarta/commons/proper/dbcp/trunk/project.properties
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/project.properties?view=diff&rev=491756&r1=491755&r2=491756
==============================================================================
--- jakarta/commons/proper/dbcp/trunk/project.properties (original)
+++ jakarta/commons/proper/dbcp/trunk/project.properties Mon Jan  1 23:37:56 2007
@@ -53,4 +53,8 @@
 maven.junit.sysproperties=org.xml.sax.driver
 org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
 
+# Use "maven announcement" to generate release notes text file
+maven.announcement.file=${basedir}/RELEASE-NOTES.txt
+maven.announcement.stylesheet.path=${basedir}/release-notes.jsl
+
 

Added: jakarta/commons/proper/dbcp/trunk/release-notes.jsl
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbcp/trunk/release-notes.jsl?view=auto&rev=491756
==============================================================================
--- jakarta/commons/proper/dbcp/trunk/release-notes.jsl (added)
+++ jakarta/commons/proper/dbcp/trunk/release-notes.jsl Mon Jan  1 23:37:56 2007
@@ -0,0 +1,171 @@
+<?xml version="1.0"?>
+
+<!--
+ * ========================================================================
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ========================================================================
+-->
+
+<!--
+ Customized version of maven annnouncement plugin style sheet to create
+ release notes for commons-dbcp.  Customizations are:
+ *
+ * Add a title
+ * Display the description attribute in the release at the beginning
+ * Add a heading to the project description and move the URL to follow
+ * Get rid of "have fun" sig-like thingy
+ * Add blank lines between issues and otherwise clean up formatting
+-->
+    
+<jsl:stylesheet
+    select="$doc"
+    xmlns:j="jelly:core"
+    xmlns:jsl="jelly:jsl"
+    xmlns:x="jelly:xml"
+    xmlns:u="jelly:util"
+    xmlns:maven="jelly:maven"
+    xmlns="dummy" trim="true">
+
+  <!-- This stylesheet expects the versionVariable to be defined before calling it -->
+  <jsl:template match="document/body/release">
+
+    <x:set var="version" select="string(@version)"/>
+    <x:set var="description" select="string(@description)"/>
+    <j:if test="${versionVariable.equals(version)}">
+      <j:whitespace trim="false">
+                        Jakarta Commons DBCP Version ${version} 
+                                   RELEASE NOTES
+
+      </j:whitespace>
+
+      <j:useBean var="formatter" class="org.apache.maven.announcement.Formatter"/>
+
+      <j:set var="header" trim="true" value="${description}"/>
+
+<j:forEach var="line" items="${formatter.format(header,78)}">
+<j:whitespace trim="false">
+${line}</j:whitespace>
+</j:forEach>
+
+For more information on Jakarta Commons DBCP, see
+${pom.url}
+      <j:whitespace trim="false">
+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">
+
+  Additions:
+</j:whitespace>
+        <j:forEach var="action" items="${actions}">
+          <x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
+          <j:whitespace trim="false">
+          </j:whitespace>
+        </j:forEach>
+      </j:if>
+      <x:set var="actions" select="action[@type='fix']" sort="@type" />
+        <j:if test="${!empty(actions)}">
+<j:whitespace trim="false">
+
+  Bug fixes:
+</j:whitespace>
+        <j:forEach var="action" items="${actions}">
+          <x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
+          <j:whitespace trim="false">
+          </j:whitespace>
+        </j:forEach>
+      </j:if>
+      <x:set var="actions" select="action[@type='update']" sort="@type" />
+        <j:if test="${!empty(actions)}">
+<j:whitespace trim="false">
+
+  Enhancements:
+</j:whitespace>
+        <j:forEach var="action" items="${actions}">
+          <x:set var="item" select="."/><jsl:applyTemplates select="$action"/>
+          <j:whitespace trim="false">
+          </j:whitespace>
+        </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>
+
+      <!-- Nasty hack to detect a plugin until pom.type exists -->
+      <u:available file="${basedir}/plugin.jelly">
+        <j:whitespace trim="false"> 
+
+To automatically install the plugin, type the following on a single line:
+
+maven plugin:download 
+  -DgroupId=${pom.groupId} 
+  -DartifactId=${pom.artifactId}
+  -Dversion=${versionVariable}
+
+For a manual installation, you can download the plugin here:
+${distributionUrl}/${pom.artifactId}-${versionVariable}.jar
+        </j:whitespace>
+      </u:available>
+      <j:whitespace trim="false"> 
+
+      </j:whitespace>
+    </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">
+      <j:if test="${issue != ''}"><j:whitespace>${issue}.</j:whitespace></j:if>
+      ${body}
+      <j:if test="${dueto != ''}"><j:whitespace> Thanks to ${dueto}.</j:whitespace></j:if>
+    </j:set>
+        
+    <j:forEach var="line" items="${formatter.format(text,75)}">
+      <j:choose>
+        <j:when test="${counter.length() == '0'}">
+          <j:whitespace trim="false">
+* ${line}</j:whitespace>
+        </j:when>
+        <j:otherwise>
+          <j:whitespace trim="false">
+  ${line}</j:whitespace>
+        </j:otherwise>
+      </j:choose>
+      <j:set var="counter" value="${counter}X"/>
+    </j:forEach>
+  </jsl:template>
+
+  <jsl:template match="@*"/>
+
+  <jsl:template match="text()"/>
+
+</jsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org