- Reorganized the plugin tests using a multiproject approach
- MPCLOVER-18: Added new <code>maven.clover.execute.during.report</code> property to control whether or not the <code>clover-report</code> 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
This commit is contained in:
parent
bce1589140
commit
10b1738df2
@ -353,7 +353,17 @@
|
||||
========================================================================
|
||||
-->
|
||||
<goal name="maven-clover-plugin:report">
|
||||
<!-- If maven.clover.execute.during.report is set to false then don't
|
||||
execute Clover during site report generation -->
|
||||
<j:choose>
|
||||
<j:when test="${context.getVariable('maven.clover.execute.during.report')}">
|
||||
<attainGoal name="clover"/>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<attainGoal name="clover:report"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
@ -15,40 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:assert="assert">
|
||||
<project default="testPlugin" xmlns:j="jelly:core">
|
||||
|
||||
<goal name="testPlugin">
|
||||
|
||||
<!-- Fixture -->
|
||||
<attainGoal name="clean"/>
|
||||
|
||||
<!-- Make sure (to some extent) that we support multiple source and
|
||||
test paths -->
|
||||
<ant:mkdir dir="${maven.build.dir}/clovertestdir"/>
|
||||
<ant:path id="test.classpath">
|
||||
<ant:pathelement path="${maven.build.dir}/clovertestdir"/>
|
||||
</ant:path>
|
||||
<maven:addPath id="maven.compile.src.set" refid="test.classpath"/>
|
||||
<maven:addPath id="maven.test.compile.src.set" refid="test.classpath"/>
|
||||
|
||||
<!-- Call goal to test -->
|
||||
<attainGoal name="site"/>
|
||||
|
||||
<!-- Verifications -->
|
||||
<assert:assertFileExists file="${maven.docs.dest}/clover/index.html"/>
|
||||
|
||||
<!-- Call report which will generate both the HTML and XML reports -->
|
||||
<attainGoal name="clover"/>
|
||||
|
||||
<!-- Verifications -->
|
||||
<assert:assertFileExists file="${maven.build.dir}/clover.xml"/>
|
||||
|
||||
<j:set var="goal" value="testPlugin"/>
|
||||
<attainGoal name="multiproject:goal"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@ -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
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
* 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.
|
||||
@ -20,8 +20,6 @@
|
||||
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>test-maven-clover-plugin</id>
|
||||
<name>Maven Clover plugin test</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<organization>
|
||||
@ -39,16 +37,4 @@
|
||||
<mailingLists/>
|
||||
<developers/>
|
||||
<dependencies/>
|
||||
<build>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
|
||||
<unitTest>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
</unitTest>
|
||||
</build>
|
||||
<reports>
|
||||
<report>maven-clover-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
<project default="testPlugin"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:assert="assert">
|
||||
|
||||
<goal name="testPlugin">
|
||||
<attainGoal name="clean"/>
|
||||
<attainGoal name="site"/>
|
||||
<assert:assertFileNotFound file="${maven.docs.dest}/clover/index.html"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@ -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
|
||||
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<extend>${basedir}/../project.xml</extend>
|
||||
<id>testDontExecuteInReportAndNoReportGenerated</id>
|
||||
<name>testDontExecuteInReportAndNoReportGenerated</name>
|
||||
<build>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
|
||||
<unitTest>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
</unitTest>
|
||||
</build>
|
||||
<reports>
|
||||
<report>maven-junit-report-plugin</report>
|
||||
<report>maven-clover-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
33
clover/src/plugin-test/testRunCloverOnlyOnce/maven.xml
Normal file
33
clover/src/plugin-test/testRunCloverOnlyOnce/maven.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
<project default="testPlugin"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:assert="assert">
|
||||
|
||||
<goal name="testPlugin">
|
||||
<attainGoal name="clean"/>
|
||||
<attainGoal name="clover:on"/>
|
||||
<attainGoal name="site"/>
|
||||
<assert:assertFileExists file="${maven.docs.dest}/clover/index.html"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@ -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
|
||||
38
clover/src/plugin-test/testRunCloverOnlyOnce/project.xml
Normal file
38
clover/src/plugin-test/testRunCloverOnlyOnce/project.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<extend>${basedir}/../project.xml</extend>
|
||||
<id>testRunCloverOnlyOnce</id>
|
||||
<name>testRunCloverOnlyOnce</name>
|
||||
<build>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
|
||||
<unitTest>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
</unitTest>
|
||||
</build>
|
||||
<reports>
|
||||
<report>maven-junit-report-plugin</report>
|
||||
<report>maven-clover-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
@ -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
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
public class Simple
|
||||
{
|
||||
public void someMethod()
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class SimpleTest extends TestCase
|
||||
{
|
||||
public void testSomeMethod()
|
||||
{
|
||||
Simple simple = new Simple();
|
||||
simple.someMethod();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
<project default="testPlugin"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:assert="assert">
|
||||
|
||||
<goal name="testPlugin">
|
||||
|
||||
<!-- Fixture -->
|
||||
<attainGoal name="clean"/>
|
||||
|
||||
<!-- Make sure (to some extent) that we support multiple source and
|
||||
test paths -->
|
||||
<ant:mkdir dir="${maven.build.dir}/clovertestdir"/>
|
||||
<ant:path id="test.classpath">
|
||||
<ant:pathelement path="${maven.build.dir}/clovertestdir"/>
|
||||
</ant:path>
|
||||
<maven:addPath id="maven.compile.src.set" refid="test.classpath"/>
|
||||
<maven:addPath id="maven.test.compile.src.set" refid="test.classpath"/>
|
||||
|
||||
<!-- Call goal to test -->
|
||||
<attainGoal name="site"/>
|
||||
|
||||
<!-- Verifications -->
|
||||
<assert:assertFileExists file="${maven.docs.dest}/clover/index.html"/>
|
||||
|
||||
<!-- Call report which will generate both the HTML and XML reports -->
|
||||
<attainGoal name="clover"/>
|
||||
|
||||
<!-- Verifications -->
|
||||
<assert:assertFileExists file="${maven.build.dir}/clover.xml"/>
|
||||
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@ -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
|
||||
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<extend>${basedir}/../project.xml</extend>
|
||||
<id>testSiteReportAndXmlReportGeneration</id>
|
||||
<name>testSiteReportAndXmlReportGeneration</name>
|
||||
<build>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
|
||||
<unitTest>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
</unitTest>
|
||||
</build>
|
||||
<reports>
|
||||
<report>maven-clover-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
@ -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
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
public class Simple
|
||||
{
|
||||
public void someMethod()
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class SimpleTest extends TestCase
|
||||
{
|
||||
public void testSomeMethod()
|
||||
{
|
||||
Simple simple = new Simple();
|
||||
simple.someMethod();
|
||||
}
|
||||
}
|
||||
@ -26,6 +26,12 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.7-SNAPSHOT" date="in SVN">
|
||||
<action dev="vmassol" type="update" issue="MPCLOVER-18">
|
||||
Added new <code>maven.clover.execute.during.report</code> property
|
||||
to control whether or not the <code>clover-report</code>
|
||||
goal builds Cloverify the sources and execute the tests
|
||||
(defaults to true).
|
||||
</action>
|
||||
<action dev="vmassol" type="update" issue="MPCLOVER-24">
|
||||
Deprecated <code>maven.clover.database.dir</code> property and
|
||||
replaced it with a <code>maven.cover.database</code> property that
|
||||
|
||||
@ -123,6 +123,17 @@
|
||||
<code>${plugin.getDependencyPath('clover:clover-license')}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.clover.execute.during.report</td>
|
||||
<td>Yes</td>
|
||||
<td>
|
||||
Controls whether or not the <code>clover-report</code>
|
||||
goal builds Cloverify the sources and execute the tests.
|
||||
</td>
|
||||
<td>
|
||||
<code>true</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user