-
+
+
+
+
+
+
+
+
+
+
+ ${maven.clover.check.packages}
+ ${maven.clover.check.targets}
+
+
+
+
+
+
+
+
+
diff --git a/clover/plugin.properties b/clover/plugin.properties
index cdd46932..b98d6eb1 100644
--- a/clover/plugin.properties
+++ b/clover/plugin.properties
@@ -59,3 +59,12 @@ maven.clover.execute.during.report = true
# List of files to include/exclude from Cloverification
maven.clover.includes = **/*.java
maven.clover.excludes =
+
+# 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%
+
+# Per-package list of test coverage % under which the build will fail when
+# clover:check is called
+# maven.clover.check.packages=my.package1,my.package2
+# maven.clover.check.targets=10%,80%
diff --git a/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/main/org/apache/maven/clover/test/Simple.java
index a149deaa..b441aa6e 100644
--- a/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/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,58 +1,19 @@
package org.apache.maven.clover.test;
/* ====================================================================
- * The Apache Software License, Version 1.1
+ * Copyright 2001-2005 The Apache Software Foundation.
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
- * reserved.
+ * 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
*
- * 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
- * .
+ * 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/testDontExecuteInReportAndNoReportGenerated/src/test/org/apache/maven/clover/test/SimpleTest.java b/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/src/test/org/apache/maven/clover/test/SimpleTest.java
index 14b8f226..d18d53df 100644
--- a/clover/src/plugin-test/testDontExecuteInReportAndNoReportGenerated/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,58 +1,19 @@
package org.apache.maven.clover.test;
/* ====================================================================
- * The Apache Software License, Version 1.1
+ * Copyright 2001-2005 The Apache Software Foundation.
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
- * reserved.
+ * 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
*
- * 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
- * .
+ * 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/testFailBuildOnLowCoverage/maven.xml b/clover/src/plugin-test/testFailBuildOnLowCoverage/maven.xml
new file mode 100644
index 00000000..24b65486
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/maven.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/clover/src/plugin-test/testFailBuildOnLowCoverage/project.properties b/clover/src/plugin-test/testFailBuildOnLowCoverage/project.properties
new file mode 100644
index 00000000..e7d9c413
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/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/testFailBuildOnLowCoverage/project.xml b/clover/src/plugin-test/testFailBuildOnLowCoverage/project.xml
new file mode 100644
index 00000000..f1e0afb5
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/project.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ ${basedir}/../project.xml
+ testFailBuildOnLowCoverage
+ testFailBuildOnLowCoverage
+
+ src/main
+ src/test
+
+
+ **/*Test.java
+
+
+
+
diff --git a/clover/src/plugin-test/testFailBuildOnLowCoverage/src/main/org/apache/maven/clover/test/Simple.java b/clover/src/plugin-test/testFailBuildOnLowCoverage/src/main/org/apache/maven/clover/test/Simple.java
new file mode 100644
index 00000000..b441aa6e
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/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/testFailBuildOnLowCoverage/src/main/org/apache/maven/clover/test2/Simple2.java b/clover/src/plugin-test/testFailBuildOnLowCoverage/src/main/org/apache/maven/clover/test2/Simple2.java
new file mode 100644
index 00000000..0c3d9aed
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/src/main/org/apache/maven/clover/test2/Simple2.java
@@ -0,0 +1,37 @@
+package org.apache.maven.clover.test2;
+
+/* ====================================================================
+ * 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 Simple2
+{
+ public void someMethod()
+ {
+ }
+
+ public void someMethod2()
+ {
+ }
+
+ public void someMethod3()
+ {
+ }
+
+ public void someMethod4()
+ {
+ }
+}
\ No newline at end of file
diff --git a/clover/src/plugin-test/testFailBuildOnLowCoverage/src/test/org/apache/maven/clover/test/SimpleTest.java b/clover/src/plugin-test/testFailBuildOnLowCoverage/src/test/org/apache/maven/clover/test/SimpleTest.java
new file mode 100644
index 00000000..d18d53df
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/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/src/plugin-test/testFailBuildOnLowCoverage/src/test/org/apache/maven/clover/test2/Simple2Test.java b/clover/src/plugin-test/testFailBuildOnLowCoverage/src/test/org/apache/maven/clover/test2/Simple2Test.java
new file mode 100644
index 00000000..c78ca707
--- /dev/null
+++ b/clover/src/plugin-test/testFailBuildOnLowCoverage/src/test/org/apache/maven/clover/test2/Simple2Test.java
@@ -0,0 +1,29 @@
+package org.apache.maven.clover.test2;
+
+/* ====================================================================
+ * 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 Simple2Test extends TestCase
+{
+ public void testSomeMethod()
+ {
+ Simple2 simple = new Simple2();
+ simple.someMethod();
+ }
+}
\ No newline at end of file
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
index a149deaa..b441aa6e 100644
--- 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
@@ -1,58 +1,19 @@
package org.apache.maven.clover.test;
/* ====================================================================
- * The Apache Software License, Version 1.1
+ * Copyright 2001-2005 The Apache Software Foundation.
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
- * reserved.
+ * 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
*
- * 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
- * .
+ * 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/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
index 14b8f226..d18d53df 100644
--- 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
@@ -1,58 +1,19 @@
package org.apache.maven.clover.test;
/* ====================================================================
- * The Apache Software License, Version 1.1
+ * Copyright 2001-2005 The Apache Software Foundation.
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
- * reserved.
+ * 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
*
- * 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
- * .
+ * 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/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
index a149deaa..b441aa6e 100644
--- 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
@@ -1,58 +1,19 @@
package org.apache.maven.clover.test;
/* ====================================================================
- * The Apache Software License, Version 1.1
+ * Copyright 2001-2005 The Apache Software Foundation.
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
- * reserved.
+ * 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
*
- * 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
- * .
+ * 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/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
index 14b8f226..d18d53df 100644
--- 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
@@ -1,58 +1,19 @@
package org.apache.maven.clover.test;
/* ====================================================================
- * The Apache Software License, Version 1.1
+ * Copyright 2001-2005 The Apache Software Foundation.
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
- * reserved.
+ * 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
*
- * 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
- * .
+ * 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/xdocs/changes.xml b/clover/xdocs/changes.xml
index 13b7aaf2..d8851306 100644
--- a/clover/xdocs/changes.xml
+++ b/clover/xdocs/changes.xml
@@ -26,6 +26,14 @@
+
+ Added new clover:check goal that verifies if the
+ test coverage if above a threshold defined by the properties
+ maven.clover.check.target,
+ maven.clover.check.packages and
+ maven.clover.check.targets. It fails the build
+ if it's below.
+
Changed the location of the default license. It is now bundled in the
plugin and the plugin no longer downloads it from your remote
diff --git a/clover/xdocs/goals.xml b/clover/xdocs/goals.xml
index 71ee184c..c7ad2757 100644
--- a/clover/xdocs/goals.xml
+++ b/clover/xdocs/goals.xml
@@ -103,6 +103,13 @@
Deactivates Clover, resetting back the normal javac compiler.
+
+ clover:check
+
+ Fail the build if the test coverage percentage is below a defined
+ threshold.
+
+
\ No newline at end of file
diff --git a/clover/xdocs/properties.xml b/clover/xdocs/properties.xml
index 4e771b34..b455dfd6 100644
--- a/clover/xdocs/properties.xml
+++ b/clover/xdocs/properties.xml
@@ -154,6 +154,40 @@
+
+ | maven.clover.target |
+ Yes |
+
+ Test coverage % under which the build will fail when
+ clover:check is called.
+ |
+
+ 50%
+ |
+
+
+ | maven.clover.packages |
+ Yes |
+
+ Comma-separated list of packages that you wish to check for
+ test coverage % when clover:check is called.
+ |
+
+ N/A
+ |
+
+
+ | maven.clover.targets |
+ Yes |
+
+ Comma-separated list of test coverage % that you wish to check for
+ each packages specified by maven.clover.packages when
+ clover:check is called.
+ |
+
+ N/A
+ |
+