maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bwald...@apache.org
Subject cvs commit: maven/src/plugins-build/clover/xdocs properties.xml
Date Tue, 10 Jun 2003 13:22:48 GMT
bwalding    2003/06/10 06:22:47

  Modified:    src/plugins-build/clover project.xml plugin.jelly
                        plugin.properties
               src/plugins-build/clover/xdocs properties.xml
  Log:
  I'm not going to pretend that this works very well.
  * Flushpolicy - it's just a hack that we have a 500ms flush interval.  Should be 
  	allowed to flush with an ant task
  * Basically clover 1.2 sort of works, want to check something that reasonably works
  in before I break it again.
  PR: MAVEN-372
  
  Revision  Changes    Path
  1.11      +3 -10     maven/src/plugins-build/clover/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/clover/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml	4 Jun 2003 13:51:26 -0000	1.10
  +++ project.xml	10 Jun 2003 13:22:47 -0000	1.11
  @@ -5,7 +5,7 @@
     <pomVersion>3</pomVersion>
     <id>maven-clover-plugin</id>
     <name>Maven Clover Plug-in</name>
  -  <currentVersion>1.2-SNAPSHOT</currentVersion>
  +  <currentVersion>1.3-SNAPSHOT</currentVersion>
     <description/>
     <shortDescription>Java Project Management Tools</shortDescription>
     <url>http://maven.apache.org/reference/plugins/clover/</url>
  @@ -72,17 +72,10 @@
     <dependencies>
       <dependency>
         <id>clover</id>
  -      <version>1.0</version>
  +      <version>1.2</version>
         <properties>
           <classloader>root</classloader>
         </properties>
  -    </dependency>
  -    <dependency>
  -      <id>velocity</id>
  -      <version>1.3</version>
  -      <properties>
  -        <classloader>root.maven</classloader>
  -      </properties>
  -    </dependency>
  +    </dependency>    
     </dependencies>
   </project>
  
  
  
  1.7       +57 -63    maven/src/plugins-build/clover/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/clover/plugin.jelly,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- plugin.jelly	4 Jun 2003 13:51:26 -0000	1.6
  +++ plugin.jelly	10 Jun 2003 13:22:47 -0000	1.7
  @@ -4,35 +4,28 @@
     xmlns:j="jelly:core" 
     xmlns:ant="jelly:ant" 
     xmlns:maven="jelly:maven"
  +  xmlns:java="java"
  +  xmlns:test="test"
     xmlns:doc="doc">
   
  -  <!--
  -   |
  -   | This last namespace entry is not obvious so here's a little
  -   | explanation. For anything documentation related we don't want to have to
  -   | duplicated documentation properties like ${maven.dest.docs} in every
  -   | single plugin. So we use the following to access the properties of the
  -   | xdoc plugin:
  -   |
  -   | ${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}
  -   | 
  -   | But this of course only works if the xdoc plugin is loaded ... So we
  -   | trick the xdoc plugin into loading by declaring the xmlns:doc usage
  -   | above. This forces the lookup and loading of the xdoc plugin which
  -   | loads the properties. This is not entirely clear but works and I'll
  -   | find a better way to declare this.
  -   |
  -   -->
  -
  +  <java:dependency-handle/>
  +  <j:set var="javaPlugin" value="${pom.getPluginContext('maven-java-plugin')}"/>
  +  
  +  <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>
   
  -  <j:set var="tmp.clover.excludes">
  +  <!--j:set var="tmp.clover.excludes">
       <j:forEach var="pat" items="${pom.build.unitTest.includes}"> ${pat} </j:forEach>
     </j:set>
   
  -  <ant:property name="clover.excludes" value="${tmp.clover.excludes}"/>
  +  <ant:property name="clover.excludes" value="${tmp.clover.excludes}"/-->
   
   
     <goal name="maven-clover-plugin:register">
  @@ -58,36 +51,44 @@
   
     <goal
       name="clover:on"
  -    description="Create the needed directory structure" 
  -    trim="true">
  -
  +    description="Create the needed directory structure">
  +	
  +	<ant:taskdef resource="clovertasks"/>
  +    <ant:typedef resource="clovertypes"/>
  +    
       <preGoal name="java:compile">
  -      ${pom.getContext().setVariable('build.compiler',"org.apache.tools.ant.taskdefs.CloverCompilerAdapter")}
  +      <echo>Setting Clover compiler</echo>
  +      <ant:clover-setup 
  +      	initstring="${maven.clover.database.dir}/clover_coverage.db"
  +      	flushpolicy="interval"
  +      	flushinterval="500"
  +      	/>
  +      <echo>Now using primary build.compiler : ${build.compiler}</echo>
  +	  <!--${pom.getContext().setVariable('build.compiler',"org.apache.tools.ant.taskdefs.CloverCompilerAdapter")}-->
       </preGoal>
   
       <postGoal name="java:compile">
         ${pom.getContext().removeVariable('build.compiler')}
       </postGoal>
   
  -    <ant:property 
  -      name="clover.initstring"
  -      value="${maven.clover.database.dir}/clover_coverage.db"/>
  -
  -     <j:set 
  -       var="cloverReportDirectory"
  -       value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}/clover"/>
  +	<clover-setup initstring="${maven.clover.database.dir}/clover_coverage.db"/>
  +	
  +    <j:set 
  +      var="cloverReportDirectory"
  +      value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}/clover"/>
   
       <maven:addPath id="maven.dependency.classpath" refid="clover.classpath"/>
   
       <ant:mkdir dir="${maven.build.clover}"/>
       <ant:mkdir dir="${maven.build.clover.classes}"/>
       <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)}
  +    <!--echo>Found maven-test-plugin: ${pom.getPluginContext('maven-test-plugin')}</echo-->
       ${pom.getPluginContext('maven-test-plugin').setVariable('maven.build.dest',tmp)}
  -    
     </goal>
   
     <!-- =================================================================== -->
  @@ -98,43 +99,37 @@
           description="Generate HTML test coverage reports with Clover"
           prereqs="clover:html-report"/>
   
  -  <goal
  -    name="clover:html-report"
  -    description="Generate HTML test coverage reports with Clover">
  -
  -    <!-- Make sure that the report is generated whether the tests pass or
  -         not -->
  +  <goal name="clover:test" prereqs="clover:on">
  +  	<!-- 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"/>
  -    <attainGoal name="clover:on"/>
  +    <j:set var="maven.junit.fork" scope="parent" value="true"/>
  +    
       <attainGoal name="test:test"/>
  -    <j:set var="maven.test.failure.ignore" scope="parent" 
  -      value="${ignoreTestFailureOld}"/>
  +    
  +    <j:set var="maven.test.failure.ignore" scope="parent" value="${ignoreTestFailureOld}"/>
  +    <j:set var="maven.junit.fork" scope="parent" value="${junitForkOld}"/>
  +  </goal>
     
  -    <!--
  -     |
  -     | Grab the value maven.docs.dest from the xdoc plugin.
  -     |
  -     -->
  -    <ant:mkdir dir="${cloverReportDirectory}"/>
     
  -  <ant:java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter"
  -      fork="true">
  -      <ant:arg line="-o ${cloverReportDirectory}"/>
  -      <ant:arg line="-i ${clover.initstring}"/>
  -      <ant:arg line="-t '${pom.name} - ${pom.currentVersion}'"/>
  -      <ant:classpath>
  -        <ant:path refid="maven-classpath"/>
  -        <ant:pathelement path="${plugin.getDependencyPath('velocity')}"/>
  -        <ant:pathelement path="${plugin.getDependencyPath('clover')}"/>
  -      </ant:classpath>
  -    </ant:java>
  -
  +  <goal 
  +    name="clover:html-report" 
  +    description="Generate HTML test coverage reports with Clover">
  +    <attainGoal name="clover:test"/>
  +	<ant:clover-report>
  +      <current 
  +      	outfile="${cloverReportDirectory}" 
  +      	title="${pom.name} - ${pom.currentVersion}">
  +        <format type="html" orderBy="ElementsCoveredAsc"/>
  +      </current>
  +    </ant:clover-report>
     </goal>
   
     <goal
       name="clover:swing-report"
  -    prereqs="clover:on,test:test"
  +    prereqs="clover:test"
       description="Generate Swing test coverage reports with Clover">
   
       <ant:mkdir dir="${cloverReportDirectory}"/>
  @@ -144,7 +139,6 @@
           <ant:arg line="${clover.initstring}"/>
           <ant:classpath>
             <ant:path refid="maven-classpath"/>
  -          <ant:pathelement path="${plugin.getDependencyPath('velocity')}"/>
             <ant:pathelement path="${plugin.getDependencyPath('clover')}"/>
           </ant:classpath>
       </ant:java>
  
  
  
  1.2       +0 -9      maven/src/plugins-build/clover/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/clover/plugin.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.properties	24 Jan 2003 03:45:04 -0000	1.1
  +++ plugin.properties	10 Jun 2003 13:22:47 -0000	1.2
  @@ -7,13 +7,4 @@
   
   maven.build.clover = ${maven.build.dir}/clover
   maven.build.clover.classes = ${maven.build.clover}/classes
  -#maven.build.clover.src = ${maven.build.clover}/src
  -#clover.tmpdir = ${maven.build.clover.src}
  -
  -# Location of Clover database
  -# (used only if maven.compile.clover = true)
   maven.clover.database.dir = ${maven.build.clover}/database
  -
  -clover.preserve=true
  -clover.flushpolicy=interval
  -clover.flushpolicy.interval=10
  
  
  
  1.2       +7 -0      maven/src/plugins-build/clover/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/clover/xdocs/properties.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- properties.xml	24 Jan 2003 03:45:06 -0000	1.1
  +++ properties.xml	10 Jun 2003 13:22:47 -0000	1.2
  @@ -45,6 +45,13 @@
               <code>${maven.build.dir}/clover/database</code>.
             </td>
           </tr>
  +		<tr>
  +          <td><a name="maven.clover.report.format">maven.clover.report.format</a></td>
  +          <td>No (default "html")</td>
  +          <td>
  +            Specifies the format of the Clover report output
  +          </td>
  +        </tr>
         </table>
       </section>
     </body>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message