maven-plugins/dashboard/xdocs/technical.xml
2005-10-01 07:06:46 +00:00

123 lines
4.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2005 The Apache Software Foundation.
*
* 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.
*/
-->
<document>
<properties>
<title>Maven Dashboard Technical Background</title>
<author email="sgoeschl@apache.org">Siegfried Goeschl</author>
</properties>
<body>
<section name="Technical Background">
<p>
The Dashboard plugin aggregates report data from multiple Maven
reports over multiple projects using the reactor. To
understand the work of the plugin better we have to look at
the following topics
</p>
<ul>
<li>How to create the report data aggregate for a single project?</li>
<li>How are the report data aggregate for the master project?</li>
</ul>
</section>
<section name="Creating report data for a single project">
<p>
The aggregation runs over the existing Maven reports but how to
get them?! Either the Dashboard plugin is told to collect data
from existing reports (but you have to make sure that all reports
exists) or it runs the required plugins itself (which
hurts the build time)
</p>
<p>
This behaviour is controlled by
</p>
<source>
maven.dashboard.rungoals = [true|false]
</source>
<p>
If this property is set to "true" the Dashboard plugin looks at
the value of 'maven.dashboard.aggregators' to determine which
plugins to run automatically. When running those plugins the
configuration of the started plugins are modified dynamically,
e.g. for the Clover plugin the XML report generation is enabled.
</p>
</section>
<section name="Aggregating data for the master project">
<p>
The aggregation for the master project is a two-step process
triggered by the reactor
</p>
<ul>
<li>Aggregate the report data for a single project</li>
<li>Aggregate the aggregated data over all projects</li>
</ul>
<subsection name="Aggregate the report data for a single project">
<p>
The result of the aggregation is a file 'dashboard-single.xml'
which could look like the following example collecting data of
JUnit, Clover, PMD, CVS and Checkstyle reports
</p>
<source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<dashboard-single>
<aggregator name="junitpassrate">100 %</aggregator>
<aggregator name="clovertpc">54%</aggregator>
<aggregator name="cloverloc">2844</aggregator>
<aggregator name="pmdviolations">0</aggregator>
<aggregator name="scmchangedfiles">5</aggregator>
<aggregator name="cserrors">27</aggregator>
</dashboard-single>
]]></source>
</subsection>
<subsection name="Aggregate the aggregated data over all projects">
<p>
It is now time to collect the aggregated data for all
subprojects which results into a 'dashboard-data.xml'.
This file is then transformed to the Dashoard HTML
report.
</p>
<source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<dashboard>
<project name="it20one-service-framework">
<aggregator name="junitpassrate">100 %</aggregator>
<aggregator name="clovertpc">54%</aggregator>
<aggregator name="cloverloc">2844</aggregator>
<aggregator name="pmdviolations">0</aggregator>
<aggregator name="scmchangedfiles">5</aggregator>
<aggregator name="cserrors">27</aggregator>
</project>
...
<project name="it20one-digistamp-service">
<aggregator name="junitpassrate">-</aggregator>
<aggregator name="clovertpc">-</aggregator>
<aggregator name="cloverloc">-</aggregator>
<aggregator name="pmdviolations">7</aggregator>
<aggregator name="scmchangedfiles">2</aggregator>
<aggregator name="cserrors">121</aggregator>
</project>
</dashboard>
]]></source>
</subsection>
</section>
</body>
</document>