You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/10/19 22:12:46 UTC
svn commit: r326674 - in
/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo: ./
resources/stylesheets/ src/documentation/ src/documentation/content/xdocs/
Author: rgardler
Date: Wed Oct 19 13:12:11 2005
New Revision: 326674
URL: http://svn.apache.org/viewcvs?rev=326674&view=rev
Log:
create a project details page from a DOAP file
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/doap.rdf (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl (with props)
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/build.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/build.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/build.xml?rev=326674&r1=326673&r2=326674&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/build.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/build.xml Wed Oct 19 13:12:11 2005
@@ -18,9 +18,9 @@
<project default="docs" basedir="." name="Forrest plugin build file">
<property name="plugin-name" value="org.apache.forrest.plugin.input.projectInfo"/>
- <property name="forrest.version" value="0.7"/>
+ <property name="forrest.version" value="0.8"/>
<property name="type" value="input"/>
- <property name="plugin-version" value="0.1"/>
+ <property name="plugin-version" value="0.2-dev"/>
<property name="description" value="Generates project info such as changelog and todo list. "/>
<property name="author" value="Apache Forrest Project"/>
<property name="websiteURL" value="http://forrest.apache.org/docs/plugins/org.apache.forrest.plugin.input.projectInfo/"/>
Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/doap.rdf
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/doap.rdf?rev=326674&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/doap.rdf (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/doap.rdf Wed Oct 19 13:12:11 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:doap="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:admin="http://webns.net/mvcb/" xml:lang="en">
+ <doap:Project>
+ <doap:name>org.apache.forrest.plugin.input.projectInfo</doap:name>
+ <doap:shortname>projectInfo</doap:shortname>
+ <doap:homepage rdf:resource="http://forrest.apache.org/plugins/org.apache.forrest.plugin.input.projectInfo"/>
+ <doap:description>This plugin extends Apache Forrest to generate project info
+ from various configuration files. Current features include
+ a project details page (lists important information such as
+ mailing list addresses), recent changes, todo list and
+ release notes.</doap:description>
+ <doap:shortdesc>Automatically generate Project Information files.</doap:shortdesc>
+ <doap:bug-database rdf:resource="http://issues.apache.org/jira/browse/FOR"/>
+ <doap:mailing-list rdf:resource="http://forrest.apache.org/mail-lists.html"/>
+ <doap:programming-language>java</doap:programming-language>
+ <doap:programming-language>xml</doap:programming-language>
+ <doap:programming-language>xslt</doap:programming-language>
+ <doap:license rdf:resource="http://usefulinc.com/doap/licenses/asl20"/>
+ <doap:download-page rdf:resource="http://forrest.apache.org/pluginDocs/plugins_0_80/index.html"/>
+ <doap:maintainer>
+ <foaf:Person>
+ <foaf:name>Apache Forrest Community</foaf:name>
+ <foaf:mbox_sha1sum>eca6cfabc292eea1fcd4f9e6dd08097e2bcab459</foaf:mbox_sha1sum>
+ <foaf:homepage rdf:resource="http://forrest.apache.org/who.html"/>
+ </foaf:Person>
+ </doap:maintainer>
+ <doap:repository>
+ <doap:SVNRepository>
+ <doap:browse rdf:resource="http://svn.apache.org/repos/asf/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/"/>
+ <doap:location rdf:resource="http://svn.apache.org/repos/asf/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/"/>
+ </doap:SVNRepository>
+ </doap:repository>
+ </doap:Project>
+</rdf:RDF>
+
+
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/doap.rdf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap?rev=326674&r1=326673&r2=326674&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap Wed Oct 19 13:12:11 2005
@@ -67,7 +67,35 @@
<map:transform src="resources/stylesheets/releaseNotes2document.xsl"/>
<map:serialize type="xml-document"/>
</map:match>
+
+ <!-- =============================================================== -->
+ <!-- Project Description Pipelines -->
+ <!-- =============================================================== -->
+ <map:match pattern="projectDetails.xml">
+ <map:generate type="file" src="{lm:project.descriptor}" />
+ <map:transform src="{lm:transform.descriptor.html}"/>
+ <map:transform src="{lm:transform.html.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+
+ <map:match pattern="projectDetails.source.xml">
+ <map:generate type="file" src="{lm:project.descriptor}" />
+ <map:transform src="{lm:transform.descriptor.html}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+
+ <map:match pattern="projectDetails.*.xml">
+ <map:generate type="file" src="{lm:project.descriptor.{1}}" />
+ <map:transform src="{lm:transform.descriptor.html}"/>
+ <map:transform src="{lm:transform.html.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+
+ <map:match pattern="projectDetails.*.source.xml">
+ <map:generate type="file" src="{lm:project.descriptor.{1}}" />
+ <map:serialize type="xml-document"/>
+ </map:match>
</map:pipeline>
</map:pipelines>
Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml?rev=326674&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml Wed Oct 19 13:12:11 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2005 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ 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.
+-->
+
+<!-- Default Forrest locationmap -->
+
+<locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
+
+ <components>
+ <matchers default="lm">
+ <matcher
+ name="lm"
+ src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+ </matchers>
+ <selectors default="exists">
+ <selector name="exists" logger="sitemap.selector.exists"
+ src="org.apache.forrest.sourceexists.SourceExistsSelector" />
+ </selectors>
+ </components>
+
+ <locator>
+
+ <match pattern="project.descriptor">
+ <location src="doap.rdf" />
+ </match>
+
+ <match pattern="project.descriptor.forrest">
+ <location src="http://svn.apache.org/repos/asf/forrest/trunk/site-author/content/doap.xml"/>
+ </match>
+
+ <match pattern="transform.descriptor.html">
+ <location src="resources/stylesheets/doap-to-html.xsl"/>
+ </match>
+ </locator>
+</locationmap>
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl?rev=326674&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl Wed Oct 19 13:12:11 2005
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version = "1.0"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:doap="http://usefulinc.com/ns/doap#">
+
+ <xsl:template match="rdf:RDF">
+ <xsl:apply-templates select="doap:Project"/>
+ </xsl:template>
+
+ <xsl:template match="atom:feed">
+ <xsl:apply-templates select="atom:entry/atom:content/doap:Project"/>
+ </xsl:template>
+
+ <xsl:template match="doap:Project">
+ <html>
+ <head>
+ <link rel="stylesheet" href="projects.css"/>
+ <title>Information about Apache <xsl:value-of select="doap:name"/></title>
+ </head>
+ <xsl:call-template name="body"/>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="body">
+ <body>
+ <div class="project-details">
+ <xsl:call-template name="project-header"/>
+ <xsl:call-template name="project-description"/>
+ <xsl:call-template name="project-summary"/>
+ <xsl:call-template name="project-repositories"/>
+ <xsl:call-template name="project-issues"/>
+ <xsl:call-template name="project-maillists"/>
+ <xsl:call-template name="project-releases"/>
+ </div>
+ </body>
+ </xsl:template>
+
+ <xsl:template name="project-header">
+ <div class="header">
+ <h1>
+ <xsl:text>Apache </xsl:text> <xsl:value-of select="doap:name" />
+ </h1>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="project-description">
+ <div class="description">
+ <p>
+ <xsl:value-of select="doap:description"/>
+ </p>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="project-summary">
+ <h2>
+ <img src="http://www.apache.org/images/redarrow.gif" />
+ <a><xsl:attribute name="name">summary</xsl:attribute></a>
+ Summary
+ </h2>
+ <div class="content">
+ <table width="100%">
+ <tr>
+ <th class="left">Project Website</th>
+ <td class="right">
+ <xsl:apply-templates select="doap:homepage/@*"/>
+ </td>
+ </tr>
+ <tr>
+ <th class="left">Programming Languages</th>
+ <td class="right">
+ <xsl:apply-templates select="doap:programming-language"/>
+ </td>
+ </tr>
+ <tr>
+ <th class="left">Download Page</th>
+ <td class="right">
+ <xsl:apply-templates select="doap:download-page/@*"/>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="project-repositories">
+ <xsl:if test="doap:repository">
+ <h2>
+ <img src="http://www.apache.org/images/redarrow.gif" />
+ <a><xsl:attribute name="name">repos</xsl:attribute></a>
+ Source Repositories
+ </h2>
+ <div class="content">
+ <xsl:choose>
+ <xsl:when test="doap:repository/doap:SVNRepository">
+ <table>
+ <tr>
+ <th>Browse URL</th>
+ <td><xsl:apply-templates select="doap:repository/doap:SVNRepository/doap:browse/@*"/></td>
+ </tr>
+ <tr>
+ <th>Location</th>
+ <td><xsl:apply-templates select="doap:repository/doap:SVNRepository/doap:location/@*"/></td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <fixme author="Project Info Dev Team">
+ Unable to parse repository information.
+ Element name is '<xsl:value-of select="name(doap:repository/*)"/>'</fixme>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="project-issues">
+ <h2>
+ <img src="http://www.apache.org/images/redarrow.gif" />
+ <a><xsl:attribute name="name">issues</xsl:attribute></a>
+ Issue Tracking
+ </h2>
+ <div class="content">
+ <p>Please report any issues, such as unexpected behaviour, bugs and
+ requests for enhancements to the projects issue tracker</p>
+ <xsl:apply-templates select="doap:bug-database/@rdf:resource"/>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="project-maillists">
+ <h2>
+ <img src="http://www.apache.org/images/redarrow.gif" />
+ <a><xsl:attribute name="name">maillists</xsl:attribute></a>
+ Mailing List information
+ </h2>
+ <div class="content">
+ <xsl:apply-templates select="doap:mailing-list/@*"/>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="project-releases">
+ <xsl:if test="doap:release">
+ <h2>
+ <img src="http://www.apache.org/images/redarrow.gif" />
+ <a><xsl:attribute name="name">releases</xsl:attribute></a>
+ Release Information
+ </h2>
+ <div class="content">
+ <xsl:for-each select="doap:release/doap:Version">
+ <table width="100%">
+ <tr>
+ <th class="left">Version</th>
+ <td class="right"><xsl:value-of select="doap:revision" /></td>
+ </tr>
+ <tr>
+ <th class="left">Date</th>
+ <td class="right"><xsl:value-of select="doap:created" /></td>
+ </tr>
+ </table>
+ </xsl:for-each>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="@rdf:resource">
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
+ <xsl:value-of select="."/>
+ </a>
+ </xsl:template>
+
+ <xsl:template match="doap:programming-language">
+ <xsl:value-of select="."/>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>. </xsl:text>
+ </xsl:if>
+ </xsl:template>
+</xsl:stylesheet>
+
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/doap-to-html.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml?rev=326674&r1=326673&r2=326674&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml Wed Oct 19 13:12:11 2005
@@ -31,6 +31,7 @@
<li><a href="changes.html">Recent Changes</a></li>
<li><a href="todo.html">ToDo list</a></li>
<li><a href="releaseNotes_0.1.html">Release Notes</a></li>
+ <li><a href="projectDetails.html">Project Details</a></li>
</ul>
</section>
@@ -57,6 +58,69 @@
<p>The introductory text in the release notes comes from the (optional)
element <code>notes</code> (a child of the <code>release</code> element).</p>
+ </section>
+
+
+ <section>
+ <title>Project Details</title>
+ <p>Project details are generated from a project descriptor file.
+ This file can be in any of the followin formats:</p>
+
+ <ul>
+ <li>DOAP</li>
+ <li>DOAP over ATOM</li>
+ </ul>
+
+ <note>We need your help in adding more formats.</note>
+
+ <p>The location of this descriptor file is specified in the locationmap
+ with the hint <code>pproject.descriptor</code>. This defaults to
+ the root of your projects content directory. To place your descriptor
+ in a different location simply add
+ a matcher like this to your project locationmap:</p>
+
+ <source><![CDATA[
+ <match pattern="project.descriptor">
+ <location src="[path/to/descriptor/file]" />
+ </match>
+ ]]></source>
+
+ <p>To retrieve the project details page request the file
+ <code>/projectDetails.html</code>.</p>
+
+ <section>
+ <title>Multiple Projects</title>
+ <p>You can use the projectInfo plugin to pull together project
+ information for multiple projects. For example, take a look at
+ the project details for
+ <a href="projectDetails.forrest.html">Apache Forrest</a>.</p>.
+
+ <p>Using the locatoinmap you can retrieve this content from
+ anywhere you want, for example, the DOAP file for the Forrest
+ project comes from directly from SVN, thus we are always
+ assured of it being up to date.</p>
+
+ <p>To retrieve the project details of another project make a request
+ for <code>projectDetails.[PROJECT_NAME].html</code>. For this to work
+ your project locationmap muest have an entry like this:</p>
+
+ <source><![CDATA[
+ <match pattern="project.descriptor.forrest">
+ <location src="http://svn.apache.org/repos/asf/forrest/trunk/site-author/content/doap.xml"/>
+ </match>
+ ]]></source>
+
+ <p>Of course, if you have a central location for all your project descriptor
+ files you could use a match like this:</p>
+
+ <source><![CDATA[
+ <match pattern="project.descriptor.*">
+ <location src="path_to_descriptors/{1}.xml"/>
+ </match>
+ ]]></source>
+
+ </section>
+
</section>
</body>
</document>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml?rev=326674&r1=326673&r2=326674&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/site.xml Wed Oct 19 13:12:11 2005
@@ -34,10 +34,19 @@
<about label="About">
<index label="Index" href="index.html" description="Welcome to org.apache.forrest.plugin.input.projectInfo"/>
- <forrestPlugins label="Plugins Index" href="site:forrest/plugins" description="Index of Forrest Plugins"/>
+ <details label="Project Details" href="projectDetails.html" description="An overview of the project and its resources"/>
+ <release label="Release Notes">
+ <releaseNotes label="Version 0.1" href="releaseNotes_0.1.html"/>
+ <releaseNotes label="Version 0.2" href="releaseNotes_0.2.html"/>
+ </release>
<changes label="Changes" href="changes.html" description="History of Changes" />
<todo label="Todo" href="todo.html" description="Todo List" />
</about>
+
+ <forrest label="Forrest">
+ <forrestDetails label="Forrest Details" href="projectDetails.forrest.html" description="An overview of the Forrest project and its resources"/>
+ <forrestPlugins label="Plugins Index" href="site:forrest/plugins" description="Index of Forrest Plugins"/>
+ </forrest>
<!--
The href must be wholesite.html/pdf You can change the labels and node names
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml?rev=326674&r1=326673&r2=326674&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/skinconf.xml Wed Oct 19 13:12:11 2005
@@ -160,7 +160,7 @@
<motd>
<motd-option pattern="">
<motd-title>v0.7</motd-title>
- <motd-page location="both">
+ <motd-page location="alt">
This is documentation for current version v0.7
</motd-page>
<motd-page-url>http://forrest.apache.org/versions/index.html</motd-page-url>