diff --git a/clover/plugin.jelly b/clover/plugin.jelly index 7ef371f1..13a6aa79 100644 --- a/clover/plugin.jelly +++ b/clover/plugin.jelly @@ -64,13 +64,10 @@ - - - @@ -81,6 +78,8 @@ + + + + + + + @@ -331,7 +335,23 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clover/plugin.properties b/clover/plugin.properties index 0a035a49..7707f21a 100644 --- a/clover/plugin.properties +++ b/clover/plugin.properties @@ -60,6 +60,11 @@ maven.clover.execute.during.report = true maven.clover.includes = **/*.java maven.clover.excludes = +# Directory where Clover history data are saved. If you wish to save your +# history point data so that they are not erased, point this directory to +# a safe place that will not be deleted by a "maven clean". +maven.clover.history.dir = ${maven.clover.build}/history + # Test coverage % under which the build will fail when clover:check is called. # Set it to an empty value if you wish to only use the per-package definitions. maven.clover.check.target = 50% diff --git a/clover/src/plugin-test/testGenerateHistoryReport/maven.xml b/clover/src/plugin-test/testGenerateHistoryReport/maven.xml new file mode 100644 index 00000000..a482c11f --- /dev/null +++ b/clover/src/plugin-test/testGenerateHistoryReport/maven.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/clover/src/plugin-test/testGenerateHistoryReport/project.properties b/clover/src/plugin-test/testGenerateHistoryReport/project.properties new file mode 100644 index 00000000..e7d9c413 --- /dev/null +++ b/clover/src/plugin-test/testGenerateHistoryReport/project.properties @@ -0,0 +1,15 @@ +# ------------------------------------------------------------------- +# 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. +# ------------------------------------------------------------------- diff --git a/clover/src/plugin-test/testGenerateHistoryReport/project.xml b/clover/src/plugin-test/testGenerateHistoryReport/project.xml new file mode 100644 index 00000000..472d3f5b --- /dev/null +++ b/clover/src/plugin-test/testGenerateHistoryReport/project.xml @@ -0,0 +1,37 @@ + + + + + + ${basedir}/../project.xml + testGenerateHistoryReport + testGenerateHistoryReport + + src/main + src/test + + + **/*Test.java + + + + + maven-clover-plugin + + diff --git a/clover/src/plugin-test/testGenerateHistoryReport/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testGenerateHistoryReport/src/main/org/apache/maven/clover/test/Simple.java new file mode 100644 index 00000000..b441aa6e --- /dev/null +++ b/clover/src/plugin-test/testGenerateHistoryReport/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/src/plugin-test/testGenerateHistoryReport/src/test/org/apache/maven/clover/test/SimpleTest.java b/clover/src/plugin-test/testGenerateHistoryReport/src/test/org/apache/maven/clover/test/SimpleTest.java new file mode 100644 index 00000000..d18d53df --- /dev/null +++ b/clover/src/plugin-test/testGenerateHistoryReport/src/test/org/apache/maven/clover/test/SimpleTest.java @@ -0,0 +1,29 @@ +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. + * ==================================================================== + */ + +import junit.framework.TestCase; + +public class SimpleTest extends TestCase +{ + public void testSomeMethod() + { + Simple simple = new Simple(); + simple.someMethod(); + } +} \ No newline at end of file diff --git a/clover/xdocs/changes.xml b/clover/xdocs/changes.xml index dd900152..603c1aac 100644 --- a/clover/xdocs/changes.xml +++ b/clover/xdocs/changes.xml @@ -26,6 +26,13 @@ + + Added support for historical reports by adding a new + clover:save-history goal that saves a Clover + history point. The history points are then used by + clover:report to generate history reports + (including a link on the Maven-generated website). + Updated to Clover 1.3.5 and applied new license that supports generating history report (the previous one didn't support it). diff --git a/clover/xdocs/goals.xml b/clover/xdocs/goals.xml index c7ad2757..935ca2b0 100644 --- a/clover/xdocs/goals.xml +++ b/clover/xdocs/goals.xml @@ -110,6 +110,13 @@ threshold. + + clover:save-history + + Saves a Clover history point that will then be used for generating + history reports when the clover:report goal is called. + + \ No newline at end of file diff --git a/clover/xdocs/properties.xml b/clover/xdocs/properties.xml index 41387c3c..2fe6e0d3 100644 --- a/clover/xdocs/properties.xml +++ b/clover/xdocs/properties.xml @@ -246,6 +246,20 @@ N/A + + maven.clover.history.dir + Yes + + Directory where Clover history data are saved. If you wish to save + your history point data so that they are not erased, point this + directory to a safe place that will not be deleted by a + "maven clean". In the future we will try to implement saving the + history points in the Maven repositories. + + + ${maven.clover.build}/history + +