vmassol     2004/06/29 13:39:56

  Modified:    changes  project.xml plugin.jelly
               changes/src/plugin-resources changes.jsl
               changes/xdocs changes.xml
  Added:       changes/src/plugin-resources/images rss.png
               changes/src/plugin-resources changes2rss.jsl
  Log:
  Add generation of RSS feed for current version changes
  
  Revision  Changes    Path
  1.31      +5 -0      maven-plugins/changes/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/changes/project.xml,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- project.xml       29 Jun 2004 11:56:33 -0000      1.30
  +++ project.xml       29 Jun 2004 20:39:56 -0000      1.31
  @@ -44,6 +44,11 @@
         <name>1.4</name>
         <tag>MAVEN_CHANGES_1_4</tag>
       </version>
  +    <version>
  +      <id>1.5</id>
  +      <name>1.5</name>
  +      <tag>HEAD</tag>
  +    </version>
     </versions>
     <developers>
       <developer>
  
  
  
  1.13      +14 -1     maven-plugins/changes/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/changes/plugin.jelly,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- plugin.jelly      4 Mar 2004 18:40:24 -0000       1.12
  +++ plugin.jelly      29 Jun 2004 20:39:56 -0000      1.13
  @@ -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:ant="jelly:ant"
  @@ -56,6 +56,19 @@
         outputMode="xml"
         prettyPrint="true"
         />
  +
  +    <!-- Generate a RSS feed of the changes -->
  +    <doc:jsl
  +      input="${maven.docs.src}/changes.xml"
  +      output="changes.rss"
  +      stylesheet="${plugin.resources}/changes2rss.jsl"
  +      encoding="${maven.docs.outputencoding}"
  +      outputMode="xml"
  +      prettyPrint="true"/>
  +
  +    <!-- Copy the RSS XML logo -->
  +    <mkdir dir="${maven.docs.dest}/images"/>
  +    <copy todir="${maven.docs.dest}/images" 
file="${plugin.resources}/images/rss.png"/>
       
     </goal>
   
  
  
  
  1.1                  maven-plugins/changes/src/plugin-resources/images/rss.png
  
        <<Binary file>>
  
  
  1.13      +1 -0      maven-plugins/changes/src/plugin-resources/changes.jsl
  
  Index: changes.jsl
  ===================================================================
  RCS file: /home/cvs/maven-plugins/changes/src/plugin-resources/changes.jsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- changes.jsl       7 May 2004 18:36:46 -0000       1.12
  +++ changes.jsl       29 Jun 2004 20:39:56 -0000      1.13
  @@ -52,6 +52,7 @@
                           </tr>
                       </x:forEach>
                   </table>
  +                <p>Get the RSS feed of the last changes <a href="changes.rss"><img 
src="images/rss.png"/></a></p>
               </section>
               <!-- Release information -->
               <jsl:applyTemplates select="*"/>
  
  
  
  1.1                  maven-plugins/changes/src/plugin-resources/changes2rss.jsl
  
  Index: changes2rss.jsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>

  

  <!--

   * ========================================================================

   * 

   * Copyright 2004 The Apache Software Foundation.

   *

   * Licensed 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.

   * 

   * ========================================================================

  -->

  

  <jsl:stylesheet

    select="$doc"

    xmlns:j="jelly:core"

    xmlns:jsl="jelly:jsl"

    xmlns:util="jelly:util"

    xmlns:x="jelly:xml"

    xmlns:doc="doc"

    xmlns="dummy" trim="true">

  

    <jsl:template match="document">

      <rss version="0.91">

        <channel>

          <title>Changes report</title> 

          <link>${pom.url}</link> 

          <description>Changes report</description>

          <language>en-us</language>

          <copyright>Copyright 2004 The Apache Software Foundation</copyright>

          <item>

  

            <j:set var="changesCount"><x:expr select="count(//[EMAIL 
PROTECTED]'${pom.currentVersion}']/action)"/></j:set>

  

            <title>${changesCount} change(s) for version ${pom.currentVersion}</title>

            

            <!-- If we don't go through a tmp variable Jelly inserts a space between 
${pom.url} 

                 and '/changes-report.html'. Go figure... -->

            <j:set var="link" value="${pom.url}/changes-report.html"/>

            

            <link>${link}</link> 

            <description>

              <table border="1">

                <tr><th style='width:50px'>Type</th><th>Changes</th><th 
style='width:70px'>By</th></tr>             

                <x:forEach var="action" select="//[EMAIL 
PROTECTED]'${pom.currentVersion}']/action">

                  <j:set var="type"><x:expr select="@type"/></j:set>

                  <j:set var="dev"><x:expr select="@dev"/></j:set>

                  <j:set var="issue"><x:expr select="@issue"/></j:set>

                  <j:set var="dueto"><x:expr select="@due-to"/></j:set>

                  <j:set var="duetoemail"><x:expr select="@due-to-email"/></j:set>

                  <tr>

                    <td>${type}</td>

                    <td>

                      <x:expr select="string($action)"/>

  

                      <j:if test="${issue != ''}">

                        <j:useBean var="finder" 
class="org.apache.maven.changes.IssueFinder"/>

                        <j:set var="template" value="${maven.changes.issue.template}"/>

                        <j:set var="trackerURL" value="${pom.issueTrackingUrl}"/>

                        Fixes <a 
href="${finder.getIssueURL(trackerURL,issue,template)}">${issue}</a>.

                      </j:if>

  

                      <j:if test="${dueto != ''}">

                        <j:choose>

                          <j:when test="${duetoemail != ''}">

                            Thanks to <a href="mailto:${duetoemail}";>${dueto}</a>.

                          </j:when>

                          <j:otherwise>

                            Thanks to ${dueto}.

                          </j:otherwise>

                        </j:choose>

                      </j:if>

  

                    </td>

                    <td>

                      <j:set var="teamLink" value="${pom.url}/team-list.html#${dev}"/>

                      <a href="${teamLink}">${dev}</a>

                    </td>

                  </tr>               

  

                </x:forEach>

              </table>

            </description>

          </item>

        </channel>

      </rss>

    </jsl:template>

  

  </jsl:stylesheet>

  
  
  
  1.24      +3 -0      maven-plugins/changes/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/changes/xdocs/changes.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- changes.xml       29 Jun 2004 11:56:33 -0000      1.23
  +++ changes.xml       29 Jun 2004 20:39:56 -0000      1.24
  @@ -25,6 +25,9 @@
     </properties>
     <body>
       <release version="1.5-SNAPSHOT" date="in CVS">
  +      <action dev="dion" type="add">
  +        Add generation of RSS feed for current version changes
  +      </action>
         <action dev="dion" type="update">Use assert taglib in plugin test 
project</action>
       </release>
       <release version="1.4" date="2004-05-15">
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to