vmassol     2004/07/16 06:24:00

  Modified:    clover   plugin.jelly
               clover/xdocs changes.xml
  Log:
  Now using <code>maven:get</code> and <code>maven:set</code>.
  
  Revision  Changes    Path
  1.31      +22 -20    maven-plugins/clover/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/plugin.jelly,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- plugin.jelly      16 Jul 2004 13:06:43 -0000      1.30
  +++ plugin.jelly      16 Jul 2004 13:24:00 -0000      1.31
  @@ -34,17 +34,6 @@
     -->
     <goal name="clover:init">
   
  -    <!-- FIXME: remove and use maven:get tags -->
  -    <!-- By calling a goal from the java plugin we ensure that all its 
  -         properties are loaded and are thus accessible from this plugin -->
  -    <java:dependency-handle/>
  -    <j:set var="javaPlugin" value="${pom.getPluginContext('maven-java-plugin')}"/>
  -  
  -    <!-- By calling a goal from the test plugin we ensure that all its 
  -         properties are loaded and are thus accessible from this plugin -->
  -    <test:dependency-handle/>
  -    <j:set var="testPlugin" value="${pom.getPluginContext('maven-test-plugin')}"/>
  -
       <!-- Create an Ant <path> id that contains the Clover jar. If the user has
            defined the maven.clover.jar property then this path will contain his
            version of the clover jar. Otherwise use the version defined as a 
  @@ -104,20 +93,25 @@
        ========================================================================
     -->
     <goal name="clover:on" prereqs="clover:init">
  -     
  +
  +    <!-- Save properties so that they can be reset afterwards -->
  +    <maven:get var="ignoreTestFailureOld" plugin="maven-test-plugin"
  +        property="maven.test.failure.ignore"/>
  +    <maven:get var="junitForkOld" plugin="maven-test-plugin"
  +        property="maven.junit.fork"/>
  +
       <!-- Make sure that the report is generated whether the tests pass or 
            not -->
  -    <j:set var="ignoreTestFailureOld" value="${maven.test.failure.ignore}"/>
  -    <j:set var="junitForkOld" value="${maven.junit.fork}"/>
  -     
  -    <j:set var="maven.test.failure.ignore" scope="parent" value="true"/>
  +    <maven:set plugin="maven-test-plugin" property="maven.test.failure.ignore"
  +        value="true"/>
   
       <!-- We tell the test plugin to run tests in a forked JVM. Due to a 
            limitation in Clover, test coverage data are flushed upon JVM 
            shutdown. Running test in a forked JVM allows to write properly the
            results before the goal finishes and thus it is possible to generate
            Clover reports in the same Maven session. -->
  -    <j:set var="maven.junit.fork" scope="parent" value="true"/>
  +    <maven:set plugin="maven-test-plugin" property="maven.junit.fork"
  +        value="true"/>
   
       <echo>Setting Clover compiler</echo>
   
  @@ -151,12 +145,16 @@
               <ant:include name="**/*.java"/>
             </ant:fileset>
           </j:forEach>
  +
         </j:if>
   
       </ant:clover-setup>
   
       <echo>Now using primary build.compiler : ${build.compiler}</echo>
   
  +    <!-- Ensure that Clovered classes are generated in a directory different than 
the one 
  +         used by the Java and Test plugins for runtime classes. This is to prevent 
shipping
  +         Clovered classes by mistake. -->
       <j:set var="mavenBuildDestOld" 
value="${context.parent.getVariable('maven.build.dest')}"/>
       <j:set var="maven.build.dest" value="${maven.clover.build.classes}" 
scope="parent" />
        
  @@ -172,9 +170,13 @@
   
       <j:set var="maven.build.dest" value="${mavenBuildDestTestOld}" scope="parent" />
       ${context.removeVariable('build.compiler')}
  -    
  -    <j:set var="maven.test.failure.ignore" scope="parent" 
value="${ignoreTestFailureOld}"/>
  -    <j:set var="maven.junit.fork" scope="parent" value="${junitForkOld}"/>
  +
  +    <j:if test="${ignoreTestFailureOld != null}">
  +      <maven:set plugin="maven-test-plugin" property="maven.test.failure.ignore"
  +          value="${ignoreTestFailureOld}"/>      
  +    </j:if>
  +    <maven:set plugin="maven-test-plugin" property="maven.junit.fork"
  +        value="${junitForkOld}"/>
   
     </goal>
   
  
  
  
  1.35      +3 -0      maven-plugins/clover/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/xdocs/changes.xml,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- changes.xml       16 Jul 2004 11:12:46 -0000      1.34
  +++ changes.xml       16 Jul 2004 13:24:00 -0000      1.35
  @@ -26,6 +26,9 @@
     </properties>
     <body>
       <release version="1.6-SNAPSHOT" date="in CVS">
  +      <action dev="vmassol" type="fix" issue="MPCLOVER-19">
  +        Now using <code>maven:get</code> and <code>maven:set</code>.
  +      </action>
         <action dev="vmassol" type="update">
           The <code>clover:report</code> goal does not call the tests anymore. 
           It only generates Clover reports.
  
  
  

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

Reply via email to