git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@471273 13f79535-47bb-0310-9956-ffa450edef68
98 lines
3.3 KiB
XML
98 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
* ========================================================================
|
|
*
|
|
* Copyright 2004-2006 The Apache Software Foundation.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* ========================================================================
|
|
-->
|
|
|
|
<jsl:stylesheet
|
|
select="$doc"
|
|
xmlns:j="jelly:core"
|
|
xmlns:jsl="jelly:jsl"
|
|
xmlns:util="jelly:util"
|
|
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">
|
|
<jsl:applyTemplates select="changeset" />
|
|
</section>
|
|
</body>
|
|
</document>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="changeset">
|
|
<j:set var="logstart"><x:expr select="@start"/></j:set>
|
|
<j:set var="logend"><x:expr select="@end"/></j:set>
|
|
<j:choose>
|
|
<j:when test="${empty(logstart) and empty(logend)}">
|
|
<j:set var="setname">Changes from an unknown range</j:set>
|
|
</j:when>
|
|
<j:when test="${empty(logend)}">
|
|
<j:set var="setname">Changes since ${logstart}</j:set>
|
|
</j:when>
|
|
<j:otherwise>
|
|
<j:set var="setname">Changes between ${logstart} and ${logend}</j:set>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
<subsection name="${setname}">
|
|
<p>
|
|
<!-- The range needs to be fed in somehow. -->
|
|
<j:set var="type" value="${maven.changelog.type}"/>
|
|
<j:if test="${type == 'range'}">
|
|
Timeframe: ${maven.changelog.range} days<br/>
|
|
</j:if>
|
|
Total Commits:
|
|
<x:expr select="count(./changelog-entry)"/><br/>
|
|
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="commits"><x:expr select="count(./changelog-entry/author[text()="${developer.name}"])"/></j:set>
|
|
<j:set var="changedFiles"><x:expr select="count(./changelog-entry/author[text()="${developer.name}"]/../file)"/></j:set>
|
|
|
|
<j:if test="${commits != '0'}">
|
|
<tr>
|
|
<td><a href="team-list.html#${developer.id}">${developer.name}</a></td>
|
|
<td>${commits}</td>
|
|
<td>${changedFiles}</td>
|
|
</tr>
|
|
</j:if>
|
|
</j:forEach>
|
|
</table>
|
|
</subsection>
|
|
</jsl:template>
|
|
|
|
<!-- element values don't pass through as text -->
|
|
<jsl:template match="properties"/>
|
|
<jsl:template match="section"/>
|
|
|
|
</jsl:stylesheet>
|