From 1e4d5620ceccf3b5c17463ada9bfe1a7c37c2944 Mon Sep 17 00:00:00 2001
From: vmassol
Date: Sat, 29 Nov 2003 19:11:31 +0000
Subject: [PATCH] Added JUnit aggregators. Thanks to John D Taylor. John I had
to change several things from your patch: - remove tabs - added missind
documentation (xdoc) - added missing tests - it was not working. More
specifically it would not work if the clover aggregators were used before the
junit ones - the goal caused by the junit aggregators was not the correct
one... (you were calling "test" whereas it's the junit-report that must be
called)
Please note that I had to modify both the Clover plugin and the junit-report one. So if you wish to use the junit aggregators you need to have the CVS versions of the these 2 plugins installed.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114431 13f79535-47bb-0310-9956-ffa450edef68
---
dashboard/plugin.properties | 37 ++++++++++++++++---
dashboard/project.xml | 6 +++
.../{reports => aggregators}/cloverloc.jelly | 0
.../cloverncloc.jelly | 0
.../{reports => aggregators}/clovertpc.jelly | 0
.../{reports => aggregators}/csall.jelly | 0
.../{reports => aggregators}/cserrors.jelly | 0
.../{reports => aggregators}/cswarnings.jelly | 0
.../aggregators/juniterrors.jelly | 22 +++++++++++
.../aggregators/junitfailures.jelly | 22 +++++++++++
.../aggregators/junitpassrate.jelly | 22 +++++++++++
.../aggregators/junittests.jelly | 23 ++++++++++++
dashboard/src/plugin-test/maven.xml | 1 -
dashboard/src/plugin-test/project.properties | 2 -
.../subproject1/project.properties | 2 +
.../subproject2/project.properties | 2 +
.../subproject3/project.properties | 2 +
dashboard/xdocs/aggregators.xml | 28 ++++++++++++++
dashboard/xdocs/changes.xml | 3 ++
19 files changed, 164 insertions(+), 8 deletions(-)
rename dashboard/src/plugin-resources/{reports => aggregators}/cloverloc.jelly (100%)
rename dashboard/src/plugin-resources/{reports => aggregators}/cloverncloc.jelly (100%)
rename dashboard/src/plugin-resources/{reports => aggregators}/clovertpc.jelly (100%)
rename dashboard/src/plugin-resources/{reports => aggregators}/csall.jelly (100%)
rename dashboard/src/plugin-resources/{reports => aggregators}/cserrors.jelly (100%)
rename dashboard/src/plugin-resources/{reports => aggregators}/cswarnings.jelly (100%)
create mode 100644 dashboard/src/plugin-resources/aggregators/juniterrors.jelly
create mode 100644 dashboard/src/plugin-resources/aggregators/junitfailures.jelly
create mode 100644 dashboard/src/plugin-resources/aggregators/junitpassrate.jelly
create mode 100644 dashboard/src/plugin-resources/aggregators/junittests.jelly
diff --git a/dashboard/plugin.properties b/dashboard/plugin.properties
index 8acc85d7..ce1b76f0 100644
--- a/dashboard/plugin.properties
+++ b/dashboard/plugin.properties
@@ -40,11 +40,20 @@ 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
+# 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
@@ -81,8 +90,26 @@ 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
+# 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
-# Decide whether to call goals associated with report types or not
-maven.dashboard.rungoals = true
+# 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
+
+# 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
+
+# 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
diff --git a/dashboard/project.xml b/dashboard/project.xml
index 7e93736d..1aee19f8 100644
--- a/dashboard/project.xml
+++ b/dashboard/project.xml
@@ -46,6 +46,12 @@
+
+
+ John D Taylor
+ jdt@roe.ac.uk
+
+
maven-changes-plugin
diff --git a/dashboard/src/plugin-resources/reports/cloverloc.jelly b/dashboard/src/plugin-resources/aggregators/cloverloc.jelly
similarity index 100%
rename from dashboard/src/plugin-resources/reports/cloverloc.jelly
rename to dashboard/src/plugin-resources/aggregators/cloverloc.jelly
diff --git a/dashboard/src/plugin-resources/reports/cloverncloc.jelly b/dashboard/src/plugin-resources/aggregators/cloverncloc.jelly
similarity index 100%
rename from dashboard/src/plugin-resources/reports/cloverncloc.jelly
rename to dashboard/src/plugin-resources/aggregators/cloverncloc.jelly
diff --git a/dashboard/src/plugin-resources/reports/clovertpc.jelly b/dashboard/src/plugin-resources/aggregators/clovertpc.jelly
similarity index 100%
rename from dashboard/src/plugin-resources/reports/clovertpc.jelly
rename to dashboard/src/plugin-resources/aggregators/clovertpc.jelly
diff --git a/dashboard/src/plugin-resources/reports/csall.jelly b/dashboard/src/plugin-resources/aggregators/csall.jelly
similarity index 100%
rename from dashboard/src/plugin-resources/reports/csall.jelly
rename to dashboard/src/plugin-resources/aggregators/csall.jelly
diff --git a/dashboard/src/plugin-resources/reports/cserrors.jelly b/dashboard/src/plugin-resources/aggregators/cserrors.jelly
similarity index 100%
rename from dashboard/src/plugin-resources/reports/cserrors.jelly
rename to dashboard/src/plugin-resources/aggregators/cserrors.jelly
diff --git a/dashboard/src/plugin-resources/reports/cswarnings.jelly b/dashboard/src/plugin-resources/aggregators/cswarnings.jelly
similarity index 100%
rename from dashboard/src/plugin-resources/reports/cswarnings.jelly
rename to dashboard/src/plugin-resources/aggregators/cswarnings.jelly
diff --git a/dashboard/src/plugin-resources/aggregators/juniterrors.jelly b/dashboard/src/plugin-resources/aggregators/juniterrors.jelly
new file mode 100644
index 00000000..a96a43ec
--- /dev/null
+++ b/dashboard/src/plugin-resources/aggregators/juniterrors.jelly
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dashboard/src/plugin-resources/aggregators/junitfailures.jelly b/dashboard/src/plugin-resources/aggregators/junitfailures.jelly
new file mode 100644
index 00000000..58889a95
--- /dev/null
+++ b/dashboard/src/plugin-resources/aggregators/junitfailures.jelly
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dashboard/src/plugin-resources/aggregators/junitpassrate.jelly b/dashboard/src/plugin-resources/aggregators/junitpassrate.jelly
new file mode 100644
index 00000000..94d2e8a5
--- /dev/null
+++ b/dashboard/src/plugin-resources/aggregators/junitpassrate.jelly
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+ %
+
+
+
+
+
+
+
diff --git a/dashboard/src/plugin-resources/aggregators/junittests.jelly b/dashboard/src/plugin-resources/aggregators/junittests.jelly
new file mode 100644
index 00000000..0cbd6a8c
--- /dev/null
+++ b/dashboard/src/plugin-resources/aggregators/junittests.jelly
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dashboard/src/plugin-test/maven.xml b/dashboard/src/plugin-test/maven.xml
index f8b8ce28..015112cf 100644
--- a/dashboard/src/plugin-test/maven.xml
+++ b/dashboard/src/plugin-test/maven.xml
@@ -35,5 +35,4 @@
-
\ No newline at end of file
diff --git a/dashboard/src/plugin-test/project.properties b/dashboard/src/plugin-test/project.properties
index 89c6d4e5..0b57fd5f 100644
--- a/dashboard/src/plugin-test/project.properties
+++ b/dashboard/src/plugin-test/project.properties
@@ -5,6 +5,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
-
offline=true
diff --git a/dashboard/src/plugin-test/subproject1/project.properties b/dashboard/src/plugin-test/subproject1/project.properties
index 4e429a7b..540bb761 100644
--- a/dashboard/src/plugin-test/subproject1/project.properties
+++ b/dashboard/src/plugin-test/subproject1/project.properties
@@ -4,3 +4,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
diff --git a/dashboard/src/plugin-test/subproject2/project.properties b/dashboard/src/plugin-test/subproject2/project.properties
index 4e429a7b..540bb761 100644
--- a/dashboard/src/plugin-test/subproject2/project.properties
+++ b/dashboard/src/plugin-test/subproject2/project.properties
@@ -4,3 +4,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
diff --git a/dashboard/src/plugin-test/subproject3/project.properties b/dashboard/src/plugin-test/subproject3/project.properties
index 4e429a7b..540bb761 100644
--- a/dashboard/src/plugin-test/subproject3/project.properties
+++ b/dashboard/src/plugin-test/subproject3/project.properties
@@ -4,3 +4,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
diff --git a/dashboard/xdocs/aggregators.xml b/dashboard/xdocs/aggregators.xml
index 8cf03f9c..37a78c7e 100644
--- a/dashboard/xdocs/aggregators.xml
+++ b/dashboard/xdocs/aggregators.xml
@@ -62,6 +62,34 @@
Computes total Non-Commented Line Of Code (NCLOC) using Clover.
+
+ | junittests |
+ JUnit |
+
+ Number of JUnit tests.
+ |
+
+
+ | juniterrors |
+ JUnit |
+
+ Number of JUnit errors.
+ |
+
+
+ | junitfailures |
+ JUnit |
+
+ Number of JUnit failures.
+ |
+
+
+ | junitpassrate |
+ JUnit |
+
+ Percentage of JUnit tests that have passed.
+ |
+
+
+ Added JUnit aggregators.
+
Added tutorial on how to create custom aggregators.