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

138 lines
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 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 goals</title>
<author email="dion@apache.org">dIon Gillard</author>
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<section name="Registering a Clover report">
<p>
The typical way to use the Clover plugin is by registering a Clover
report in your <code>project.xml</code>:
</p>
<source><![CDATA[
<reports>
<report>maven-clover-plugin</report>
[...]
</reports>
]]></source>
</section>
<goals>
<goal>
<name>clover</name>
<description>
This is the default goal. It compiles the project code with Clover,
executes the unit tests and generate Clover reports by calling the
<code>clover:report</code> goal.
</description>
</goal>
<goal>
<name>clover:test</name>
<description>
Compiles the project code with Clover and executes the unit tests.
</description>
</goal>
<goal>
<name>clover:test-single</name>
<description>
Execute a single unit test and view the test coverage result directly
using the Clover Swing viewer. This is useful if you wish to quickly
see the action that a single unit test has on the code it tests.
</description>
</goal>
<goal>
<name>clover:report</name>
<description>
Generate Clover test coverage reports with Clover. There are 3
possible reports: HTML, XML or Swing. Whether a report is generated
is controlled by the <code>maven.clover.report.[report name]</code>
<a href="properties.html">properties</a>. The generated reports show
exactly what lines of your code were exercised by your tests.
</description>
</goal>
<goal>
<name>clover:xml-report</name>
<description>
Generate an XML test coverage report with Clover.
</description>
</goal>
<goal>
<name>clover:html-report</name>
<description>
Generate an HTML test coverage report with Clover.
</description>
</goal>
<goal>
<name>clover:swing-report</name>
<description>
Generate a Swing test coverage report with Clover.
</description>
</goal>
<goal>
<name>clover:on</name>
<description>
Activates Clover, which means that any other plugin calling the Ant
<code>javac</code> task will find its code compiled with Clover. This
is useful for example to Clover Cactus tests:
<code>maven clover:on cactus</code>.
</description>
</goal>
<goal>
<name>clover:off</name>
<description>
Deactivates Clover, resetting back the normal <code>javac</code> compiler.
</description>
</goal>
<goal>
<name>clover:check</name>
<description>
Fail the build if the test coverage percentage is below a defined
threshold.
</description>
</goal>
<goal>
<name>clover:save-history</name>
<description>
Saves a Clover history point that will then be used for generating
history reports when the <code>clover:report</code> goal is called.
</description>
</goal>
<goal>
<name>clover:merge</name>
<description>
Merges several Clover databases into one. This goal is meant to be
called in the top level master project (multiproject). It is called
automatically by the <code>clover:multiproject</code> goal.
</description>
</goal>
<goal>
<name>clover:multiproject</name>
<description>
Runs Clover on a multiproject and merge the Clover databases.This
goal does not generate a report; call clover:report for that or add
Clover as a report in your POM.
</description>
</goal>
</goals>
</body>
</document>