From: Morten K. <mor...@us...> - 2005-03-07 10:34:58
|
mortenkr 05/03/07 02:34:48 Added: news project.properties project.xml .cvsignore plugin.properties plugin.jelly news/xdocs changes.xml goals.xml index.xml news.xml properties.xml navigation.xml news/src/plugin-resources news2rss.jsl news.jsl news/src/plugin-resources/images rss.png Log: New News plugin - initial commit Revision Changes Path 1.1 maven-plugins/news/project.properties Index: project.properties =================================================================== maven.license.licenseFile=${basedir}/../LICENSE.txt maven.xdoc.date=left maven.xdoc.version=${pom.currentVersion} 1.1 maven-plugins/news/project.xml Index: project.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <project> <extend>${basedir}/../plugin-project.xml</extend> <!--pomVersion is in parent --> <id>maven-news-plugin</id> <name>Maven News Plugin</name> <!-- groupId is in parent --> <currentVersion>1.0</currentVersion> <!-- organization is in parent --> <inceptionYear>2004</inceptionYear> <!-- package, logo are in parent. no gumpRepositoryId --> <description>Creates News report</description> <shortDescription>Creates News report</shortDescription> <!-- issue tracking url, siteAddress are in parent --> <url>http://maven-plugins.sourceforge.net/maven-news-plugin/</url> <siteDirectory>/home/groups/m/ma/maven-plugins/htdocs/maven-news-plugin/</siteDirectory> <repository> <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/maven-plugins:maven-plugins/news</connection> <developerConnection>scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/maven-plugins:maven-plugins/news</developerConnection> <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/maven-plugins/maven-plugins/news/</url> </repository> <versions> <version> <id>1.0</id> <name>1.0</name> <tag>MAVEN_PLUGINS_NEWS_1_0</tag> </version> </versions> <!-- mailingLists are in parent --> <developers> <developer> <name>Morten Kristiansen</name> <id>mortenkr</id> <email>mor...@us...</email> <roles> <role>Java Developer</role> </roles> <timezone>1</timezone> </developer> </developers> <reports> <report>maven-news-plugin</report> <report>maven-changes-plugin</report> <report>maven-changelog-plugin</report> <report>maven-developer-activity-plugin</report> <report>maven-file-activity-plugin</report> <report>maven-license-plugin</report> </reports> </project> 1.1 maven-plugins/news/.cvsignore Index: .cvsignore =================================================================== velocity* target 1.1 maven-plugins/news/plugin.properties Index: plugin.properties =================================================================== # Default props maven.news.stylesheet=${plugin.resources}/news.jsl maven.news.rss.stylesheet=${plugin.resources}/news2rss.jsl 1.1 maven-plugins/news/plugin.jelly Index: plugin.jelly =================================================================== <project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:define="jelly:define" xmlns:util="jelly:util" xmlns:doc="doc"> <!-- REGISTER --> <goal name="maven-news-plugin:register"> <util:file var="news" name="${maven.docs.src}/news.xml" /> <j:if test="${news.exists()}"> <doc:registerReport name="News" pluginName="news" link="news-report" description="Report on the project news." /> </j:if> </goal> <!-- DEREGISTER --> <goal name="maven-news-plugin:deregister"> <doc:deregisterReport name="News" /> </goal> <!-- GENERATE REPORT --> <goal name="news:report" description="Generate a news report"> <!-- Generate xml files to be converted by xdocs --> <doc:jsl input="${maven.docs.src}/news.xml" output="news-report.xml" stylesheet="${maven.news.stylesheet}" encoding="${maven.docs.outputencoding}" outputMode="xml" prettyPrint="true" /> <!-- Generate a RSS feed --> <doc:jsl input="${maven.docs.src}/news.xml" output="news.rss" stylesheet="${maven.news.rss.stylesheet}" 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> </project> 1.1 maven-plugins/news/xdocs/changes.xml Index: changes.xml =================================================================== <?xml version="1.0"?> <document> <body> <release version="1.0" date="01.04.2005"> <action type="add" dev="mortenkr">Version 1.0 released</action> </release> </body> </document> 1.1 maven-plugins/news/xdocs/goals.xml Index: goals.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <title>Maven News Plugin Goals</title> </properties> <body> <goals> <goal> <name>news:report</name> <description>For generating report directly</description> </goal> </goals> </body> </document> 1.1 maven-plugins/news/xdocs/index.xml Index: index.xml =================================================================== <?xml version="1.0"?> <document> <body> <section name="Maven News Plugin"> <p> This plugin provides functionality for adding a news report to your Maven site. Simply add a <code>news.xml</code> file to your xdocs folder with format: <br/> <pre> <document> <body> <news header="My news header" date="13.01.05"> The actual news text. </news> </body> </document> </pre> In addition, add the following line to your reports section in POM: <pre> <reports> ... <report>maven-news-plugin</report> ... </reports> </pre> An example of the plugin result can be found under <a href="news-report.html">here</a>. <p/> For more information on the functionality provided by this plugin, please see the <a href="goals.html">Goals</a> document. <p /> For more information on how to customise the functionality provided by this plugin, please see the <a href="properties.html">Properties</a> document. </p> </section> </body> </document> 1.1 maven-plugins/news/xdocs/news.xml Index: news.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <document> <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. </news> </body> </document> 1.1 maven-plugins/news/xdocs/properties.xml Index: properties.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <title>Maven News Plugin Properties</title> </properties> <body> <section name="Maven News Plugin Settings"> <table> <tr> <th>Property</th> <th>Optional?</th> <th>Description</th> </tr> <tr> <td>maven.news.stylesheet</td> <td>Yes</td> <td> <p>Default value is <code>${plugin.resources}/news.jsl</code>.</p> </td> </tr> <tr> <td>maven.news.rss.stylesheet</td> <td>Yes</td> <td> <p>Default value is <code>${plugin.resources}/news2rss.jsl</code>.</p> </td> </tr> </table> </section> </body> </document> 1.1 maven-plugins/news/xdocs/navigation.xml Index: navigation.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <project name="Maven News Plugin"> <title>Maven News Plugin</title> <body> <links> <item href="http://maven.apache.org/" name="Maven"> </item> </links> <menu name="Overview"> <item href="/news-report.html" name="News"/> <item href="/goals.html" name="Goals"> </item> <item href="/properties.html" name="Properties"> </item> </menu> </body> </project> 1.1 maven-plugins/news/src/plugin-resources/news2rss.jsl Index: news2rss.jsl =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <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>News for ${pom.name}</title> <link>${pom.url}</link> <description>News for ${pom.name}</description> <language>en-us</language> <j:set var="logoexists" value="${pom.logo}" /> <j:if test="${!empty(logoexists)}"> <image> <title>News ${pom.name}</title> <link>${pom.url}</link> <url>${pom.logo}</url> </image> </j:if> <x:forEach var="news" select="//news"> <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> <!-- 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}/news-report.html"/> <link>${link}</link> <description> <table border="1"> <tr><td><x:expr select="string($news)"/></td></tr> </table> </description> </item> </x:forEach> </channel> </rss> </jsl:template> </jsl:stylesheet> 1.1 maven-plugins/news/src/plugin-resources/news.jsl Index: news.jsl =================================================================== <?xml version="1.0"?> <jsl:stylesheet select="$doc" xmlns:j="jelly:core" xmlns:jsl="jelly:jsl" xmlns:x="jelly:xml" xmlns:doc="doc" xmlns="dummy" trim="false"> <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> </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> <!-- element values don't pass through as text --> <jsl:template match="@*"/> <!-- CDATA and text nodes pass-thru --> <jsl:template match="text()"> <x:expr select="."/> </jsl:template> </jsl:stylesheet> 1.1 maven-plugins/news/src/plugin-resources/images/rss.png <<Binary file>> |