From: Morten K. <mor...@us...> - 2005-04-05 15:57:39
|
mortenkr 05/04/05 08:57:24 Modified: news/xdocs properties.xml index.xml news.xml news plugin.properties plugin.jelly project.xml news/src/plugin-resources news2rss.jsl news.jsl Log: Updated with input from Lukas Theussl Revision Changes Path 1.2 +8 -0 maven-plugins/news/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/xdocs/properties.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- properties.xml 7 Mar 2005 10:34:45 -0000 1.1 +++ properties.xml 5 Apr 2005 15:57:23 -0000 1.2 @@ -12,6 +12,14 @@ <th>Optional?</th> <th>Description</th> </tr> + <tr> + <td>maven.news.header</td> + <td>Yes</td> + <td> + <p>Header for news page. Default value is + <code>News</code>.</p> + </td> + </tr> <tr> <td>maven.news.stylesheet</td> <td>Yes</td> 1.2 +29 -5 maven-plugins/news/xdocs/index.xml Index: index.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/xdocs/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.xml 7 Mar 2005 10:34:45 -0000 1.1 +++ index.xml 5 Apr 2005 15:57:23 -0000 1.2 @@ -12,17 +12,41 @@ <pre> <document> + <body> + <news> + <entry name="05.04.2005"> + <p> + My second news + </p> + </entry> + <entry name="18.03.2005"> + <p> + My first news + </p> + </entry> + </news> + </body> +</document> +</pre> + You may also add additional info to the news.xml file: + <br/> + +<pre> +<document> <body> + <section name="Current status (05.04.2005)"> + <p> + Plugin is currently under revision. + </p> + </section> - <news header="My news header" date="13.01.05"> - The actual news text. + <news> + ..entries.. </news> - </body> - </document> -</pre> +</pre> In addition, add the following line to your reports section in POM: 1.2 +17 -2 maven-plugins/news/xdocs/news.xml Index: news.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/xdocs/news.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- news.xml 7 Mar 2005 10:34:45 -0000 1.1 +++ news.xml 5 Apr 2005 15:57:23 -0000 1.2 @@ -3,8 +3,23 @@ <body> - <news header="Version 1.0 of plugin released" date="01.04.2005"> - The first version(1.0) of the maven-news-plugin is released. + <section name="Current status (05.04.2005)"> + <p> + Plugin is currently under revision. + </p> + </section> + + <news> + <entry name="05.04.2005"> + <p> + Plugin updated with input from Lukas Theussl. + </p> + </entry> + <entry name="18.03.2005"> + <p> + Plugin is commited to CVS; to be revised. + </p> + </entry> </news> </body> 1.2 +2 -1 maven-plugins/news/plugin.properties Index: plugin.properties =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/plugin.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- plugin.properties 7 Mar 2005 10:34:44 -0000 1.1 +++ plugin.properties 5 Apr 2005 15:57:24 -0000 1.2 @@ -1,3 +1,4 @@ # Default props maven.news.stylesheet=${plugin.resources}/news.jsl -maven.news.rss.stylesheet=${plugin.resources}/news2rss.jsl \ No newline at end of file +maven.news.rss.stylesheet=${plugin.resources}/news2rss.jsl +maven.news.header=News \ No newline at end of file 1.2 +1 -1 maven-plugins/news/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/plugin.jelly,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- plugin.jelly 7 Mar 2005 10:34:44 -0000 1.1 +++ plugin.jelly 5 Apr 2005 15:57:24 -0000 1.2 @@ -28,7 +28,7 @@ stylesheet="${maven.news.stylesheet}" encoding="${maven.docs.outputencoding}" outputMode="xml" - prettyPrint="true" /> + prettyPrint="false" /> <!-- Generate a RSS feed --> <doc:jsl 1.2 +7 -0 maven-plugins/news/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 7 Mar 2005 10:34:43 -0000 1.1 +++ project.xml 5 Apr 2005 15:57:24 -0000 1.2 @@ -54,6 +54,13 @@ </developer> </developers> + <contributors> + <contributor> + <name>Lukas Theussl</name> + <email>th...@tr...</email> + </contributor> + </contributors> + <reports> <report>maven-news-plugin</report> <report>maven-changes-plugin</report> 1.2 +4 -5 maven-plugins/news/src/plugin-resources/news2rss.jsl Index: news2rss.jsl =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/src/plugin-resources/news2rss.jsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- news2rss.jsl 7 Mar 2005 10:34:46 -0000 1.1 +++ news2rss.jsl 5 Apr 2005 15:57:24 -0000 1.2 @@ -26,11 +26,10 @@ </image> </j:if> - <x:forEach var="news" select="//news"> + <x:forEach var="entry" select="//entry"> <item> - <j:set var="thedate"><x:expr select="@date"/></j:set> - <j:set var="theheader"><x:expr select="@header"/></j:set> - <title>${theheader} - ${thedate}</title> + <j:set var="thename"><x:expr select="@name"/></j:set> + <title>${thename}</title> <!-- If we don't go through a tmp variable Jelly inserts a space between ${pom.url} and '/changes-report.html'. Go figure... --> @@ -39,7 +38,7 @@ <description> <table border="1"> - <tr><td><x:expr select="string($news)"/></td></tr> + <tr><td><x:expr select="string($entry)"/></td></tr> </table> </description> </item> 1.2 +32 -33 maven-plugins/news/src/plugin-resources/news.jsl Index: news.jsl =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/news/src/plugin-resources/news.jsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- news.jsl 7 Mar 2005 10:34:47 -0000 1.1 +++ news.jsl 5 Apr 2005 15:57:24 -0000 1.2 @@ -6,43 +6,42 @@ xmlns:jsl="jelly:jsl" xmlns:x="jelly:xml" xmlns:doc="doc" - xmlns="dummy" trim="false"> + xmlns="dummy" trim="true"> <jsl:template match="document"> - <document> - <head> - <link rel="alternate" type="application/rss+xml" title="${pom.name} News" href="${pom.url}/news.rss" /> - </head> - <jsl:applyTemplates select="*"/> - </document> + <document> + <head><link rel="alternate" type="application/rss+xml" title="${pom.name} News" href="${pom.url}/news.rss" /></head> + <jsl:applyTemplates/> + </document> </jsl:template> - <jsl:template match="body" trim="false"> - <body> - - <section name="News"> - <p>Get the RSS feed for the latest news <a href="news.rss"><img src="images/rss.png"/></a></p> - - <jsl:applyTemplates select="*"/> - - </section> - </body> - </jsl:template> - - <jsl:template match="news"> - <j:set var="sectionName"><x:expr select="@header"/> - <x:expr select="@date"/></j:set> - <subsection name="${sectionName}"> - <p> - <jsl:applyTemplates trim="false"/> - </p> - </subsection> - </jsl:template> - - <jsl:template match="*"> - <jsl:copy trim="false"> - <jsl:applyTemplates trim="false"/> - </jsl:copy> - </jsl:template> + <jsl:template match="body" trim="true"> + <body> + <jsl:applyTemplates trim="true"/> + </body> + </jsl:template> + + <jsl:template match="news" trim="true"> + <section name="${maven.news.header}"> + <p> + Get the RSS feed for the latest news: <a href="news.rss"><img src="images/rss.png" alt="rss.png"/></a> + </p> + <jsl:applyTemplates trim="true"/> + </section> + </jsl:template> + + <jsl:template match="entry"> + <j:set var="sectionName"><x:expr select="@name"/></j:set> + <subsection name="${sectionName}"> + <jsl:applyTemplates trim="true"/> + </subsection> + </jsl:template> + + <jsl:template match="*"> + <jsl:copy trim="true"> + <jsl:applyTemplates trim="true"/> + </jsl:copy> + </jsl:template> <!-- element values don't pass through as text --> <jsl:template match="@*"/> |