jvanzyl 2002/06/27 12:32:12
Modified: src/templates/build/plugins/activity plugin.jelly
Added: src/templates/build/plugins/activity developer-activity.dvsl
file-activity.dvsl toolbox.props
Log:
Grouping plugin goodies.
Revision Changes Path
1.2 +18 -4
jakarta-turbine-maven/src/templates/build/plugins/activity/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/activity/plugin.jelly,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin.jelly 26 Jun 2002 21:17:53 -0000 1.1
+++ plugin.jelly 27 Jun 2002 19:32:12 -0000 1.2
@@ -6,8 +6,22 @@
<!-- C V S A C T I V I T Y R E P O R T -->
<!-- ================================================================== -->
+ <taskdef
+ name="change-log"
+ classname="org.apache.maven.changelog.ChangeLog">
+ <classpath refid="maven-classpath"/>
+ </taskdef>
+
+ <taskdef
+ name="dvsl"
+ classname="org.apache.tools.dvsl.DVSLTask">
+ <classpath refid="maven-classpath"/>
+ </taskdef>
+
<goal name="activity-log">
+ <mkdir dir="${maven.build.dir}/generated-xdocs"/>
+
<change-log
projectDescriptor="project.xml"
baseDir="."
@@ -22,8 +36,8 @@
destdir="${maven.gen.docs}/"
extension=".xml"
force="true"
- toolboxfile="${maven.home}/stylesheets/toolbox.props"
- style="${maven.home}/stylesheets/developer-activity.dvsl"
+ toolboxfile="${maven.home}/plugins/activity/toolbox.props"
+ style="${maven.home}/plugins/activity/developer-activity.dvsl"
includes="activity-log.xml"
outputencoding="${maven.docs.outputencoding}">
<!-- Need to add the maven jar to load the toolbox -->
@@ -36,8 +50,8 @@
<dvsl
extension=".xml"
force="true"
- toolboxfile="${maven.home}/stylesheets/toolbox.props"
- style="${maven.home}/stylesheets/file-activity.dvsl"
+ toolboxfile="${maven.home}/plugins/activity/toolbox.props"
+ style="${maven.home}/plugins/activity/file-activity.dvsl"
in="${maven.build.dir}/activity-log.xml"
out="${maven.gen.docs}/file-activity-report.xml">
<!-- Need to add the maven jar to load the toolbox -->
1.1
jakarta-turbine-maven/src/templates/build/plugins/activity/developer-activity.dvsl
Index: developer-activity.dvsl
===================================================================
#######################################################################
## Developer Activity D V S L S T Y L E S H E E T ##
#######################################################################
## This stylesheet is used to transform the output of ChangeLog's xml
## generator. The XML is transformed into a standard xdoc that can
## then be transformed (yet again) using whatever stylesheet is used
## to format one's site.
##
##
## Version: $Id: developer-activity.dvsl,v 1.1 2002/06/27 19:32:12 jvanzyl Exp $
## Author: dIon Gillard
#######################################################################
## T E M P L A T E D E F I N I T I O N S ##
#######################################################################
## Matches the first data element of the ChangeLog XML report.
##
#match ("changelog")
<?xml version="1.0"?>
<document>
<properties>
<title>Developer Activity Analysis</title>
</properties>
<body>
<section name="Activity by Developer">
<p>
Timeframe: $context.toolbox.range days,
Total Commits: $node.valueOf("count(./changelog-entry"),
Total Number of Files Changed: $node.valueOf("count(./changelog-entry/file")
</p>
<table>
<tr>
<th>Name</th><th>Number of Commits</th><th>Number of files changed</th>
</tr>
#foreach ($developer in
$node.selectNodes("document('$context.toolbox.basedir/project.xml')/project/developers/developer"))
<tr>
#set ($name = $developer.name.value())
<td>$name</td>
#set ($commits = 0)
#set ($commits =
$node.valueOf("count(./changelog-entry/author[text()='$developer.name.value()']"))
<td>$commits</td>
#set ($changedFiles = 0)
#set ($changedFiles =
$node.valueOf("count(./changelog-entry/author[text()='$developer.name.value()']/../file"))
<td>$changedFiles</td>
</tr>
#end
</table>
</section>
</body></document>
#end
1.1
jakarta-turbine-maven/src/templates/build/plugins/activity/file-activity.dvsl
Index: file-activity.dvsl
===================================================================
#######################################################################
## Developer Activity D V S L S T Y L E S H E E T ##
#######################################################################
## This stylesheet is used to transform the output of ChangeLog's xml
## generator. The XML is transformed into a standard xdoc that can
## then be transformed (yet again) using whatever stylesheet is used
## to format one's site.
##
##
## Version: $Id: file-activity.dvsl,v 1.1 2002/06/27 19:32:12 jvanzyl Exp $
## Author: dIon Gillard
#######################################################################
## V E L O C I T Y M A C R O S ##
#######################################################################
## Convert a string that represents a number using the specified
## pattern.
##
#macro (cvsWebLink $pom $file)
<a href="$pom.repository.url.toString().trim()$file">$file</a>
#end
#######################################################################
## T E M P L A T E D E F I N I T I O N S ##
#######################################################################
## Matches the first data element of the ChangeLog XML report.
##
#match ("changelog")
<?xml version="1.0"?>
## Grab a reference to the project descriptor here so we can pull
## info from it such as the cvs web url, etc ...
#set( $pomFilename = "$context.toolbox.basedir/project.xml")
#set( $pom = $node.selectSingleNode("document('$pomFilename')/project"))
$context.applyTemplates()
<document>
<properties>
<title>File Activity Analysis</title>
</properties>
<body>
<section name="Activity by File">
<p>
Timeframe: $context.toolbox.range days,
Total Commits: $node.valueOf("count(./changelog-entry"),
Total Number of Files Changed: $node.valueOf("count(./changelog-entry/file")
</p>
<table>
<tr>
<th>File Name</th><th>Number of times changed</th>
</tr>
#set ($fileList = $context.toolbox.maven.CountDescending)
#foreach ($key in $fileList.keySet())
#foreach ($name in $fileList.get($key))
<tr>
<td>#cvsWebLink ($pom $name)</td>
<td>$key</td>
</tr>
#end
#end
</table>
</section>
</body></document>
#end
#match("file")
#set ($dummy = $context.toolbox.maven.addToCount("$node.name.value()"))
#end
1.1
jakarta-turbine-maven/src/templates/build/plugins/activity/toolbox.props
Index: toolbox.props
===================================================================
toolbox.contextname = toolbox
toolbox.tool.htmlescape = org.apache.velocity.anakia.Escape
toolbox.tool.numbers = java.text.DecimalFormat
toolbox.tool.fileutil = org.apache.velocity.texen.util.FileUtil
toolbox.tool.strings = org.apache.commons.lang.Strings
toolbox.tool.formatter = org.apache.maven.DVSLFormatter
toolbox.tool.pathtool = org.apache.maven.DVSLPathTool
toolbox.tool.maven = org.apache.maven.MavenTool
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>