jvanzyl 2002/06/27 13:39:58
Added: src/templates/build/plugins/clover plugin.jelly
plugin.properties
Log:
First crack at flipping the clover plugin over to using jelly.
Revision Changes Path
1.1
jakarta-turbine-maven/src/templates/build/plugins/clover/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project xmlns:j="jelly:core">
<!-- =================================================================== -->
<!-- Prepare for clover -->
<!-- =================================================================== -->
<goal
name="clover-prepare">
<!-- The clover.initstring must be defined and must point to the database
file -->
<property name="clover.initstring"
value="${maven.clover.database.dir}/clover_coverage.db"/>
<mkdir dir="${maven.build.clover}"/>
<mkdir dir="${maven.build.clover.classes}"/>
<mkdir dir="${maven.clover.database.dir}"/>
<attainGoal name="maven:compile"/>
<attainGoal name="maven:compile-test"/>
</goal>
<!-- =================================================================== -->
<!-- Compile with Clover to instrument source code -->
<!-- =================================================================== -->
<goal
name="clover-compile"
prereqs="clover-prepare">
<property name="build.compiler"
value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
<javac
destdir="${maven.build.clover.classes}"
excludes="**/package.html"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<path refid="maven.compile.src.set"/>
</src>
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement path="${maven.build.dest}"/>
</classpath>
</javac>
<!-- jarResources copy -->
<copy todir="${maven.build.clover.classes}">
<fileset dir="${maven.jarResources.basedir}">
<patternset refid="maven.jar.resources.set"/>
</fileset>
</copy>
</goal>
<!-- =================================================================== -->
<!-- Run unit tests with Clover -->
<!-- =================================================================== -->
<goal
name="clover-test"
prereqs="clover-compile">
<j:if test="${flags.sourceTestDirectory}">
<junit printSummary="yes" failureProperty="maven.test.failure"
fork="${maven.junit.fork}" dir="${maven.junit.dir}">
<sysproperty key="basedir" value="${basedir}"/>
<formatter type="xml"/>
<formatter type="plain" usefile="${maven.junit.usefile}"/>
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement location="${maven.build.clover.classes}"/>
<pathelement location="${maven.test.dest}"/>
</classpath>
<batchtest todir="${maven.test.reportsDirectory}">
<fileset dir="${maven.unitTestSourceDirectory}">
<patternset refid="maven.unit.test.set"/>
</fileset>
</batchtest>
</junit>
</j:if>
</goal>
<!-- =================================================================== -->
<!-- C L O V E R R E P O R T S -->
<!-- =================================================================== -->
<goal
name="clover-report-html"
prereqs="local-init"
description="o Generate HTML test coverage reports with Clover">
<mkdir dir="${maven.docs.dest}/clover"/>
<java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter"
fork="true">
<arg line="--outputdir ${maven.docs.dest}/clover"/>
<arg line="--showSrc"/>
<arg line="--initstring ${clover.initstring}"/>
<arg line="--title '${maven.name} - ${maven.currentVersion}'"/>
<classpath>
<path refid="maven-classpath"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</goal>
<goal
name="clover-report-swing"
prereqs="local-init"
description="Generate Swing test coverage reports with Clover">
<mkdir dir="${maven.docs.dest}/clover"/>
<java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer"
fork="yes">
<arg line="${clover.initstring}"/>
<classpath>
<path refid="maven-classpath"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</goal>
</project>
1.1
jakarta-turbine-maven/src/templates/build/plugins/clover/plugin.properties
Index: plugin.properties
===================================================================
# -------------------------------------------------------------------
# Default Maven properties for the Clover Plugin
# -------------------------------------------------------------------
# These are the properties that we believe are immutable so we
# keep them apart from the project specific properties.
# -------------------------------------------------------------------
maven.build.clover = ${maven.build.dir}/clover
maven.build.clover.classes = ${maven.build.clover}/classes
# Location of Clover database
# (used only if maven.compile.clover = true)
maven.clover.database.dir = ${maven.build.clover}/database
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>