Added Simian total duplicate line aggregator + improved error handling
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115098 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
dadfaf66ba
commit
1c5fb567e3
11 files changed
+165
-44
No files matched your search
@@ -168,6 +168,12 @@
|
||||
<!-- Add aggregator content -->
|
||||
<j:set var="scriptProperty"
|
||||
value="maven.dashboard.aggregator.${aggregatorName}.script"/>
|
||||
|
||||
<!-- Verify if the script exists... -->
|
||||
<j:if test="${context.getVariable(scriptProperty) == null}">
|
||||
<a:fail>Invalid aggregator name [${aggregatorName}]</a:fail>
|
||||
</j:if>
|
||||
|
||||
<j:import file="${context.getVariable(scriptProperty)}"
|
||||
inherit="true"/>
|
||||
|
||||
|
||||
@@ -141,9 +141,16 @@ maven.dashboard.aggregator.juniterrors.label = JUnit Errors
|
||||
maven.dashboard.aggregator.juniterrors.goal = junit-report:report
|
||||
maven.dashboard.aggregator.juniterrors.description = Number of JUnit test errors
|
||||
|
||||
# Properties for the JUnit Pass Rate aggregator
|
||||
# Properties for the JUnit Pass Rate aggregator
|
||||
maven.dashboard.aggregator.junitpassrate.script = ${maven.dashboard.aggregators.dir}/junitpassrate.jelly
|
||||
maven.dashboard.aggregator.junitpassrate.artifact = ${maven.build.dir}/TESTS-TestSuites.xml
|
||||
maven.dashboard.aggregator.junitpassrate.label = JUnit Pass Rate
|
||||
maven.dashboard.aggregator.junitpassrate.goal = junit-report:report
|
||||
maven.dashboard.aggregator.junitpassrate.description = Percentage of JUnit tests that have passed vs tests in error or failed
|
||||
|
||||
# Properties for the Simian duplicate lines aggregator
|
||||
maven.dashboard.aggregator.simiantdl.script = ${maven.dashboard.aggregators.dir}/simiantdl.jelly
|
||||
maven.dashboard.aggregator.simiantdl.artifact = ${maven.build.dir}/generated-xdocs/simian-report.xml
|
||||
maven.dashboard.aggregator.simiantdl.label = Simian TDL
|
||||
maven.dashboard.aggregator.simiantdl.goal = maven-simian-plugin:report
|
||||
maven.dashboard.aggregator.simiantdl.description = Simian Total Duplicate Lines
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2004 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!--
|
||||
========================================================================
|
||||
Total number of duplicate lines as found by Simian.
|
||||
========================================================================
|
||||
-->
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
|
||||
|
||||
<u:file var="artifactAsFile"
|
||||
name="${maven.dashboard.aggregator.simiantdl.artifact}"/>
|
||||
<j:choose>
|
||||
<j:when test="${artifactAsFile.exists()}">
|
||||
<x:parse var="doc" xml="${artifactAsFile}"/>
|
||||
<x:expr select="$doc//th[string() = 'Total number of duplicate lines']/following-sibling::*/text()"/>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<j:expr value="-"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</j:jelly>
|
||||
@@ -18,10 +18,11 @@
|
||||
# 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.xdoc.version=${pom.currentVersion}
|
||||
maven.checkstyle.header.file = ${basedir}/LICENSE.txt
|
||||
|
||||
offline=true
|
||||
maven.simian.linecount = 5
|
||||
|
||||
# MUST specify these, even though they are the defaults, so we can run
|
||||
# inside reactor where they were already set.
|
||||
|
||||
@@ -21,6 +21,6 @@ maven.xdoc.date=left
|
||||
## maven.xdoc.version=${pom.currentVersion}
|
||||
maven.checkstyle.header.file = ${basedir}/../LICENSE.txt
|
||||
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors,simiantdl
|
||||
|
||||
maven.clover.report.xml = true
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
@@ -37,5 +38,6 @@
|
||||
<report>maven-checkstyle-plugin</report>
|
||||
<report>maven-clover-plugin</report>
|
||||
<report>maven-junit-report-plugin</report>
|
||||
<report>maven-simian-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
@@ -21,5 +21,5 @@ maven.xdoc.date=left
|
||||
## maven.xdoc.version=${pom.currentVersion}
|
||||
maven.checkstyle.header.file = ${basedir}/../LICENSE.txt
|
||||
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors,simiantdl
|
||||
maven.dashboard.rungoals = true
|
||||
@@ -21,4 +21,4 @@ maven.xdoc.date=left
|
||||
## maven.xdoc.version=${pom.currentVersion}
|
||||
maven.checkstyle.header.file = ${basedir}/../LICENSE.txt
|
||||
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors
|
||||
maven.dashboard.aggregators = csall,cserrors,cswarnings,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors,simiantdl
|
||||
@@ -109,6 +109,13 @@
|
||||
Percentage of JUnit tests that have passed.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>simiantdl</td>
|
||||
<td>Simian</td>
|
||||
<td>
|
||||
Total number of duplicate lines found by Simian.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
<body>
|
||||
|
||||
<release version="1.3" date="in CVS">
|
||||
<action dev="vmassol" type="update">
|
||||
Better error reporting when a wrong aggregator name is used.
|
||||
</action>
|
||||
<action dev="vmassol" type="add">
|
||||
Added Simian Total Duplicate Lines aggregator.
|
||||
</action>
|
||||
<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
|
||||
|
||||
@@ -37,14 +37,22 @@ 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).
|
||||
# Generated dashboard main report 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
|
||||
# Generated dashboard legend 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.legend.xdoc = dashboard-report-legend
|
||||
|
||||
# Location of JSL template to generate the main report xdoc file
|
||||
maven.dashboard.template = ${plugin.resources}/templates/dashboard.jsl
|
||||
|
||||
# Location of JSL template to generate the legend report xdoc file
|
||||
maven.dashboard.template.legend = ${plugin.resources}/templates/legend.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
|
||||
@@ -61,52 +69,96 @@ maven.dashboard.report.showempty = true
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# Location of default dashboard aggregators
|
||||
maven.dashboard.aggregators.dir = ${plugin.resources}/reports
|
||||
maven.dashboard.aggregators.dir = ${plugin.resources}/aggregators
|
||||
|
||||
# Comma-separated list of aggregators to use
|
||||
maven.dashboard.aggregators = cserrors,cswarnings,clovertpc,cloverloc,cloverncloc
|
||||
|
||||
# Properties for the Checkstyle error/warning aggregator (all errors/warnings)
|
||||
maven.dashboard.aggregator.csall.script = ${maven.dashboard.aggregators.dir}/csall.jelly
|
||||
maven.dashboard.aggregator.csall.artifact = ${maven.build.dir}/checkstyle-raw-report.xml
|
||||
maven.dashboard.aggregator.csall.label = CS err/warn
|
||||
maven.dashboard.aggregator.csall.goal = checkstyle
|
||||
|
||||
# Properties for the Checkstyle error aggregator (only errors)
|
||||
maven.dashboard.aggregator.cserrors.script = ${maven.dashboard.aggregators.dir}/cserrors.jelly
|
||||
maven.dashboard.aggregator.cserrors.artifact = ${maven.build.dir}/checkstyle-raw-report.xml
|
||||
maven.dashboard.aggregator.cserrors.label = CS errors
|
||||
maven.dashboard.aggregator.cserrors.goal = checkstyle
|
||||
|
||||
# Properties for the Checkstyle warning aggregator (only warnings)
|
||||
maven.dashboard.aggregator.cswarnings.script = ${maven.dashboard.aggregators.dir}/cswarnings.jelly
|
||||
maven.dashboard.aggregator.cswarnings.artifact = ${maven.build.dir}/checkstyle-raw-report.xml
|
||||
maven.dashboard.aggregator.cswarnings.label = CS warnings
|
||||
maven.dashboard.aggregator.cswarnings.goal = checkstyle
|
||||
|
||||
# Properties for the Clover TPC aggregator (TPC = Total Percent Coverage)
|
||||
maven.dashboard.aggregator.clovertpc.script = ${maven.dashboard.aggregators.dir}/clovertpc.jelly
|
||||
maven.dashboard.aggregator.clovertpc.artifact = ${maven.build.dir}/clover.xml
|
||||
maven.dashboard.aggregator.clovertpc.label = Clover TPC
|
||||
maven.dashboard.aggregator.clovertpc.goal = clover
|
||||
|
||||
# Properties for the Clover LOC aggregator (LOC = Line Of Code)
|
||||
maven.dashboard.aggregator.cloverloc.script = ${maven.dashboard.aggregators.dir}/cloverloc.jelly
|
||||
maven.dashboard.aggregator.cloverloc.artifact = ${maven.build.dir}/clover.xml
|
||||
maven.dashboard.aggregator.cloverloc.label = Clover LOC
|
||||
maven.dashboard.aggregator.cloverloc.goal = clover
|
||||
|
||||
# Properties for the Clover NCLOC aggregator (NCLOC = Non Comment Line Of Code)
|
||||
maven.dashboard.aggregator.cloverncloc.script = ${maven.dashboard.aggregators.dir}/cloverncloc.jelly
|
||||
maven.dashboard.aggregator.cloverncloc.artifact = ${maven.build.dir}/clover.xml
|
||||
maven.dashboard.aggregator.cloverncloc.label = Clover NCLOC
|
||||
maven.dashboard.aggregator.cloverncloc.goal = clover
|
||||
|
||||
# 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
|
||||
|
||||
# Default aggregators
|
||||
# -------------------
|
||||
|
||||
# Properties for the Checkstyle error/warning aggregator (all errors/warnings)
|
||||
maven.dashboard.aggregator.csall.script = ${maven.dashboard.aggregators.dir}/csall.jelly
|
||||
maven.dashboard.aggregator.csall.artifact = ${maven.build.dir}/checkstyle-raw-report.xml
|
||||
maven.dashboard.aggregator.csall.label = CS err/warn
|
||||
maven.dashboard.aggregator.csall.goal = checkstyle
|
||||
maven.dashboard.aggregator.csall.description = Number of Checkstyle errors and warnings
|
||||
|
||||
# Properties for the Checkstyle error aggregator (only errors)
|
||||
maven.dashboard.aggregator.cserrors.script = ${maven.dashboard.aggregators.dir}/cserrors.jelly
|
||||
maven.dashboard.aggregator.cserrors.artifact = ${maven.build.dir}/checkstyle-raw-report.xml
|
||||
maven.dashboard.aggregator.cserrors.label = CS errors
|
||||
maven.dashboard.aggregator.cserrors.goal = checkstyle
|
||||
maven.dashboard.aggregator.cserrors.description = Number of Checkstyle errors
|
||||
|
||||
# Properties for the Checkstyle warning aggregator (only warnings)
|
||||
maven.dashboard.aggregator.cswarnings.script = ${maven.dashboard.aggregators.dir}/cswarnings.jelly
|
||||
maven.dashboard.aggregator.cswarnings.artifact = ${maven.build.dir}/checkstyle-raw-report.xml
|
||||
maven.dashboard.aggregator.cswarnings.label = CS warnings
|
||||
maven.dashboard.aggregator.cswarnings.goal = checkstyle
|
||||
maven.dashboard.aggregator.cswarnings.description = Number of Checkstyle warnings
|
||||
|
||||
# Properties for the Clover TPC aggregator (TPC = Total Percent Coverage)
|
||||
maven.dashboard.aggregator.clovertpc.script = ${maven.dashboard.aggregators.dir}/clovertpc.jelly
|
||||
maven.dashboard.aggregator.clovertpc.artifact = ${maven.build.dir}/clover.xml
|
||||
maven.dashboard.aggregator.clovertpc.label = Clover TPC
|
||||
maven.dashboard.aggregator.clovertpc.goal = clover
|
||||
maven.dashboard.aggregator.clovertpc.description = Number of test coverage percentage
|
||||
|
||||
# Properties for the Clover LOC aggregator (LOC = Line Of Code)
|
||||
maven.dashboard.aggregator.cloverloc.script = ${maven.dashboard.aggregators.dir}/cloverloc.jelly
|
||||
maven.dashboard.aggregator.cloverloc.artifact = ${maven.build.dir}/clover.xml
|
||||
maven.dashboard.aggregator.cloverloc.label = Clover LOC
|
||||
maven.dashboard.aggregator.cloverloc.goal = clover
|
||||
maven.dashboard.aggregator.cloverloc.description = Number of line of code (including comments)
|
||||
|
||||
# Properties for the Clover NCLOC aggregator (NCLOC = Non Comment Line Of Code)
|
||||
maven.dashboard.aggregator.cloverncloc.script = ${maven.dashboard.aggregators.dir}/cloverncloc.jelly
|
||||
maven.dashboard.aggregator.cloverncloc.artifact = ${maven.build.dir}/clover.xml
|
||||
maven.dashboard.aggregator.cloverncloc.label = Clover NCLOC
|
||||
maven.dashboard.aggregator.cloverncloc.goal = clover
|
||||
maven.dashboard.aggregator.cloverncloc.description = Number of non-commented lines of code
|
||||
|
||||
# Properties for the JUnit Test aggregator
|
||||
maven.dashboard.aggregator.junittests.script = ${maven.dashboard.aggregators.dir}/junittests.jelly
|
||||
maven.dashboard.aggregator.junittests.artifact = ${maven.build.dir}/TESTS-TestSuites.xml
|
||||
maven.dashboard.aggregator.junittests.label = JUnit Tests
|
||||
maven.dashboard.aggregator.junittests.goal = junit-report:report
|
||||
maven.dashboard.aggregator.junittests.description = Number of JUnit tests
|
||||
|
||||
# Properties for the JUnit Failures aggregator
|
||||
maven.dashboard.aggregator.junitfailures.script = ${maven.dashboard.aggregators.dir}/junitfailures.jelly
|
||||
maven.dashboard.aggregator.junitfailures.artifact = ${maven.build.dir}/TESTS-TestSuites.xml
|
||||
maven.dashboard.aggregator.junitfailures.label = JUnit Failures
|
||||
maven.dashboard.aggregator.junitfailures.goal = junit-report:report
|
||||
maven.dashboard.aggregator.junitfailures.description = Number of JUnit test failures
|
||||
|
||||
# Properties for the JUnit Errors aggregator
|
||||
maven.dashboard.aggregator.juniterrors.script = ${maven.dashboard.aggregators.dir}/juniterrors.jelly
|
||||
maven.dashboard.aggregator.juniterrors.artifact = ${maven.build.dir}/TESTS-TestSuites.xml
|
||||
maven.dashboard.aggregator.juniterrors.label = JUnit Errors
|
||||
maven.dashboard.aggregator.juniterrors.goal = junit-report:report
|
||||
maven.dashboard.aggregator.juniterrors.description = Number of JUnit test errors
|
||||
|
||||
# Properties for the JUnit Pass Rate aggregator
|
||||
maven.dashboard.aggregator.junitpassrate.script = ${maven.dashboard.aggregators.dir}/junitpassrate.jelly
|
||||
maven.dashboard.aggregator.junitpassrate.artifact = ${maven.build.dir}/TESTS-TestSuites.xml
|
||||
maven.dashboard.aggregator.junitpassrate.label = JUnit Pass Rate
|
||||
maven.dashboard.aggregator.junitpassrate.goal = junit-report:report
|
||||
maven.dashboard.aggregator.junitpassrate.description = Percentage of JUnit tests that have passed vs tests in error or failed
|
||||
|
||||
# Properties for the Simian duplicate lines aggregator
|
||||
maven.dashboard.aggregator.simiantdl.script = ${maven.dashboard.aggregators.dir}/simiantdl.jelly
|
||||
maven.dashboard.aggregator.simiantdl.artifact = ${maven.build.dir}/generated-xdocs/simian-report.xml
|
||||
maven.dashboard.aggregator.simiantdl.label = Simian TDL
|
||||
maven.dashboard.aggregator.simiantdl.goal = maven-simian-plugin:report
|
||||
maven.dashboard.aggregator.simiantdl.description = Simian Total Duplicate Lines
|
||||
]]></source>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
Reference in new issue
Block a user