vmassol     2003/11/29 09:15:33

  Modified:    clover   plugin.jelly
               clover/xdocs changes.xml
  Log:
  - Make sure that the clover plugin restore other plugin's properties it has modified.
  - Removed public <code>clover:on</code> goal as it should not have been public. 
  
  Revision  Changes    Path
  1.15      +22 -25    maven-plugins/clover/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/plugin.jelly,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- plugin.jelly      10 Nov 2003 12:09:38 -0000      1.14
  +++ plugin.jelly      29 Nov 2003 17:15:32 -0000      1.15
  @@ -15,9 +15,6 @@
     <test:dependency-handle/>
     <j:set var="testPlugin" value="${pom.getPluginContext('maven-test-plugin')}"/>
     
  -  <!--ant:echo>Java Plugin: ${javaPlugin}</ant:echo>
  -  <ant:echo>Test Plugin: ${testPlugin}</ant:echo-->
  -  
     <ant:path id="clover.classpath">
       <ant:pathelement path="${plugin.getDependencyPath('clover')}"/>
     </ant:path>
  @@ -46,9 +43,7 @@
     <!-- Prepare for clover                                                  -->
     <!-- =================================================================== -->
   
  -  <goal
  -    name="clover:on"
  -    description="Create the needed directory structure">
  +  <goal name="clover:on">
        
        <ant:taskdef resource="clovertasks"/>
       <ant:typedef resource="clovertypes"/>
  @@ -56,20 +51,6 @@
       <j:set var="cloverDatabase" 
           value="${maven.clover.database.dir}/clover_coverage.db"/>
       
  -    <preGoal name="java:compile">
  -      <echo>Setting Clover compiler</echo>
  -      <ant:clover-setup 
  -             initstring="${cloverDatabase}"
  -             flushpolicy="interval"
  -             flushinterval="500"
  -             />
  -      <echo>Now using primary build.compiler : ${build.compiler}</echo>
  -    </preGoal>
  -
  -    <postGoal name="java:compile">
  -      ${pom.getContext().removeVariable('build.compiler')}
  -    </postGoal>
  -
        <clover-setup initstring="${cloverDatabase}"/>
        
       <j:set var="cloverReportDirectory" value="${maven.docs.dest}/clover"/>
  @@ -81,10 +62,6 @@
       <ant:mkdir dir="${maven.clover.database.dir}"/>
       <ant:mkdir dir="${cloverReportDirectory}"/>
   
  -    <j:set var="tmp" value="${maven.build.clover.classes}"/>
  -    ${pom.getPluginContext('maven-java-plugin').setVariable('maven.build.dest',tmp)}
  -    ${pom.getPluginContext('maven-test-plugin').setVariable('maven.build.dest',tmp)}
  -
     </goal>
   
     <!-- =================================================================== -->
  @@ -104,8 +81,28 @@
        
       <j:set var="maven.test.failure.ignore" scope="parent" value="true"/>
       <j:set var="maven.junit.fork" scope="parent" value="true"/>
  +
  +    <echo>Setting Clover compiler</echo>
  +    <ant:clover-setup 
  +      initstring="${cloverDatabase}"
  +      flushpolicy="interval"
  +      flushinterval="500"/>
  +    <echo>Now using primary build.compiler : ${build.compiler}</echo>
  +
  +    <j:set var="tmp" value="${maven.build.clover.classes}"/>
  +    <j:set var="mavenBuildDestJavaOld"
  +      
value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.build.dest')}"/>
  +    ${pom.getPluginContext('maven-java-plugin').setVariable('maven.build.dest',tmp)}
  +    <j:set var="mavenBuildDestTestOld"
  +      
value="${pom.getPluginContext('maven-test-plugin').getVariable('maven.build.dest')}"/>
  +    ${pom.getPluginContext('maven-test-plugin').setVariable('maven.build.dest',tmp)}
       
       <attainGoal name="test:test"/>
  +
  +    
${pom.getPluginContext('maven-test-plugin').setVariable('maven.build.dest',mavenBuildDestTestOld)}
  +    
${pom.getPluginContext('maven-java-plugin').setVariable('maven.build.dest',mavenBuildDestJavaOld)}
  +
  +    ${pom.getContext().removeVariable('build.compiler')}
       
       <j:set var="maven.test.failure.ignore" scope="parent" 
value="${ignoreTestFailureOld}"/>
       <j:set var="maven.junit.fork" scope="parent" value="${junitForkOld}"/>
  @@ -140,7 +137,7 @@
           <ant:echo>No Clover database found, skipping report generation</ant:echo>
         </j:otherwise>
       </j:choose>
  -                    
  +
     </goal>
   
     <!--
  
  
  
  1.16      +8 -0      maven-plugins/clover/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/clover/xdocs/changes.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- changes.xml       28 Nov 2003 08:14:35 -0000      1.15
  +++ changes.xml       29 Nov 2003 17:15:33 -0000      1.16
  @@ -9,6 +9,14 @@
     <body>
   
        <release version="1.4" date="in CVS">
  +       <action dev="vmassol" type="update">
  +         Make sure that the clover plugin restore other plugin's
  +         properties it has modified.
  +       </action>
  +       <action dev="vmassol" type="remove">
  +         Removed public <code>clover:on</code> goal as it should not have
  +         been public. 
  +       </action>
        </release>
   
        <release version="1.3" date="2003-11-28">
  
  
  

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

Reply via email to