From 10b1738df27f4586d1dbd7242f4da930be0555c1 Mon Sep 17 00:00:00 2001 From: vmassol Date: Fri, 11 Feb 2005 15:38:52 +0000 Subject: [PATCH] - Reorganized the plugin tests using a multiproject approach - MPCLOVER-18: Added new maven.clover.execute.during.report property to control whether or not the clover-report goal builds Cloverify the sources and execute the tests (defaults to true). git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@153413 13f79535-47bb-0310-9956-ffa450edef68 --- clover/plugin.jelly | 12 +- clover/plugin.properties | 5 + clover/src/plugin-test/maven.xml | 37 +---- clover/src/plugin-test/project.properties | 4 +- clover/src/plugin-test/project.xml | 16 +-- .../maven.xml | 32 +++++ .../project.properties | 17 +++ .../project.xml | 38 +++++ .../org/apache/maven/clover/test/Simple.java | 126 ++++++++-------- .../apache/maven/clover/test/SimpleTest.java | 134 +++++++++--------- .../testRunCloverOnlyOnce/maven.xml | 33 +++++ .../testRunCloverOnlyOnce/project.properties | 17 +++ .../testRunCloverOnlyOnce/project.xml | 38 +++++ .../org/apache/maven/clover/test/Simple.java | 64 +++++++++ .../apache/maven/clover/test/SimpleTest.java | 68 +++++++++ .../maven.xml | 54 +++++++ .../project.properties | 18 +++ .../project.xml | 37 +++++ .../org/apache/maven/clover/test/Simple.java | 64 +++++++++ .../apache/maven/clover/test/SimpleTest.java | 68 +++++++++ clover/xdocs/changes.xml | 6 + clover/xdocs/properties.xml | 11 ++ 22 files changed, 717 insertions(+), 182 deletions(-) create mode 100644 clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/maven.xml create mode 100644 clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.properties create mode 100644 clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.xml rename clover/src/plugin-test/{ => testDontExecuteInReportAndNoReportGenerated}/src/main/org/apache/maven/clover/test/Simple.java (97%) rename clover/src/plugin-test/{ => testDontExecuteInReportAndNoReportGenerated}/src/test/org/apache/maven/clover/test/SimpleTest.java (97%) create mode 100644 clover/src/plugin-test/testRunCloverOnlyOnce/maven.xml create mode 100644 clover/src/plugin-test/testRunCloverOnlyOnce/project.properties create mode 100644 clover/src/plugin-test/testRunCloverOnlyOnce/project.xml create mode 100644 clover/src/plugin-test/testRunCloverOnlyOnce/src/main/org/apache/maven/clover/test/Simple.java create mode 100644 clover/src/plugin-test/testRunCloverOnlyOnce/src/test/org/apache/maven/clover/test/SimpleTest.java create mode 100644 clover/src/plugin-test/testSiteReportAndXmlReportGeneration/maven.xml create mode 100644 clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.properties create mode 100644 clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.xml create mode 100644 clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/main/org/apache/maven/clover/test/Simple.java create mode 100644 clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/test/org/apache/maven/clover/test/SimpleTest.java diff --git a/clover/plugin.jelly b/clover/plugin.jelly index e0cf1819..f40091b5 100644 --- a/clover/plugin.jelly +++ b/clover/plugin.jelly @@ -353,7 +353,17 @@ ======================================================================== --> - + + + + + + + + + + diff --git a/clover/plugin.properties b/clover/plugin.properties index 8e44bd13..f4d2f6c8 100644 --- a/clover/plugin.properties +++ b/clover/plugin.properties @@ -50,3 +50,8 @@ maven.clover.license.path = ${plugin.getDependencyPath('clover:clover-license')} maven.clover.report.html=true maven.clover.report.xml=false maven.clover.report.swing=false + +# Decide whether to execute generate Clover data during the site report +# generation or not. If false, the plugin will only generate Clover reports +# based on an existing Clover database. +maven.clover.execute.during.report = true diff --git a/clover/src/plugin-test/maven.xml b/clover/src/plugin-test/maven.xml index dd70e08a..f2683869 100644 --- a/clover/src/plugin-test/maven.xml +++ b/clover/src/plugin-test/maven.xml @@ -1,6 +1,6 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - + + \ No newline at end of file diff --git a/clover/src/plugin-test/project.properties b/clover/src/plugin-test/project.properties index 6b959e52..4e72a351 100644 --- a/clover/src/plugin-test/project.properties +++ b/clover/src/plugin-test/project.properties @@ -1,5 +1,5 @@ # ------------------------------------------------------------------- -# Copyright 2001-2004 The Apache Software Foundation. +# 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. @@ -14,5 +14,3 @@ # limitations under the License. # ------------------------------------------------------------------- -maven.clover.report.xml = true -maven.clover.instrument.tests = true diff --git a/clover/src/plugin-test/project.xml b/clover/src/plugin-test/project.xml index bc2ef8c2..b842b21b 100644 --- a/clover/src/plugin-test/project.xml +++ b/clover/src/plugin-test/project.xml @@ -2,7 +2,7 @@ + + + + + + + + + \ No newline at end of file diff --git a/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.properties b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.properties new file mode 100644 index 00000000..c918b8e2 --- /dev/null +++ b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.properties @@ -0,0 +1,17 @@ +# ------------------------------------------------------------------- +# 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.execute.during.report = false diff --git a/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.xml b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.xml new file mode 100644 index 00000000..d5aee1d5 --- /dev/null +++ b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/project.xml @@ -0,0 +1,38 @@ + + + + + + ${basedir}/../project.xml + testDontExecuteInReportAndNoReportGenerated + testDontExecuteInReportAndNoReportGenerated + + src/main + src/test + + + **/*Test.java + + + + + maven-junit-report-plugin + maven-clover-plugin + + diff --git a/clover/src/plugin-test/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/main/org/apache/maven/clover/test/Simple.java similarity index 97% rename from clover/src/plugin-test/src/main/org/apache/maven/clover/test/Simple.java rename to clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/main/org/apache/maven/clover/test/Simple.java index 3ff9246f..a149deaa 100644 --- a/clover/src/plugin-test/src/main/org/apache/maven/clover/test/Simple.java +++ b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/main/org/apache/maven/clover/test/Simple.java @@ -1,64 +1,64 @@ -package org.apache.maven.clover.test; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -public class Simple -{ - public void someMethod() - { - } +package org.apache.maven.clover.test; + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Maven" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache Maven", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ + +public class Simple +{ + public void someMethod() + { + } } \ No newline at end of file diff --git a/clover/src/plugin-test/src/test/org/apache/maven/clover/test/SimpleTest.java b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/test/org/apache/maven/clover/test/SimpleTest.java similarity index 97% rename from clover/src/plugin-test/src/test/org/apache/maven/clover/test/SimpleTest.java rename to clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/test/org/apache/maven/clover/test/SimpleTest.java index dfee3a6d..14b8f226 100644 --- a/clover/src/plugin-test/src/test/org/apache/maven/clover/test/SimpleTest.java +++ b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/test/org/apache/maven/clover/test/SimpleTest.java @@ -1,68 +1,68 @@ -package org.apache.maven.clover.test; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import junit.framework.TestCase; - -public class SimpleTest extends TestCase -{ - public void testSomeMethod() - { - Simple simple = new Simple(); - simple.someMethod(); - } +package org.apache.maven.clover.test; + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Maven" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache Maven", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ + +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/src/plugin-test/testRunCloverOnlyOnce/maven.xml b/clover/src/plugin-test/testRunCloverOnlyOnce/maven.xml new file mode 100644 index 00000000..dc1c26b2 --- /dev/null +++ b/clover/src/plugin-test/testRunCloverOnlyOnce/maven.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/clover/src/plugin-test/testRunCloverOnlyOnce/project.properties b/clover/src/plugin-test/testRunCloverOnlyOnce/project.properties new file mode 100644 index 00000000..c918b8e2 --- /dev/null +++ b/clover/src/plugin-test/testRunCloverOnlyOnce/project.properties @@ -0,0 +1,17 @@ +# ------------------------------------------------------------------- +# 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.execute.during.report = false diff --git a/clover/src/plugin-test/testRunCloverOnlyOnce/project.xml b/clover/src/plugin-test/testRunCloverOnlyOnce/project.xml new file mode 100644 index 00000000..7741deab --- /dev/null +++ b/clover/src/plugin-test/testRunCloverOnlyOnce/project.xml @@ -0,0 +1,38 @@ + + + + + + ${basedir}/../project.xml + testRunCloverOnlyOnce + testRunCloverOnlyOnce + + src/main + src/test + + + **/*Test.java + + + + + maven-junit-report-plugin + maven-clover-plugin + + diff --git a/clover/src/plugin-test/testRunCloverOnlyOnce/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testRunCloverOnlyOnce/src/main/org/apache/maven/clover/test/Simple.java new file mode 100644 index 00000000..a149deaa --- /dev/null +++ b/clover/src/plugin-test/testRunCloverOnlyOnce/src/main/org/apache/maven/clover/test/Simple.java @@ -0,0 +1,64 @@ +package org.apache.maven.clover.test; + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Maven" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache Maven", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ + +public class Simple +{ + public void someMethod() + { + } +} \ No newline at end of file diff --git a/clover/src/plugin-test/testRunCloverOnlyOnce/src/test/org/apache/maven/clover/test/SimpleTest.java b/clover/src/plugin-test/testRunCloverOnlyOnce/src/test/org/apache/maven/clover/test/SimpleTest.java new file mode 100644 index 00000000..14b8f226 --- /dev/null +++ b/clover/src/plugin-test/testRunCloverOnlyOnce/src/test/org/apache/maven/clover/test/SimpleTest.java @@ -0,0 +1,68 @@ +package org.apache.maven.clover.test; + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Maven" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache Maven", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ + +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/src/plugin-test/testSiteReportAndXmlReportGeneration/maven.xml b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/maven.xml new file mode 100644 index 00000000..692bb2d8 --- /dev/null +++ b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/maven.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.properties b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.properties new file mode 100644 index 00000000..70385182 --- /dev/null +++ b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.properties @@ -0,0 +1,18 @@ +# ------------------------------------------------------------------- +# 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. +# ------------------------------------------------------------------- + +maven.clover.report.xml = true +maven.clover.instrument.tests = true diff --git a/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.xml b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.xml new file mode 100644 index 00000000..7474f40e --- /dev/null +++ b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/project.xml @@ -0,0 +1,37 @@ + + + + + + ${basedir}/../project.xml + testSiteReportAndXmlReportGeneration + testSiteReportAndXmlReportGeneration + + src/main + src/test + + + **/*Test.java + + + + + maven-clover-plugin + + diff --git a/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/main/org/apache/maven/clover/test/Simple.java new file mode 100644 index 00000000..a149deaa --- /dev/null +++ b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/main/org/apache/maven/clover/test/Simple.java @@ -0,0 +1,64 @@ +package org.apache.maven.clover.test; + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Maven" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache Maven", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ + +public class Simple +{ + public void someMethod() + { + } +} \ No newline at end of file diff --git a/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/test/org/apache/maven/clover/test/SimpleTest.java b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/test/org/apache/maven/clover/test/SimpleTest.java new file mode 100644 index 00000000..14b8f226 --- /dev/null +++ b/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/src/test/org/apache/maven/clover/test/SimpleTest.java @@ -0,0 +1,68 @@ +package org.apache.maven.clover.test; + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache Maven" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache Maven", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ + +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 8a25a54b..ee4bc646 100644 --- a/clover/xdocs/changes.xml +++ b/clover/xdocs/changes.xml @@ -26,6 +26,12 @@ + + Added new maven.clover.execute.during.report property + to control whether or not the clover-report + goal builds Cloverify the sources and execute the tests + (defaults to true). + Deprecated maven.clover.database.dir property and replaced it with a maven.cover.database property that diff --git a/clover/xdocs/properties.xml b/clover/xdocs/properties.xml index 20411ba3..4f233d3b 100644 --- a/clover/xdocs/properties.xml +++ b/clover/xdocs/properties.xml @@ -123,6 +123,17 @@ ${plugin.getDependencyPath('clover:clover-license')} + + maven.clover.execute.during.report + Yes + + Controls whether or not the clover-report + goal builds Cloverify the sources and execute the tests. + + + true + +