vmassol     2004/07/16 11:36:26

  Modified:    clover   plugin.jelly
               clover/xdocs goals.xml changes.xml
  Log:
  - Made the following goals public by documenting them: <code>clover:report</code>, 
<code>clover:on</code>, <code>clover:off</code>, <code>clover:test</code>, 
<code>clover:test-single</code>
  - Added new <code>clover:test-single</code> goal to execute a single test case and 
to 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.
  
  Revision  Changes    Path
  1.34      +31 -4     maven-plugins/clover/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/plugin.jelly,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- plugin.jelly      16 Jul 2004 13:34:40 -0000      1.33
  +++ plugin.jelly      16 Jul 2004 18:36:26 -0000      1.34
  @@ -92,7 +92,8 @@
          need to call clover:off to reset them as they were initially.
        ========================================================================
     -->
  -  <goal name="clover:on" prereqs="clover:init">
  +  <goal name="clover:on" prereqs="clover:init"
  +      description="Activates Clover">
   
       <!-- Save properties so that they can be reset afterwards -->
       <maven:get var="ignoreTestFailureOld" plugin="maven-test-plugin"
  @@ -166,7 +167,7 @@
          the call to clover:on.
        ========================================================================
     -->
  -  <goal name="clover:off">
  +  <goal name="clover:off" description="Deactivates Clover">
   
       <j:set var="maven.build.dest" value="${mavenBuildDestTestOld}" scope="parent" />
       ${context.removeVariable('build.compiler')}
  @@ -186,7 +187,8 @@
          data.
        ========================================================================
     -->
  -  <goal name="clover:test">
  +  <goal name="clover:test"
  +      description="Compile project code with Clover and executes the unit tests">
   
       <!-- Only run clover if there are tests to execute -->
       <j:choose>
  @@ -204,11 +206,36 @@
   
     <!--
        ========================================================================
  +       Execute unit tests and Clover on a single class and generate a Swing
  +       clover report. Need to pass the "testcase" property 
  +       (maven -Dtestcase=myclass).
  +     ========================================================================
  +  -->
  +  <goal name="clover:test-single"
  +      description="Compile code with Clover and execute a single unit test"
  +
  +    <j:choose>
  +      <j:when test="${unitTestSourcesPresent == 'true'}">
  +        <attainGoal name="clover:on"/>
  +        <attainGoal name="test:single"/>
  +        <attainGoal name="clover:swing-report-internal"/>
  +        <attainGoal name="clover:off"/>
  +      </j:when>
  +      <j:otherwise>
  +        <ant:echo>No tests to run Clover on</ant:echo>
  +      </j:otherwise>
  +    </j:choose>
  +
  +  </goal>
  +
  +  <!--
  +     ========================================================================
          Generate test coverage reports. It decides what kind of reports should
          be generated.
        ========================================================================
     -->
  -  <goal name="clover:report" prereqs="clover:on">
  +  <goal name="clover:report" prereqs="clover:on"
  +      description="Generates the Clover reports"
   
       <!-- Skip reports if no coverage database has been created. -->
       <u:file var="cloverDatabaseAsFile" name="${cloverDatabase}"/>
  
  
  
  1.5       +51 -5     maven-plugins/clover/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/xdocs/goals.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- goals.xml 2 Apr 2004 21:12:02 -0000       1.4
  +++ goals.xml 16 Jul 2004 18:36:26 -0000      1.5
  @@ -41,20 +41,66 @@
         <goal>
           <name>clover</name>
           <description>
  -          This is the default goal. Does the same as the
  +          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 controller by the <code>maven.clover.report.[report name]</code>
  -          <a href="properties.html">properties</a>. Before generating a
  -          report, the goal recompiles the source code with Clover and reruns
  -          the unit tests. The generated reports show exactly what lines of 
  -          your code were exercised by your tests.
  +          <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>
       </goals>
  
  
  
  1.36      +12 -0     maven-plugins/clover/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/xdocs/changes.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- changes.xml       16 Jul 2004 13:24:00 -0000      1.35
  +++ changes.xml       16 Jul 2004 18:36:26 -0000      1.36
  @@ -26,6 +26,18 @@
     </properties>
     <body>
       <release version="1.6-SNAPSHOT" date="in CVS">
  +      <action dev="vmassol" type="update">
  +        Made the following goals public by documenting them:
  +        <code>clover:report</code>, <code>clover:on</code>,
  +        <code>clover:off</code>, <code>clover:test</code>,
  +        <code>clover:test-single</code>.
  +      </action>
  +      <action dev="vmassol" type="add" issue="MPCLOVER-9">
  +        Added new <code>clover:test-single</code> goal to execute a single test 
  +        case and to 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.
  +      </action>
         <action dev="vmassol" type="fix" issue="MPCLOVER-19">
           Now using <code>maven:get</code> and <code>maven:set</code>.
         </action>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to