vmassol 98d793400e - Added a quick usage guide in the documentation.
- Fixed issue where <code>clover:report</code> was not calling <code>clover:on</code> leading to an error when generating the reports.
- Ensure that <code>clover:init</code>, <code>clover:on</code> and <code>clover:off</code> can only be called once. For example calling <code>clover:on</code> twice in a row will execute it only once.
- The <code>clover:*-report</code> goals do not call <code>clover:test</code> anymore. They only generates Clover reports. This is now aligned with the <code>clover:report</code> behavior. To run the full thing, execute the <code>clover</code> goal or add the Clover report to your project's POM.
- Added a <code>maven.clover.multiproject</code> property that should be set to true in your master project (if you're using a multiproject setup). Setting it to true will make the <code>clover</code> goal and the <code>maven-clover-plugin</code> report in your POM execute on all subprojects (they'll call the new <code>clover:multiproject</code> goal).
- New <code>clover:multiproject</code> goal to run Clover on a multiproject setup.
- New <code>clover:merge</code> goal that creates a new Clover database by merging several other databases specified using the <code>maven.clover.merge.databases</code> property (which defaults to <code>**/clover_coverage.db</code>).


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@169652 13f79535-47bb-0310-9956-ffa450edef68
2005-05-11 16:28:26 +00:00

75 lines
3.1 KiB
XML

<?xml version="1.0"?>
<!--
/*
* 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.
*/
-->
<document>
<properties>
<title>Maven Clover plugin</title>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<section name="Maven Clover plugin">
<p>
The Clover plugin is the place where
<a href="http://www.cenqua.com/clover/">Clover</a> tools are found
in Maven.
</p>
<p>
Clover is a tool that generates Test Coverage reports. It is free for
non-commercial use. If your project is a commercial project you will
need to get a license for the Clover jar before using this plugin.
</p>
</section>
<section name="Using the Clover plugin">
<p>
There are 3 possible ways of running the plugin:
</p>
<ul>
<li>
<b>All in one</b>: You'll either call the <code>clover</code> goal or
add the <code>maven-clover-plugin</code> report to the <code>reports</code>
section in your POM. This will instrument your source code, run your
project's tests on the cloverified code and generate Clover reports. Note that
if you're in a multiproject setup, you must set the
<code>maven.clover.multiproject</code> property to <code>true</code> in your master
project. Doing so will automatically gather Clover data from all your subprojects
and aggregate them in a master project report.
</li>
<li>
<b>In 2 steps</b>: You'll call <code>clover:test</code> which will
instrument your source code and run your project's tests on the cloverified code.
Alternatively you can call <code>clover:multiproject</code> to run the
<code>clover:test</code> goal on all your subprojects in you're in a multiproject
setup. You'll then need to call <code>clover:report</code> to generate the reports.
</li>
<li>
<b>In 3 steps</b>: You'll call <code>clover:on</code> followed by whatever other
goal you wish (for example <code>maven clover:on war</code>.) This will instrument
your source code. Then you'll run any goal that tests your artifacts. For example
in the case of a WAR you can use HttpUnit/HtmlUnit to run functional tests. The
test of your artifact will fill the Clover database with data. Finally you'll run
<code>clover:report</code> to generate the reports.
</li>
</ul>
</section>
</body>
</document>