Updated plugin tests to verify we can generate the dashboard report by using the multiproject:site goal. Also updated documentation accordingly.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115094 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c48891dd9f
commit
6cde04d3b7
@ -185,31 +185,32 @@
|
||||
========================================================================
|
||||
-->
|
||||
<goal name="dashboard:run-goals">
|
||||
|
||||
<!-- Make sure that the Clover plugin generates only the XML report (as
|
||||
this is report used by the Clover aggregators to extract information
|
||||
from). The reason we disable the other reports is to win some response
|
||||
time. -->
|
||||
<j:set var="cloverReportXml"
|
||||
value="${pom.getVariable('maven.clover.report.xml')}"/>
|
||||
<j:set var="maven.clover.report.xml" value="true" scope="parent"/>
|
||||
<j:set var="cloverReportHtml"
|
||||
value="${pom.getVariable('maven.clover.report.html')}"/>
|
||||
<j:set var="maven.clover.report.html" value="false" scope="parent"/>
|
||||
<j:set var="cloverReportSwing"
|
||||
value="${pom.getVariable('maven.clover.report.swing')}"/>
|
||||
<j:set var="maven.clover.report.swing" value="false" scope="parent"/>
|
||||
|
||||
<u:tokenize var="aggregatorNames" delim=",">${maven.dashboard.aggregators}</u:tokenize>
|
||||
|
||||
<!-- Property used to remember what goals have already been called -->
|
||||
<j:set var="executedGoals" value=""/>
|
||||
|
||||
<!-- 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'}">
|
||||
|
||||
<!-- Make sure that the Clover plugin generates only the XML report (as
|
||||
this is report used by the Clover aggregators to extract information
|
||||
from). The reason we disable the other reports is to win some response
|
||||
time. -->
|
||||
<j:set var="cloverReportXml"
|
||||
value="${pom.getVariable('maven.clover.report.xml')}"/>
|
||||
<j:set var="maven.clover.report.xml" value="true" scope="parent"/>
|
||||
<j:set var="cloverReportHtml"
|
||||
value="${pom.getVariable('maven.clover.report.html')}"/>
|
||||
<j:set var="maven.clover.report.html" value="false" scope="parent"/>
|
||||
<j:set var="cloverReportSwing"
|
||||
value="${pom.getVariable('maven.clover.report.swing')}"/>
|
||||
<j:set var="maven.clover.report.swing" value="false" scope="parent"/>
|
||||
|
||||
<u:tokenize var="aggregatorNames" delim=",">${maven.dashboard.aggregators}</u:tokenize>
|
||||
|
||||
<!-- Property used to remember what goals have already been called -->
|
||||
<j:set var="executedGoals" value=""/>
|
||||
|
||||
<j:forEach var="aggregatorName" items="${aggregatorNames}">
|
||||
|
||||
<a:echo>Generating data for aggregator [${aggregatorName}]</a:echo>
|
||||
@ -242,15 +243,16 @@
|
||||
</j:if>
|
||||
|
||||
</j:forEach>
|
||||
</j:if>
|
||||
|
||||
<!-- Restore Clover plugin properties -->
|
||||
<j:set var="maven.clover.report.xml" value="${cloverReportXml}"
|
||||
scope="parent"/>
|
||||
<j:set var="maven.clover.report.html" value="${cloverReportHtml}"
|
||||
scope="parent"/>
|
||||
<j:set var="maven.clover.report.swing" value="${cloverReportSwing}"
|
||||
scope="parent"/>
|
||||
<!-- Restore Clover plugin properties -->
|
||||
<j:set var="maven.clover.report.xml" value="${cloverReportXml}"
|
||||
scope="parent"/>
|
||||
<j:set var="maven.clover.report.html" value="${cloverReportHtml}"
|
||||
scope="parent"/>
|
||||
<j:set var="maven.clover.report.swing" value="${cloverReportSwing}"
|
||||
scope="parent"/>
|
||||
|
||||
</j:if>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
<attainGoal name="multiproject:goal"/>
|
||||
|
||||
<!-- Call goal to test -->
|
||||
<attainGoal name="site"/>
|
||||
<j:set var="maven.multiproject.site.goals" value="site,dashboard:report-single"/>
|
||||
<attainGoal name="multiproject:site"/>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
@ -28,3 +28,8 @@ offline=true
|
||||
maven.multiproject.basedir=${basedir}
|
||||
maven.multiproject.includes=*/project.xml
|
||||
maven.multiproject.excludes=
|
||||
|
||||
# Turn off these properties are we're using the multiproject plugin to
|
||||
# generate the dashboard
|
||||
maven.dashboard.rungoals = false
|
||||
maven.dashboard.runreactor = false
|
||||
|
||||
@ -22,3 +22,5 @@ maven.xdoc.date=left
|
||||
maven.checkstyle.header.file = ${basedir}/../LICENSE.txt
|
||||
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors
|
||||
|
||||
maven.clover.report.xml = true
|
||||
|
||||
@ -36,5 +36,6 @@
|
||||
<reports>
|
||||
<report>maven-checkstyle-plugin</report>
|
||||
<report>maven-clover-plugin</report>
|
||||
<report>maven-junit-report-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
|
||||
@ -22,3 +22,4 @@ maven.xdoc.date=left
|
||||
maven.checkstyle.header.file = ${basedir}/../LICENSE.txt
|
||||
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors
|
||||
maven.dashboard.rungoals = true
|
||||
|
||||
@ -22,6 +22,8 @@
|
||||
<id>test-maven-dashboard-plugin-subproject2</id>
|
||||
<name>Maven Dashboard plugin test - Subproject2</name>
|
||||
<reports>
|
||||
<report>maven-checkstyle-plugin</report>
|
||||
<!-- Voluntarily do not put any report. We're forcing the execution
|
||||
of artifact goals using the maven.dashboard.rungoals=true
|
||||
property -->
|
||||
</reports>
|
||||
</project>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
|
||||
@ -27,6 +27,11 @@
|
||||
<body>
|
||||
|
||||
<release version="1.3" date="in CVS">
|
||||
<action dev="vmassol" type="update">
|
||||
Updated plugin tests to verify we can generate the dashboard
|
||||
report by using the multiproject:site goal. Also updated documentation
|
||||
accordingly.
|
||||
</action>
|
||||
<action dev="vmassol" type="update">
|
||||
Removed explicit dependencies on <code>maven-clover-plugin</code> and
|
||||
<code>maven-junit-report-plugin</code>. The reason I've removed the
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
@ -17,7 +18,6 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
|
||||
<document>
|
||||
<properties>
|
||||
<title>Maven Dashboard plugin goals</title>
|
||||
|
||||
@ -84,32 +84,42 @@
|
||||
<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>
|
||||
<subsection name="Solution 3: Using the multiproject plugin">
|
||||
<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.
|
||||
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>
|
||||
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 aggregators 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.
|
||||
Add the following 3 properties to your master project:
|
||||
</p>
|
||||
<source><![CDATA[
|
||||
# Tells the dashboard plugin not to run its own reactor.
|
||||
# We'll use the one run by the multiproject.
|
||||
maven.dashboard.runreactor = false
|
||||
|
||||
# (optional). Tells the dashboard not to specifically run
|
||||
# artifact goals (i.e. goals that generate artifacts that we aggregate
|
||||
# in the dashboard report). For example, if you already have defined
|
||||
# the reports generating these artifacts, you'd be better setting
|
||||
# rungoals to false so that the artifact goals are only run once.
|
||||
maven.dashboard.rungoals = false
|
||||
|
||||
# Tells the multiproject plugin to execute the dashboard:report-single
|
||||
# goal on each project when you run it through multiproject:site.
|
||||
maven.multiproject.site.goals=site,dashboard:report-single
|
||||
]]></source>
|
||||
<p>
|
||||
Then generate the site by running the <code>multiproject:site</code>
|
||||
goal.
|
||||
</p>
|
||||
|
||||
</subsection>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
@ -17,7 +18,6 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
|
||||
<document>
|
||||
<properties>
|
||||
<title>Maven Dashboard plugin properties</title>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user