dion 2002/06/04 00:44:50
Modified: src/templates/build/plugins/metrics Control.vm build.xml
Log:
Moved metrics to new parse-less processing
Revision Changes Path
1.2 +0 -5
jakarta-turbine-maven/src/templates/build/plugins/metrics/Control.vm
Index: Control.vm
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/metrics/Control.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Control.vm 15 May 2002 19:17:44 -0000 1.1
+++ Control.vm 4 Jun 2002 07:44:50 -0000 1.2
@@ -12,8 +12,3 @@
## -------------------------------------------------------
$delegators.put("metrics", "plugins/$plugin/build.xml")
-## -------------------------------------------------------
-## Make the list of callbacks
-## -------------------------------------------------------
-$callbacks.put( "$plugin", [ "pre-metrics", "post-metrics" ] )
-
1.3 +54 -11
jakarta-turbine-maven/src/templates/build/plugins/metrics/build.xml
Index: build.xml
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/metrics/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 4 Jun 2002 01:18:33 -0000 1.2
+++ build.xml 4 Jun 2002 07:44:50 -0000 1.3
@@ -1,8 +1,30 @@
<?xml version="1.0"?>
-<project name="$project.id" default="metrics" basedir="$antBasedir">
+<project name="maven-metrics" default="metrics" basedir="..">
- #parse("build.init.target")
+ <!-- ================================================================== -->
+ <!-- I N I T -->
+ <!-- ================================================================== -->
+ <target name="init">
+ <!-- Pick up tool default properties for maven.jars.list -->
+ <property file="${maven.home}/plugins/core/default.properties"/>
+
+ <!-- define maven classpath for the build -->
+ <path id="maven-classpath">
+ <fileset dir="${lib.repo}" includes="${maven.jars.list}" />
+ </path>
+
+ <!-- define maven taskdefs, as taskdefs are not yet inheritable -->
+ <taskdef resource="maven-taskdefs.properties">
+ <classpath refid="maven-classpath" />
+ </taskdef>
+
+ <!-- call common build file initialization to verify project, update jars
+ etc -->
+ <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
+ target="verify-project" inheritAll="true" inheritRefs="true"
+ exportAll="true"/>
+ </target>
<!-- ================================================================== -->
<!-- L O C A L I N I T -->
@@ -22,7 +44,10 @@
<target
name="compile">
- <ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/>
+ <maven-ant antfile="${maven.home}/plugins/core/build.xml"
+ target="compile"
+ inheritRefs="true"
+ inheritAll="true"/>
</target>
<!-- ================================================================== -->
@@ -31,12 +56,36 @@
<target
name="metrics"
-
depends="local-init,#callback("pre-metrics"),do-metrics,#callback("post-metrics")"
+ depends="local-init,pre-metrics-callback,do-metrics,post-metrics-callback"
description="o Gathers the code metrics"/>
+ <target name="pre-metrics-callback">
+ <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
+ target="callback" inheritAll="true" inheritRefs="true">
+ <property name="buildFile"
+ value="${maven.metrics.callback.pre-metrics.buildFile}" />
+ <property name="buildTarget"
+ value="${maven.metrics.callback.pre-metrics.buildTarget}" />
+ <property name="buildTargetName"
+ value="maven.metrics.callback.pre-metrics.buildTarget" />
+ </maven-ant>
+ </target>
+
+ <target name="post-metrics-callback">
+ <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
+ target="callback" inheritAll="true" inheritRefs="true">
+ <property name="buildFile"
+ value="${maven.metrics.callback.post-metrics.buildFile}" />
+ <property name="buildTarget"
+ value="${maven.metrics.callback.post-metrics.buildTarget}" />
+ <property name="buildTargetName"
+ value="maven.metrics.callback.post-metrics.buildTarget" />
+ </maven-ant>
+ </target>
+
<target
name="do-metrics"
- if="sourcesPresent"
+ if="maven.sourcesPresent"
depends="jdepend-report,jdepend-gui">
</target>
@@ -89,12 +138,6 @@
name="jdepend-xml"
if="maven.sourcesPresent"
depends="local-init,compile">
-
- <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
- <classpath>
- <path refid="maven-classpath"/>
- </classpath>
- </taskdef>
<java
classname="jdepend.xmlui.JDepend"
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>