Default values for <code>maven.dashboard.basedir</code>, <code>maven.dashboard.includes</code>, <code>maven.dashboard.excludes</code> and <code>maven.dashboard.ignoreFailures</code> are copied from the equivalent Multiproject properties. This should reduce the number of properties you have to set to get going as you need now only set the Multiproject properties.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@160015 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol 2005-04-04 09:26:59 +00:00
parent dbbb9aa09b
commit ae97aec17b
10 changed files with 54 additions and 34 deletions

View File

@ -2,7 +2,7 @@
<!--
/*
* Copyright 2003-2004 The Apache Software Foundation.
* Copyright 2003-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.
@ -41,31 +41,45 @@
-->
<goal name="dashboard:report" description="Generate a dashboard report">
<!-- Default reactor properties from the Multiproject plug-in -->
<m:get var="mBasedir" property="maven.multiproject.basedir" plugin="maven-multiproject-plugin"/>
<m:property var="dBasedir" name="mBaseDir" defaultValue="${basedir}"/>
<m:get var="mIncludes" property="maven.multiproject.includes" plugin="maven-multiproject-plugin"/>
<m:property var="dIncludes" name="mIncludes" defaultValue="*/project.xml"/>
<m:get var="mExcludes" property="maven.multiproject.excludes" plugin="maven-multiproject-plugin"/>
<m:property var="dExcludes" name="mExcludes" defaultValue=""/>
<m:get var="mIgnoreFailures" property="maven.multiproject.ignoreFailures" plugin="maven-multiproject-plugin"/>
<m:property var="dIgnoreFailures" name="mIgnoreFailures" defaultValue="false"/>
<!-- 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}"
basedir="${mBasedir}"
banner="Generating dashboard data for"
includes="${maven.dashboard.includes}"
excludes="${maven.dashboard.excludes}"
includes="${mIncludes}"
excludes="${mExcludes}"
postProcessing="true"
goals="dashboard:report-single"
ignoreFailures="${maven.dashboard.ignoreFailures}"/>
ignoreFailures="${mIgnoreFailures}"/>
</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}"
basedir="${mBasedir}"
banner="Gathering project list for"
includes="${maven.dashboard.includes}"
excludes="${maven.dashboard.excludes}"
includes="${mIncludes}"
excludes="${mExcludes}"
postProcessing="true"
collectOnly="true"
ignoreFailures="${maven.dashboard.ignoreFailures}"/>
ignoreFailures="${mIgnoreFailures}"/>
</j:otherwise>
</j:choose>

View File

@ -24,10 +24,13 @@
# Properties for the dashboard reactor
# ------------------------------------
maven.dashboard.basedir=${basedir}
maven.dashboard.includes=*/project.xml
maven.dashboard.excludes=**/target/**/project.xml
maven.dashboard.ignoreFailures=false
# Location of subprojects to include in the dashboard report. By default
# these properties have the same values as their Multiproject conterpart.
# You can define them if you need to set different values.
#maven.dashboard.basedir=${basedir}
#maven.dashboard.includes=*/project.xml
#maven.dashboard.excludes=
#maven.dashboard.ignoreFailures=false
# Generated dashboard xml data file
maven.dashboard.report.xml = ${maven.build.dir}/dashboard-data.xml

View File

@ -35,7 +35,6 @@
<attainGoal name="clean"/>
<!-- Call goal to test -->
<j:set var="maven.multiproject.site.goals" value="site,dashboard:report-single"/>
<attainGoal name="multiproject:site"/>
</goal>

View File

@ -14,11 +14,9 @@
# limitations under the License.
# -------------------------------------------------------------------
# MUST specify these, even though they are the defaults, so we can run
# inside reactor where they were already set.
# MUST specify these so we can run inside reactor where they were already set.
maven.multiproject.basedir = ${basedir}
maven.multiproject.includes = */project.xml
maven.multiproject.excludes = common/project.xml
# Ensure we don't build common/project.xml in the dashboard report
maven.dashboard.excludes=**/target/**/project.xml,common/project.xml
maven.multiproject.site.goals = site,dashboard:report-single

View File

@ -1,3 +0,0 @@
target
maven.log
jcoverage.ser

View File

@ -1,4 +0,0 @@
target
maven.log
velocity.log
jcoverage.ser

View File

@ -1,2 +0,0 @@
target
maven.log

View File

@ -25,6 +25,14 @@
</properties>
<body>
<release version="1.8-SNAPSHOT" date="in SVN">
<action dev="vmassol" type="update">
Default values for <code>maven.dashboard.basedir</code>,
<code>maven.dashboard.includes</code>, <code>maven.dashboard.excludes</code>
and <code>maven.dashboard.ignoreFailures</code> are copied from
the equivalent Multiproject properties. This should reduce the number of
properties you have to set to get going as you need now only set the
Multiproject properties.
</action>
<action dev="vmassol" type="fix" issue="MPDASHBOARD-17" due-to="Philippe Kernevez">
Prevent failure in <code><junitpassrate.jelly/code> due to a division
by zero when there is a unit test source directory defined but no tests

View File

@ -42,6 +42,10 @@
maven.dashboard.basedir=${basedir}
maven.dashboard.includes=*/project.xml
maven.dashboard.excludes=**/target/**/project.xml]]></source>
<p>
It's also possible to set the Multiproject properties as they are used by default
by the Dashboard plugin.
</p>
</answer>
</faq>

View File

@ -29,10 +29,13 @@
# Properties for the dashboard reactor
# ------------------------------------
maven.dashboard.basedir=${basedir}
maven.dashboard.includes=*/project.xml
maven.dashboard.excludes=**/target/**/project.xml
maven.dashboard.ignoreFailures=false
# Location of subprojects to include in the dashboard report. By default
# these properties have the same values as their Multiproject conterpart.
# You can define them if you need to set different values.
#maven.dashboard.basedir=${basedir}
#maven.dashboard.includes=*/project.xml
#maven.dashboard.excludes=
#maven.dashboard.ignoreFailures=false
# Generated dashboard xml data file
maven.dashboard.report.xml = ${maven.build.dir}/dashboard-data.xml