vmassol 2003/11/04 13:11:32
Added: dashboard/sample project.xml .cvsignore project.properties
dashboard/sample/subproject1/src/java/org/apache/maven/dashboard/sample/subproject1
Sample.java
dashboard/src/plugin-resources/reports checkstyle.jelly
dashboard/xdocs navigation.xml .cvsignore goals.xml
index.xml changes.xml properties.xml
dashboard .cvsignore plugin.properties project.xml
project.properties plugin.jelly
dashboard/sample/subproject1 project.xml project.properties
dashboard/sample/subproject2 project.xml project.properties
dashboard/src/plugin-resources/templates dashboard.jsl
dashboard/sample/subproject2/src/java/org/apache/maven/dashboard/sample/subproject2
Sample.java
Log:
New dashboard plugin. See web site docs for more details.
Revision Changes Path
1.1 maven-plugins/dashboard/sample/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<!-- the version of maven's project object model -->
<pomVersion>3</pomVersion>
<!-- a unique name for this project -->
<id>maven-dashboard-sample</id>
<!-- a short but descriptive name for the project -->
<name>Dashboard Sample</name>
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>1.0</currentVersion>
<!-- details about the organization that 'owns' the project -->
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
</organization>
<!-- the year the project started -->
<inceptionYear>2003</inceptionYear>
<!-- the top level of java packages that this project defines
e.g. if your project contains the packages
com.mycompany.accounts.reports, com.mycompany.accounts.reports
and com.mycompany.accounts.utils, the package would be
'com.mycompany.accounts' -->
<package>org.apache.maven.dashboard.sample</package>
<!-- a short description of what the project does -->
<shortDescription>A sample project using the Dashboard report</shortDescription>
<!-- the project home page -->
<url>http://maven.apache.org/</url>
<!-- the version control repository and http url for online access
the connection element has the form:
scm:<system>:<system specific connection string> -->
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:maven</connection>
<url>http://cvs.apache.org/viewcvs/maven/</url>
</repository>
<!-- any mailing lists for the project -->
<mailingLists/>
<!-- who the developers are for the project -->
<developers/>
<!-- jar files the project is dependent on -->
<dependencies/>
<!-- build information for the project -->
<build>
<sourceDirectory>src/java</sourceDirectory>
</build>
<reports>
<report>maven-dashboard-plugin</report>
</reports>
</project>
1.1 maven-plugins/dashboard/sample/.cvsignore
Index: .cvsignore
===================================================================
target
cactus_client.log
maven.log
build.properties
velocity.log
1.1 maven-plugins/dashboard/sample/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.checkstyle.header.file = ${basedir}/../../LICENSE.txt
1.1
maven-plugins/dashboard/sample/subproject1/src/java/org/apache/maven/dashboard/sample/subproject1/Sample.java
Index: Sample.java
===================================================================
package org.apache.maven.dashboard.sample.subproject1;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Maven" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Maven", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
/**
* Example voluntarily generating checsktyle errors.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
* @version $Id: Sample.java,v 1.1 2003/11/04 21:11:31 vmassol Exp $
*/
public class Sample
{
public void someMethod()
{
new Boolean(true);
}
}
1.1
maven-plugins/dashboard/src/plugin-resources/reports/checkstyle.jelly
Index: checkstyle.jelly
===================================================================
<?xml version="1.0"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<!-- Extract error count from Checkstyle raw XML file -->
<u:file var="artifactAsFile"
name="${maven.dashboard.report.checkstyle.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="count($doc//error)"/>
</j:when>
<j:otherwise>
<j:expr value="n/a"/>
</j:otherwise>
</j:choose>
</j:jelly>
1.1 maven-plugins/dashboard/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven Dashboard plugin">
<title>Maven Dashboard plugin</title>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html"/>
<item name="Properties" href="/properties.html"/>
</menu>
</body>
</project>
1.1 maven-plugins/dashboard/xdocs/.cvsignore
Index: .cvsignore
===================================================================
stylesheets
1.1 maven-plugins/dashboard/xdocs/goals.xml
Index: goals.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>Maven Dashboard plugin goals</title>
<author email="[EMAIL PROTECTED]">Vincent Massol</author>
</properties>
<body>
<goals>
<goal>
<name>dashboard</name>
<description>
Default goal. Does the same as <code>dashboard:report</code>.
</description>
</goal>
<goal>
<name>dashboard:report</name>
<description>
Generate the dashboard report (HTML). Note: This goal should
usually not be called directly. It is called automatically if
you register a dashboard report in your master
<code>project.xml</code> file.
</description>
</goal>
</goals>
</body>
</document>
1.1 maven-plugins/dashboard/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Dashboard plugin</title>
<author email="[EMAIL PROTECTED]">Vincent Massol</author>
</properties>
<body>
<section name="Maven Dashboard plugin">
<p>
Generate a dashboard HTML report containing information gathered
from other Maven reports (Checkstyle, Clover, JUnit, Simian, etc).
The dashboard aggregate this information for all subprojects,
presenting them in a single tabular format.
</p>
<p>
Current features:
</p>
<ul>
<li>
Pluggable architecture. It allows to add custom probes for any
kind of report, be them Maven reports or anything else (like
calling an SCM system, calling JIRA, etc). A probe is actually a
Jelly script so that you have the full power of Jelly at your hand.
</li>
<li>
Provides a default probe for gathering the number of Checkstyle
errors in subprojects.
</li>
</ul>
</section>
<section name="Quick start">
<p>
There are several possible ways of using the dashboard plugin.
</p>
<subsection name="Solution 1: Registering it as a Maven report">
<p>
In your master project, add a <code>maven-dashboard-report</code>
report entry:
</p>
<source><![CDATA[
<reports>
[...]
<report>maven-dashboard-plugin</report>
</reports>
]]></source>
<p>
Then, when you generate the web site (<code>maven site</code>),
Maven will generate the dashboard report which will be available
in the web site left menu, under "Project Reports".
</p>
</subsection>
<subsection name="Solution 2: Running it manually">
<p>
In your master project, simply type <code>maven dashboard</code>.
This will generate a dashboard xdoc file. Then type
<code>maven xdoc</code> to transform it into an HTML file.
</p>
</subsection>
<subsection name="Solution 3: Including it in a custom reactor">
<p><strong>
Only use this solution if you're already familiar with the
dashboard plugin.
</strong></p>
<p>
If you are already running a custom reactor you have the possibility
to integrate the dashboard plugin in your reactor build. You would
do this to shorten the build time.
</p>
<p>
To do this, you need to add the <code>dashboard:report-single</code>
goal to the list of goals being run by your reactor. The best option
is to ensure this goal is run after the other goals generating the
report artifacts needed by the dashboard probes you're running. In
order to prevent the <code>dashboard:report-single</code> goal from
automatically calling the report artifact goals, you'll need to add
the following property: <code>maven.dashboard.rungoals = false</code>.
</p>
<p>
At the master project level, you'll simply need to add a report entry
as described above in 'Solution 1'. You'll also need to add the
following property: <code>maven.dashboard.runreactor = false</code>.
This property prevents the dashboard plugin from automatically calling
the dashboard reactor.
</p>
</subsection>
</section>
</body>
</document>
1.1 maven-plugins/dashboard/xdocs/changes.xml
Index: changes.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Changes</title>
<author email="[EMAIL PROTECTED]">Vincent Massol</author>
</properties>
<body>
<release version="1.0" date="in CVS">
<action dev="vmassol" type="add">
Initial creation.
</action>
</release>
</body>
</document>
1.1 maven-plugins/dashboard/xdocs/properties.xml
Index: properties.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>Maven Dashboard plugin properties</title>
<author email="[EMAIL PROTECTED]">Vincent Massol</author>
</properties>
<body>
<section name="Dashboard plugin properties">
<source><![CDATA[
# Properties for the dashboard reactor
# ------------------------------------
maven.dashboard.basedir=${basedir}
maven.dashboard.includes=*/project.xml
maven.dashboard.excludes=**/target/**/project.xml,project.xml
maven.dashboard.ignoreFailures=false
# Generated dashboard xml data file
maven.dashboard.report.xml = ${maven.build.dir}/dashboard-data.xml
# Generated dashboard xdoc file name (without the extension).
# Note: The value must not include any path as the xdoc will be
# generated in ${maven.gen.docs}.
maven.dashboard.report.xdoc = dashboard-report
# Location of JSL template to generate the xdoc file
maven.dashboard.template = ${plugin.resources}/templates/dashboard.jsl
# Decide whether a call to dashboard:report will call the reactor
# on the child projects to generate individual dashboard data. If you
# already using the multiproject project or the reactor, a better option
# is to add dashboard:report-single to the list of goals you're running.
# In which case, you'll need to set the following property to false
# (otherwise the reactor will be run again on your child projects).
maven.dashboard.runreactor = true
# Properties for gathering dashboard data for a single project
# ------------------------------------------------------------
# Location of default dashboard adaptors
maven.dashboard.reports.dir = ${plugin.resources}/reports
# List of reports to aggregate
maven.dashboard.reports = checkstyle
# Properties for the default checkstyle adaptor
maven.dashboard.report.checkstyle.script =
${maven.dashboard.reports.dir}/checkstyle.jelly
maven.dashboard.report.checkstyle.artifact =
${maven.build.dir}/checkstyle-raw-report.xml
maven.dashboard.report.checkstyle.label = Checkstyle errors
maven.dashboard.report.checkstyle.goal = checkstyle
# Generated dashboard data for a single project
maven.dashboard.report.single = ${maven.build.dir}/dashboard-single.xml
# Decide whether to call goals associated with report types or not
maven.dashboard.rungoals = true
]]></source>
</section>
</body>
</document>
1.1 maven-plugins/dashboard/.cvsignore
Index: .cvsignore
===================================================================
target
velocity.log
maven.log
.classpath
.project
1.1 maven-plugins/dashboard/plugin.properties
Index: plugin.properties
===================================================================
# -------------------------------------------------------------------
# D E F A U L T M A V E N P R O P E R T I E S
# -------------------------------------------------------------------
# These are the properties that we believe are immutable so we
# keep them apart from the project specific properties.
# -------------------------------------------------------------------
# Properties for the dashboard reactor
# ------------------------------------
maven.dashboard.basedir=${basedir}
maven.dashboard.includes=*/project.xml
maven.dashboard.excludes=**/target/**/project.xml,project.xml
maven.dashboard.ignoreFailures=false
# Generated dashboard xml data file
maven.dashboard.report.xml = ${maven.build.dir}/dashboard-data.xml
# Generated dashboard xdoc file name (without the extension).
# Note: The value must not include any path as the xdoc will be
# generated in ${maven.gen.docs}.
maven.dashboard.report.xdoc = dashboard-report
# Location of JSL template to generate the xdoc file
maven.dashboard.template = ${plugin.resources}/templates/dashboard.jsl
# Decide whether a call to dashboard:report will call the reactor
# on the child projects to generate individual dashboard data. If you
# already using the multiproject project or the reactor, a better option
# is to add dashboard:report-single to the list of goals you're running.
# In which case, you'll need to set the following property to false
# (otherwise the reactor will be run again on your child projects).
maven.dashboard.runreactor = true
# Properties for gathering dashboard data for a single project
# ------------------------------------------------------------
# Location of default dashboard adaptors
maven.dashboard.reports.dir = ${plugin.resources}/reports
# List of reports to aggregate
maven.dashboard.reports = checkstyle
# Properties for the default checkstyle adaptor
maven.dashboard.report.checkstyle.script =
${maven.dashboard.reports.dir}/checkstyle.jelly
maven.dashboard.report.checkstyle.artifact =
${maven.build.dir}/checkstyle-raw-report.xml
maven.dashboard.report.checkstyle.label = Checkstyle errors
maven.dashboard.report.checkstyle.goal = checkstyle
# Generated dashboard data for a single project
maven.dashboard.report.single = ${maven.build.dir}/dashboard-single.xml
# Decide whether to call goals associated with report types or not
maven.dashboard.rungoals = true
1.1 maven-plugins/dashboard/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<extend>../project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-dashboard-plugin</id>
<name>Maven Dashboard Plugin</name>
<currentVersion>1.0-SNAPSHOT</currentVersion>
<description>Generate a dashboard containing global statistics about other maven
reports</description>
<shortDescription>Generate a statistic dashboard</shortDescription>
<url>http://maven.apache.org/reference/plugins/dashboard/</url>
<siteDirectory>/www/maven.apache.org/reference/plugins/dashboard/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:[EMAIL
PROTECTED]:/home/cvspublic:maven/src/plugins-build/dashboard/</connection>
<url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/dashboard/</url>
</repository>
<developers>
<developer>
<name>Vincent Massol</name>
<id>vmassol</id>
<email>[EMAIL PROTECTED]</email>
<organization>Pivolis</organization>
<roles>
<role>Creator</role>
<role>Java Developer</role>
<role>Release Manager</role>
</roles>
</developer>
</developers>
<dependencies/>
<reports>
<report>maven-changes-plugin</report>
<report>maven-changelog-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-license-plugin</report>
<report>maven-linkcheck-plugin</report>
</reports>
</project>
1.1 maven-plugins/dashboard/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.license.licenseFile=${basedir}/../LICENSE.txt
1.1 maven-plugins/dashboard/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:m="jelly:maven"
xmlns:x="jelly:xml"
xmlns:d="doc"
xmlns:u="jelly:util"
xmlns:a="jelly:ant">
<!--
========================================================================
Generate a dashboard report.
========================================================================
-->
<goal name="dashboard" prereqs="dashboard:report"
description="Generate a dashboard report"/>
<!--
========================================================================
Generate a dashboard report.
========================================================================
-->
<goal name="dashboard:report" description="Generate a dashboard report">
<!-- Generate dashboard data for all sub-projects if it is required -->
<j:set var="runreactor" value="${maven.dashboard.runreactor}"/>
<j:choose>
<j:when test="${runreactor == 'true'}">
<m:reactor
basedir="${maven.dashboard.basedir}"
banner="Generating dashboard data for"
includes="${maven.dashboard.includes}"
excludes="${maven.dashboard.excludes}"
postProcessing="true"
goals="dashboard:report-single"
ignoreFailures="${maven.dashboard.ignoreFailures}"/>
</j:when>
<j:otherwise>
<!-- We need to run the reactor to gather the list of projects
because the reactor creates a reactorProjects jelly property
that we need in the dashboard:aggregate goal. -->
<m:reactor
basedir="${maven.dashboard.basedir}"
banner="Gathering project list for"
includes="${maven.dashboard.includes}"
excludes="${maven.dashboard.excludes}"
postProcessing="true"
ignoreFailures="${maven.dashboard.ignoreFailures}"/>
</j:otherwise>
</j:choose>
<!-- Aggregate all dashboard project data into a single master dashboard
file -->
<attainGoal name="dashboard:aggregate"/>
<!-- Generate xdoc report -->
<attainGoal name="dashboard:xdoc"/>
</goal>
<!--
========================================================================
Aggregate different dashboard single reports into one
========================================================================
-->
<goal name="dashboard:aggregate">
<a:dirname property="xmlReportDir" file="${maven.dashboard.report.xml}"/>
<a:mkdir dir="${xmlReportDir}"/>
<j:file name="${maven.dashboard.report.xml}" prettyPrint="true"
xmlns="dashboard">
<dashboard>
<j:forEach var="reactorProject" items="${reactorProjects}">
<x:element name="project">
<x:attribute name="name">${reactorProject.name}</x:attribute>
<!-- Extract all reports from the single dashboards -->
<!-- TODO: Find a way to not hardcode the dashboard data
location -->
<u:file var="dashboardAsFile"
name="${reactorProject.context.getVariable('maven.build.dir')}/dashboard-single.xml"/>
<x:parse var="doc" xml="${dashboardAsFile}"/>
<x:copyOf select="$doc//report"/>
</x:element>
</j:forEach>
</dashboard>
</j:file>
</goal>
<!--
========================================================================
Generate xdoc report file
========================================================================
-->
<goal name="dashboard:xdoc">
<a:dirname property="xdocReportDir"
file="${maven.dashboard.report.xdoc}.xml"/>
<a:mkdir dir="${xdocReportDir}"/>
<d:jsl
input="${maven.dashboard.report.xml}"
output="${maven.dashboard.report.xdoc}.xml"
stylesheet="${maven.dashboard.template}"
outputMode="xml"
prettyPrint="true"/>
</goal>
<!--
========================================================================
Generate a dashboard report.
========================================================================
-->
<goal name="dashboard:report-single">
<a:dirname property="singleReportDir" file="${maven.dashboard.report.single}"/>
<a:mkdir dir="${singleReportDir}"/>
<u:tokenize var="reportNames" delim=",">${maven.dashboard.reports}</u:tokenize>
<!-- For each report, call the goal associated with the report type so that
raw data for that report type are generated. For example the checkstyle
report type will call checkstyle:checkstyle -->
<j:set var="rungoals" value="${maven.dashboard.rungoals}"/>
<j:if test="${rungoals == 'true'}">
<j:forEach var="reportName" items="${reportNames}">
<j:set var="goalProperty"
value="maven.dashboard.report.${reportName}.goal"/>
<attainGoal name="${context.getVariable(goalProperty)}"/>
</j:forEach>
</j:if>
<j:file name="${maven.dashboard.report.single}" prettyPrint="true"
xmlns="dashboard">
<dashboard-single>
<j:forEach var="reportName" items="${reportNames}">
<x:element name="report">
<!-- Add report name -->
<x:attribute name="name">${reportName}</x:attribute>
<!-- Add report content -->
<j:set var="scriptProperty"
value="maven.dashboard.report.${reportName}.script"/>
<j:import file="${context.getVariable(scriptProperty)}"
inherit="true"/>
</x:element>
</j:forEach>
</dashboard-single>
</j:file>
</goal>
<!--
========================================================================
Register the dashboard report.
========================================================================
-->
<goal name="maven-dashboard-plugin:register">
<d:registerReport
name="Dashboard"
pluginName="dashboard"
description="Dashboard report aggregating different quality reports"
link="${maven.dashboard.report.xdoc}"/>
</goal>
<!--
========================================================================
Deregister the dashboard report.
========================================================================
-->
<goal name="maven-dashboard-plugin:deregister">
<d:deregisterReport name="Dashboard"/>
</goal>
</project>
1.1 maven-plugins/dashboard/sample/subproject1/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<!-- the version of maven's project object model -->
<pomVersion>3</pomVersion>
<!-- a unique name for this project -->
<id>maven-dashboard-sample-subproject1</id>
<!-- a short but descriptive name for the project -->
<name>Dashboard Sample Subproject1</name>
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>1.0</currentVersion>
<!-- details about the organization that 'owns' the project -->
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
</organization>
<!-- the year the project started -->
<inceptionYear>2003</inceptionYear>
<!-- the top level of java packages that this project defines
e.g. if your project contains the packages
com.mycompany.accounts.reports, com.mycompany.accounts.reports
and com.mycompany.accounts.utils, the package would be
'com.mycompany.accounts' -->
<package>org.apache.maven.dashboard.sample.subproject1</package>
<!-- a short description of what the project does -->
<shortDescription>A sample project using the Dashboard report</shortDescription>
<!-- the project home page -->
<url>http://maven.apache.org/</url>
<!-- the version control repository and http url for online access
the connection element has the form:
scm:<system>:<system specific connection string> -->
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:maven</connection>
<url>http://cvs.apache.org/viewcvs/maven/</url>
</repository>
<!-- any mailing lists for the project -->
<mailingLists/>
<!-- who the developers are for the project -->
<developers/>
<!-- jar files the project is dependent on -->
<dependencies/>
<!-- build information for the project -->
<build>
<sourceDirectory>src/java</sourceDirectory>
</build>
<reports>
<report>maven-checkstyle-plugin</report>
</reports>
</project>
1.1 maven-plugins/dashboard/sample/subproject1/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.checkstyle.header.file = ${basedir}/../../../LICENSE.txt
1.1 maven-plugins/dashboard/sample/subproject2/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<!-- the version of maven's project object model -->
<pomVersion>3</pomVersion>
<!-- a unique name for this project -->
<id>maven-dashboard-sample-subproject2</id>
<!-- a short but descriptive name for the project -->
<name>Dashboard Sample Subproject2</name>
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>1.0</currentVersion>
<!-- details about the organization that 'owns' the project -->
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
</organization>
<!-- the year the project started -->
<inceptionYear>2003</inceptionYear>
<!-- the top level of java packages that this project defines
e.g. if your project contains the packages
com.mycompany.accounts.reports, com.mycompany.accounts.reports
and com.mycompany.accounts.utils, the package would be
'com.mycompany.accounts' -->
<package>org.apache.maven.dashboard.sample.subproject2</package>
<!-- a short description of what the project does -->
<shortDescription>A sample project using the Dashboard report</shortDescription>
<!-- the project home page -->
<url>http://maven.apache.org/</url>
<!-- the version control repository and http url for online access
the connection element has the form:
scm:<system>:<system specific connection string> -->
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:maven</connection>
<url>http://cvs.apache.org/viewcvs/maven/</url>
</repository>
<!-- any mailing lists for the project -->
<mailingLists/>
<!-- who the developers are for the project -->
<developers/>
<!-- jar files the project is dependent on -->
<dependencies/>
<!-- build information for the project -->
<build>
<sourceDirectory>src/java</sourceDirectory>
</build>
<reports>
<report>maven-checkstyle-plugin</report>
</reports>
</project>
1.1 maven-plugins/dashboard/sample/subproject2/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.checkstyle.header.file = ${basedir}/../../../LICENSE.txt
1.1
maven-plugins/dashboard/src/plugin-resources/templates/dashboard.jsl
Index: dashboard.jsl
===================================================================
<?xml version="1.0"?>
<jsl:stylesheet
select="$doc"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:x="jelly:xml"
xmlns="dummy" trim="false">
<jsl:template match="dashboard">
<document>
<properties>
<title>Dashboard Report</title>
</properties>
<body>
<section name="Dashboard report">
<table>
<tr>
<th>Project</th>
<x:forEach var="reportName" select="project[1]/report/@name">
<th>
<j:set var="labelProperty"
value="maven.dashboard.report.${reportName.value}.label"/>
<j:expr value="${context.getVariable(labelProperty)}"/>
</th>
</x:forEach>
</tr>
<jsl:applyTemplates/>
</table>
</section>
</body>
</document>
</jsl:template>
<jsl:template match="project">
<tr>
<td><x:expr select="@name"/></td>
<jsl:applyTemplates select="report"/>
</tr>
</jsl:template>
<jsl:template match="report">
<td>
<x:expr select="text()"/>
</td>
</jsl:template>
</jsl:stylesheet>
1.1
maven-plugins/dashboard/sample/subproject2/src/java/org/apache/maven/dashboard/sample/subproject2/Sample.java
Index: Sample.java
===================================================================
package org.apache.maven.dashboard.sample.subproject2;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Maven" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Maven", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
/**
* Example voluntarily generating checsktyle errors.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
* @version $Id: Sample.java,v 1.1 2003/11/04 21:11:32 vmassol Exp $
*/
public class Sample
{
public void someMethod()
{
// Voluntarily using different brace rules to generate checkstyle
// errors...
if (true) {
}
else
{
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]