From a578ec3c6f3f6ef0ecfc827ef27212a883b4f5ac Mon Sep 17 00:00:00 2001 From: vmassol Date: Fri, 22 Apr 2005 19:15:46 +0000 Subject: [PATCH] MPCLOVER-35: Always generate Clover reports even when there is no coverage data. One of the reason is that Clover generates metrics other than coverage percentage, like LOC and NCLOC which are useful in themselves. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@164270 13f79535-47bb-0310-9956-ffa450edef68 --- clover/plugin.jelly | 19 +++++---- .../testGenerateReportWhenNoTests/maven.xml | 40 +++++++++++++++++++ .../project.properties | 19 +++++++++ .../testGenerateReportWhenNoTests/project.xml | 28 +++++++++++++ .../org/apache/maven/clover/test/Simple.java | 25 ++++++++++++ clover/xdocs/changes.xml | 5 +++ 6 files changed, 129 insertions(+), 7 deletions(-) create mode 100644 clover/src/plugin-test/testGenerateReportWhenNoTests/maven.xml create mode 100644 clover/src/plugin-test/testGenerateReportWhenNoTests/project.properties create mode 100644 clover/src/plugin-test/testGenerateReportWhenNoTests/project.xml create mode 100644 clover/src/plugin-test/testGenerateReportWhenNoTests/src/main/org/apache/maven/clover/test/Simple.java diff --git a/clover/plugin.jelly b/clover/plugin.jelly index 71b70e8f..182bf2b1 100644 --- a/clover/plugin.jelly +++ b/clover/plugin.jelly @@ -214,18 +214,24 @@ + + - - + + + + - No tests to run Clover on + No sources and not tests to run Clover on + + - @@ -324,8 +330,7 @@ - @@ -383,7 +388,7 @@ - diff --git a/clover/src/plugin-test/testGenerateReportWhenNoTests/maven.xml b/clover/src/plugin-test/testGenerateReportWhenNoTests/maven.xml new file mode 100644 index 00000000..6367d20c --- /dev/null +++ b/clover/src/plugin-test/testGenerateReportWhenNoTests/maven.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/clover/src/plugin-test/testGenerateReportWhenNoTests/project.properties b/clover/src/plugin-test/testGenerateReportWhenNoTests/project.properties new file mode 100644 index 00000000..cdf76c3b --- /dev/null +++ b/clover/src/plugin-test/testGenerateReportWhenNoTests/project.properties @@ -0,0 +1,19 @@ +# ------------------------------------------------------------------- +# 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. +# ------------------------------------------------------------------- + +maven.clover.report.xml = true +maven.clover.report.html = true +maven.clover.report.pdf = true diff --git a/clover/src/plugin-test/testGenerateReportWhenNoTests/project.xml b/clover/src/plugin-test/testGenerateReportWhenNoTests/project.xml new file mode 100644 index 00000000..9dd7db01 --- /dev/null +++ b/clover/src/plugin-test/testGenerateReportWhenNoTests/project.xml @@ -0,0 +1,28 @@ + + + + + + ${basedir}/../project.xml + testGenerateReportWhenNoTests + testGenerateReportWhenNoTests + + src/main + + diff --git a/clover/src/plugin-test/testGenerateReportWhenNoTests/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testGenerateReportWhenNoTests/src/main/org/apache/maven/clover/test/Simple.java new file mode 100644 index 00000000..b441aa6e --- /dev/null +++ b/clover/src/plugin-test/testGenerateReportWhenNoTests/src/main/org/apache/maven/clover/test/Simple.java @@ -0,0 +1,25 @@ +package org.apache.maven.clover.test; + +/* ==================================================================== + * Copyright 2001-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. + * ==================================================================== + */ + +public class Simple +{ + public void someMethod() + { + } +} \ No newline at end of file diff --git a/clover/xdocs/changes.xml b/clover/xdocs/changes.xml index 8284452c..2c70ba03 100644 --- a/clover/xdocs/changes.xml +++ b/clover/xdocs/changes.xml @@ -26,6 +26,11 @@ + + Always generate Clover reports even when there is no coverage data. One + of the reason is that Clover generates metrics other than coverage + percentage, like LOC and NCLOC which are useful in themselves. + Upgraded to Clover 1.3.6 Added PDF report generation.