You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/01/12 16:39:57 UTC
cvs commit: jakarta-turbine-maven/src/plugins-build/clover plugin.jelly
jvanzyl 2003/01/12 07:39:57
Modified: src/plugins-build/clover plugin.jelly
Log:
o Clover plugin now works correctly when it is run by itself.
Revision Changes Path
1.9 +48 -12 jakarta-turbine-maven/src/plugins-build/clover/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/clover/plugin.jelly,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- plugin.jelly 31 Dec 2002 07:17:01 -0000 1.8
+++ plugin.jelly 12 Jan 2003 15:39:57 -0000 1.9
@@ -1,6 +1,27 @@
<?xml version="1.0"?>
-<project xmlns:j="jelly:core" xmlns:maven="jelly:maven">
+<project
+ xmlns:j="jelly:core"
+ xmlns:maven="jelly:maven"
+ 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.
+ |
+ -->
<path id="clover.classpath">
<pathelement path="${plugin.getDependencyPath('clover')}"/>
@@ -20,19 +41,29 @@
name="clover:on"
description="Create the needed directory structure">
- <property name="build.compiler"
- value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+ <property
+ name="build.compiler"
+ value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+
+ <property
+ name="clover.initstring"
+ value="${maven.clover.database.dir}/clover_coverage.db"/>
- <property name="clover.initstring"
- value="${maven.clover.database.dir}/clover_coverage.db"/>
-
- <maven:addPath id="maven.dependency.classpath"
- refid="clover.classpath"/>
+ <maven:addPath id="maven.dependency.classpath" refid="clover.classpath"/>
<mkdir dir="${maven.build.clover}"/>
<mkdir dir="${maven.build.clover.classes}"/>
<mkdir dir="${maven.clover.database.dir}"/>
+ <!--
+ |
+ | Grab the value maven.docs.dest from the xdoc plugin.
+ |
+ -->
+ <j:set
+ var="cloverReportDirectory"
+ value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}/clover"/>
+
</goal>
<!-- =================================================================== -->
@@ -47,12 +78,17 @@
name="clover:html-report"
prereqs="clover:on,test:test"
description="Generate HTML test coverage reports with Clover">
-
- <mkdir dir="${maven.docs.dest}/clover"/>
+
+ <!--
+ |
+ | Grab the value maven.docs.dest from the xdoc plugin.
+ |
+ -->
+ <mkdir dir="${cloverReportDirectory}"/>
<java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter"
fork="true">
- <arg line="-o ${maven.docs.dest}/clover"/>
+ <arg line="-o ${cloverReportDirectory}"/>
<arg line="-i ${clover.initstring}"/>
<arg line="-t '${pom.name} - ${pom.currentVersion}'"/>
<classpath>
@@ -69,7 +105,7 @@
prereqs="clover:on,test:test"
description="Generate Swing test coverage reports with Clover">
- <mkdir dir="${maven.docs.dest}/clover"/>
+ <mkdir dir="${cloverReportDirectory}"/>
<java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer"
fork="yes">