You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/11/26 16:00:10 UTC
cvs commit: maven-plugins/dashboard/xdocs authoring.xml changes.xml navigation.xml
vmassol 2003/11/26 07:00:10
Modified: dashboard/xdocs changes.xml navigation.xml
Added: dashboard/xdocs authoring.xml
Log:
Start of an Aggregator authoring guide
Revision Changes Path
1.9 +3 -0 maven-plugins/dashboard/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/dashboard/xdocs/changes.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- changes.xml 24 Nov 2003 20:31:38 -0000 1.8
+++ changes.xml 26 Nov 2003 15:00:10 -0000 1.9
@@ -9,6 +9,9 @@
<release version="1.2" date="in CVS">
<action dev="vmassol" type="add">
+ Added tutorial on how to create custom aggregators.
+ </action>
+ <action dev="vmassol" type="add">
Added new <code>maven.dashboard.report.showempty</code> property. If
set to false, the HTML report table will not contain entries for
projects for which no aggregator data was retrieved.
1.5 +1 -0 maven-plugins/dashboard/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/maven-plugins/dashboard/xdocs/navigation.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- navigation.xml 20 Nov 2003 10:20:16 -0000 1.4
+++ navigation.xml 26 Nov 2003 15:00:10 -0000 1.5
@@ -11,6 +11,7 @@
<item name="Goals" href="/goals.html"/>
<item name="Properties" href="/properties.html"/>
<item name="Aggregators" href="/aggregators.html"/>
+ <item name="Authoring" href="/authoring.html"/>
</menu>
<menu name="Downloads">
<item name="Dashboard plugin 1.0" href="http://www.ibiblio.org/maven/maven/plugins/maven-dashboard-plugin-1.0.jar"/>
1.1 maven-plugins/dashboard/xdocs/authoring.xml
Index: authoring.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Dashboard aggregator creation guide</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<section name="How to create a custom aggregator">
<p>
The dashboard plugin supports custom aggregators. This page is a
tutorial explaining how to create a custom aggregator.
</p>
<p>
An aggregator is a Jelly script that you plug in the dashboard plugin.
This Jelly script is called on each Maven subproject to extract a
single piece of data (ex: number of checkstyle errors, Clover test
coverage percentage, etc).
</p>
<subsection name="Step 1: Creating a Jelly script">
<p>
The Jelly script must output the aggregator data for a project.
For example:
</p>
<source><![CDATA[
<?xml version="1.0"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.cserrors.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="count($doc//error[@severity = 'error'])"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>]]></source>
<p>
Note that the Jelly script has access to all of the Dashboard plugin
properties.
</p>
</subsection>
<subsection name="Step 2: Configuring the dashboard">
<p>
Add the following properties to your master project's
<code>project.properties</code>:
</p>
<source><![CDATA[
# Properties for my custom aggregator
maven.dashboard.aggregator.[aggregator name].script = [location of my custom jelly script]
maven.dashboard.aggregator.[aggregator name].artifact = [Location of artifacts from which to extract data]
maven.dashboard.aggregator.[aggregator name].label = [Label to display in report]
maven.dashboard.aggregator.[aggregator name].goal = [Goal to call that generates the artifact above]
]]></source>
</subsection>
<subsection name="Step 3: Tips">
<p>
If there is no existing goal that generates the data you need, create
a custom goal in your top level <code>maven.xml</code>. Make sure your
subprojects inherit from this top level project (so that
<code>maven.xml</code> is inherited).
</p>
<p>
If you think your aggregator could be useful to others, feel free to
donate it to the Maven project.
</p>
</subsection>
</section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org