You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by br...@apache.org on 2002/02/25 06:51:50 UTC
cvs commit: jakarta-turbine-maven/src/templates/build build-metrics.xml Control.vm build.xml
brekke 02/02/24 21:51:50
Modified: . build-bootstrap.xml
src/templates/build Control.vm build.xml
Added: src/templates/build build-metrics.xml
Log:
Preliminary support for generating some source code metrics via
<a href="http://www.clarkware.com/software/JDepend.html">JDepend</a>.
Currently you need to have the JDepend jar in your $ANT_HOME/lib directory.
Added a build-metrics.xml template to be generated when the build system is
gen'd. Added convience target, metrics, to build.xml so one can just use:
ant metrics
If you define -Duse.jdepend.gui=1 on the command-line the JDepend swing ui
will start up. The default mode is to generate a jdepend-report.txt in the
root directory. I have two targets commented out which generate an xml report.
One uses the jdepend ant task that is included in Ant 1.5 which can format
xml and the other just uses the xmlgui version of JDepend and will work
regardless of the ant version.
Revision Changes Path
1.14 +2 -1 jakarta-turbine-maven/build-bootstrap.xml
Index: build-bootstrap.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/build-bootstrap.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- build-bootstrap.xml 24 Feb 2002 21:22:05 -0000 1.13
+++ build-bootstrap.xml 25 Feb 2002 05:51:49 -0000 1.14
@@ -36,7 +36,8 @@
<!-- Remove the elements of past generations before creating
the new one -->
-
+
+ <delete file="build-metrics.xml"/>
<delete file="build-docs.xml"/>
<delete file="build-test.xml"/>
<delete file="build.xml"/>
1.6 +1 -1 jakarta-turbine-maven/src/templates/build/Control.vm
Index: Control.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/Control.vm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Control.vm 23 Feb 2002 04:01:49 -0000 1.5
+++ Control.vm 25 Feb 2002 05:51:49 -0000 1.6
@@ -1,4 +1,4 @@
-#set ($buildElements = ["build-docs.xml","build-test.xml","build.xml","default.properties","LICENSE","README.txt"])
+#set ($buildElements = ["build-metrics.xml", "build-docs.xml","build-test.xml","build.xml","default.properties","LICENSE","README.txt"])
$project
$project.name
1.14 +5 -0 jakarta-turbine-maven/src/templates/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- build.xml 23 Feb 2002 16:40:14 -0000 1.13
+++ build.xml 25 Feb 2002 05:51:49 -0000 1.14
@@ -366,6 +366,11 @@
<!-- ================================================================== -->
<target
+ name="metrics">
+ <ant antfile="build-metrics.xml"/>
+ </target>
+
+ <target
name="test">
<ant antfile="build-test.xml"/>
</target>
1.1 jakarta-turbine-maven/src/templates/build/build-metrics.xml
Index: build-metrics.xml
===================================================================
<?xml version="1.0"?>
<project name="$project.id" default="metrics" basedir=".">
#include("build.properties.loading")
#include("build.init.target")
<!-- ================================================================== -->
<!-- M E T R I C S -->
<!-- ================================================================== -->
<target
name="metrics"
depends="init,jdepend-report,jdepend-gui"
description="==> Gathers the code metrics">
</target>
<!-- ======================================================================== -->
<!-- J D E P E N D R E P O R T T A R G E T -->
<!-- ======================================================================== -->
<target name="jdepend-report" unless="use.jdepend.gui">
<!-- Once we start to use Ant 1.5, we can use the builtin jdepend target -->
<!-- to generate our xml reports. Until then we can use the xmlui. -->
<!--
<jdepend format="xml" outputfile="${docs.src}/jdepend-report.xml">
<sourcespath>
<pathelement location="${src.dir}/java" />
</sourcespath>
<classpath location="${build.dest}" />
</jdepend>
-->
<!-- This call will gen a xml report regardless of the version of ant. -->
<!--
<java classname="jdepend.xmlui.JDepend" fork="yes" failonerror="yes">
<arg line="-file ${docs.src}/jdepend-report.xml ${src.dir}/java ${build.dest}"/>
<classpath>
<path refid="classpath"/>
<pathelement location="./"/>
<pathelement path="${java.class.path}" />
</classpath>
</java>
-->
<!-- For now we just creat a text report using the built in jdepend task. -->
<jdepend outputfile="jdepend-report.txt">
<sourcespath>
<pathelement location="${src.dir}/java"/>
</sourcespath>
<classpath location="${build.dest}" />
</jdepend>
</target>
<!-- ======================================================================== -->
<!-- J D E P E N D G U I T A R G E T -->
<!-- ======================================================================== -->
<target name="jdepend-gui" if="use.jdepend.gui">
<java classname="jdepend.swingui.JDepend" fork="yes" failonerror="yes">
<arg line="${src.dir}/java ${build.dest}"/>
<classpath>
<path refid="classpath"/>
<pathelement location="./"/>
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
</project>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>