git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@521198 13f79535-47bb-0310-9956-ffa450edef68
76 lines
3.2 KiB
XML
76 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The ASF licenses this file to You 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>
|