Initial revision

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112724 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jvanzyl committed 2003-01-24 03:44:26 +00:00
1 parent 66e44f2734
commit 530c640d4f
821 files changed
+55754

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
target
velocity.log
maven.log
+70
View File
@@ -0,0 +1,70 @@
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:util="jelly:util"
xmlns:changelog="changelog"
xmlns:doc="doc">
<!-- ================================================================== -->
<!-- D E V E L O P E R A C T I V I T Y R E P O R T -->
<!-- ================================================================== -->
<goal name="maven-developer-activity-plugin:report"
description="Generate developer and file activity reports">
<j:if test="${context.getVariable('maven.mode.online') == null}">
<j:set var="maven.mode.online" value="true" />
</j:if>
<j:choose>
<j:when test="${maven.mode.online}">
<j:set var="_connection">${pom.repository.connection}</j:set>
<j:if test="${!empty(_connection)}">
<echo>Generating the developer activity report</echo>
<mkdir dir="${maven.gen.docs}"/>
<!--
|
| Now we only want to generate the change log if it hasn't
| already been generated.
|
-->
<util:available file="${maven.build.dir}/changelog.xml">
<j:set var="changelogPresent" value="true"/>
</util:available>
<j:if test="${changlogPresent != 'true'}">
<changelog:changelog
basedir="${basedir}"
developers="${pom.developers}"
factory="${maven.changelog.factory}"
output="${maven.build.dir}/changelog.xml"
outputEncoding="${maven.docs.outputencoding}"
range="${maven.activitylog.range}"
repositoryConnection="${pom.repository.connection}"
/>
</j:if>
<doc:jsl
input="${maven.build.dir}/changelog.xml"
output="developer-activity-report.xml"
stylesheet="${plugin.resources}/developer-activity.jsl"
encoding="${maven.docs.outputencoding}"
omitXmlDeclaration="false"
outputMode="xml"
prettyPrint="true"
/>
</j:if>
</j:when>
<j:otherwise>
<echo>The Activity report is only available in online mode.</echo>
</j:otherwise>
</j:choose>
</goal>
</project>
+14
View File
@@ -0,0 +1,14 @@
# -------------------------------------------------------------------
# P L U G I N P R O P E R I E S
# -------------------------------------------------------------------
# Activity log plugin.
# -------------------------------------------------------------------
maven.src.dir = ${basedir}/src
maven.build.dir = ${basedir}/target
maven.docs.dest = ${maven.build.dir}/docs
maven.docs.outputencoding = ISO-8859-1
maven.activitylog.range = 30
maven.changelog.factory = org.apache.maven.cvslib.CvsChangeLogFactory
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-developer-activity-plugin</id>
<name>Maven Activity Plug-in</name>
<currentVersion>1.2-SNAPSHOT</currentVersion>
<description>
This document provides a report of activity in terms of CVS commits and
breaks it out by developer.
</description>
<shortDescription></shortDescription>
<dependencies>
<dependency>
<id>commons-jelly+tags-jsl</id>
<version>SNAPSHOT</version>
<properties>
<classloader>root.maven</classloader>
</properties>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>SNAPSHOT</version>
<url>http://jakarta.apache.org/commons/sandbox/jelly/tags/xml/</url>
<properties>
<classloader>root.maven</classloader>
</properties>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<jsl:stylesheet
select="$doc"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:x="jelly:xml"
xmlns="dummy" trim="false">
<jsl:template match="changelog">
<document>
<properties>
<title>Developer Activity Analysis</title>
</properties>
<body>
<section name="Activity by Developer">
<p>
<!-- The range needs to be fed in somehow. -->
Timeframe: ${maven.activitylog.range} days,
Total Commits:
<x:expr select="count(./changelog-entry)"/>
Total Number of Files Changed:
<x:expr select="count(./changelog-entry/file)"/>
</p>
<table>
<tr>
<th>Name</th>
<th>Number of Commits</th>
<th>Number of files changed</th>
</tr>
<j:forEach var="developer" items="${pom.developers}">
<j:set var="name" value="${developer.name}"/>
<x:set var="commits" select="count(./changelog-entry/author[text()='${name}'])"/>
<x:set var="changedFiles" select="count(./changelog-entry/author[text()='${name}']/../file)"/>
<j:if test="${commits != '0'}">
<tr>
<td>${name}</td>
<td>${commits}</td>
<td>${changedFiles}</td>
</tr>
</j:if>
</j:forEach>
</table>
</section>
</body>
</document>
</jsl:template>
<!-- element values don't pass through as text -->
<jsl:template match="properties"/>
<jsl:template match="section"/>
</jsl:stylesheet>