MPDASHBOARD-18. Added Maven Change Log aggregators and Maven Tasks List aggregators. Thanks to Philippe Kernevez.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116261 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol
2004-11-26 08:33:04 +00:00
parent 8a30834d7b
commit 09b7faa2d7
16 changed files with 479 additions and 3 deletions

View File

@@ -217,3 +217,38 @@ maven.dashboard.aggregator.fbviolations.label = FindBugs Violations
maven.dashboard.aggregator.fbviolations.goal = maven-findbugs-plugin:report
maven.dashboard.aggregator.fbviolations.description = Number of FindBugs violations
# Classes Tasks aggregator
maven.dashboard.aggregator.tasklistclass.script = ${maven.dashboard.aggregators.dir}/task-list-classes.jelly
maven.dashboard.aggregator.tasklistclass.artifact = ${maven.build.dir}/generated-xdocs/task-list.xml
maven.dashboard.aggregator.tasklistclass.label = Classes Tasks
maven.dashboard.aggregator.tasklistclass.goal = maven-tasklist-plugin:report
maven.dashboard.aggregator.tasklistclass.description = Total number of classes with task definition (@todo tag).
# Methods Tasks aggregator
maven.dashboard.aggregator.tasklistmethod.script = ${maven.dashboard.aggregators.dir}/task-list-methods.jelly
maven.dashboard.aggregator.tasklistmethod.artifact = ${maven.build.dir}/generated-xdocs/task-list.xml
maven.dashboard.aggregator.tasklistmethod.label = Methods Tasks
maven.dashboard.aggregator.tasklistmethod.goal = maven-tasklist-plugin:report
maven.dashboard.aggregator.tasklistmethod.description = Total number of methods with task definition (@todo tag).
# All Tasks aggregator
maven.dashboard.aggregator.tasklist.script = ${maven.dashboard.aggregators.dir}/task-list-all.jelly
maven.dashboard.aggregator.tasklist.artifact = ${maven.build.dir}/generated-xdocs/task-list.xml
maven.dashboard.aggregator.tasklist.label = All Tasks
maven.dashboard.aggregator.tasklist.goal = maven-tasklist-plugin:report
maven.dashboard.aggregator.tasklist.description = Total number of task definition (@todo tag).
# Changed log: total number of scm changed files aggregator
maven.dashboard.aggregator.scmchangedfiles.script = ${maven.dashboard.aggregators.dir}/scmchangedfiles.jelly
maven.dashboard.aggregator.scmchangedfiles.artifact = ${maven.build.dir}/changelog.xml
maven.dashboard.aggregator.scmchangedfiles.label = SCM Changed Files
maven.dashboard.aggregator.scmchangedfiles.goal = maven-changelog-plugin:report
maven.dashboard.aggregator.scmchangedfiles.description = Total number of changed files in scm.
# Changed log: total number of scm commit aggregator
maven.dashboard.aggregator.scmchangedcommit.script = ${maven.dashboard.aggregators.dir}/scmchangedcommit.jelly
maven.dashboard.aggregator.scmchangedcommit.artifact = ${maven.build.dir}/changelog.xml
maven.dashboard.aggregator.scmchangedcommit.label = SCM commits
maven.dashboard.aggregator.scmchangedcommit.goal = maven-changelog-plugin:report
maven.dashboard.aggregator.scmchangedcommit.description = Total number of scm commit.

View File

@@ -102,6 +102,11 @@
<email>trecloux@norsys.fr</email>
<organization>Norsys</organization>
</contributor>
<contributor>
<name>Philippe Kernevez</name>
<email>pkernevez@octo.com</email>
<organization>OCTO Technology</organization>
</contributor>
</contributors>
<dependencies/>
</project>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2004 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.
*/
-->
<!--
========================================================================
Total number of scm commit, detected with maven change log.
========================================================================
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.scmchangedcommit.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="count($doc/changelog/changelog-entry)"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2004 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.
*/
-->
<!--
========================================================================
Total number of files changed, detected with maven change log.
========================================================================
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.scmchangedfiles.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="count($doc/changelog/changelog-entry/file)"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2004 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.
*/
-->
<!--
========================================================================
Total number of task definition (@todo tag).
========================================================================
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.tasklistclass.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="sum($doc//table[@summary='todo summary']/tbody/tr/td[2])+sum($doc//table[@summary='todo summary']/tbody/tr/td[3])"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2004 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.
*/
-->
<!--
========================================================================
Total number of classes with task definition (@todo tag).
========================================================================
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.tasklistclass.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="sum($doc/document/body/section[@name= 'Todos']/table[@summary='todo summary']/tbody/tr/td[2])"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2004 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.
*/
-->
<!--
========================================================================
Total number of methods with task definition (@todo tag).
========================================================================
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.tasklistclass.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="sum($doc/document/body/section[@name= 'Todos']/table[@summary='todo summary']/tbody/tr/td[3])"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>

View File

@@ -52,5 +52,44 @@
<x:set var="count" select="count($doc//body/section/table/tr)"/>
<assert:assertEquals expected="4" value="${count.intValue().toString()}"/>
<x:set var="countTitleColumn" select="count($doc//body/section/table/tr[1]/th)"/>
<x:set var="countContentColumn" select="count($doc//body/section/table/tr[2]/td)"/>
<!-- One column for the project name and one for the 23 aggregators -->
<assert:assertEquals expected="24" value="${countTitleColumn.intValue().toString()}"/>
<assert:assertEquals expected="24" value="${countContentColumn.intValue().toString()}"/>
<!-- TasklistClass aggregator test -->
<x:set var="title" select="string($doc//body/section/table/tr[1]/th[20])"/>
<assert:assertEquals expected="Classes Tasks" value="${title}"/>
<x:set var="taskCount" select="string($doc//body/section/table/tr[2]/td[20])"/>
<assert:assertEquals expected="1" value="${taskCount}"/>
<!-- TasklistMethod aggregator test -->
<x:set var="title" select="string($doc//body/section/table/tr[1]/th[21])"/>
<assert:assertEquals expected="Methods Tasks" value="${title}"/>
<x:set var="taskCount" select="string($doc//body/section/table/tr[2]/td[21])"/>
<assert:assertEquals expected="2" value="${taskCount}"/>
<!-- Tasklist aggregator test -->
<x:set var="title" select="string($doc//body/section/table/tr[1]/th[22])"/>
<assert:assertEquals expected="All Tasks" value="${title}"/>
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[22])"/>
<assert:assertEquals expected="3" value="${taskCount}"/>
<!-- SCM Changed Files aggregator test -->
<x:set var="title" select="string($doc/document/body/section/table/tr[1]/th[23])"/>
<assert:assertEquals expected="SCM Changed Files" value="${title}"/>
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[23])"/>
<assert:assertEquals expected="8" value="${taskCount}"/>
<!-- SCM Changed Commit aggregator test -->
<x:set var="title" select="string($doc/document/body/section/table/tr[1]/th[24])"/>
<assert:assertEquals expected="SCM commits" value="${title}"/>
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[24])"/>
<assert:assertEquals expected="4" value="${taskCount}"/>
</goal>
</project>

View File

@@ -40,7 +40,7 @@ maven.dashboard.runreactor = false
# Define what dashboard aggregators will be run. This property is inherited
# by the subprojects and thus they don't need to define it again.
maven.dashboard.aggregators = csall,cserrors,cswarnings,csfiles,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors,simiantdl,pmdfiles,pmdviolations,fbfiles,fbviolations,jcoveragelipc,jcoverageloc
maven.dashboard.aggregators = csall,cserrors,cswarnings,csfiles,clovertpc,cloverloc,cloverncloc,junittests,junitpassrate,junitfailures,juniterrors,simiantdl,pmdfiles,pmdviolations,fbfiles,fbviolations,jcoveragelipc,jcoverageloc,tasklistclass,tasklistmethod,tasklist,scmchangedfiles,scmchangedcommit
# Make sure that an XML report is generated whenever Clover is run. Also
# inherited by the subprojects.

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- File used to simulate some changelog being generated. We're manually
introducing this file because we wish to be sure there are always
changelogs in our tests (we are asserting for them in the top level
maven.xml file) -->
<changelog>
<changelog-entry>
<date>2004-11-25</date>
<time>14:00:00</time>
<author><![CDATA[Philippe Kernevez]]></author>
<file>
<name>src/application/META-INF/.cvsignore</name>
<revision>1.1</revision>
</file>
<file>
<name>src/application/META-INF/delete_me.txt</name>
<revision>1.2</revision>
</file>
<msg><![CDATA[*** empty log message ***
]]></msg>
</changelog-entry>
<changelog-entry>
<date>2004-11-25</date>
<time>13:52:01</time>
<author><![CDATA[Philippe Kernevez]]></author>
<file>
<name>src/application/META-INF/delete_me.txt</name>
<revision>1.1</revision>
</file>
<msg><![CDATA[*** empty log message ***
]]></msg>
</changelog-entry>
<changelog-entry>
<date>2004-11-25</date>
<time>13:41:30</time>
<author><![CDATA[Philippe Kernevez]]></author>
<file>
<name>src/application/META-INF/application.xml</name>
<revision>1.4</revision>
</file>
<msg><![CDATA[*** empty log message ***
]]></msg>
</changelog-entry>
<changelog-entry>
<date>2004-11-25</date>
<time>11:13:58</time>
<author><![CDATA[Philippe Kernevez]]></author>
<file>
<name>datamodel/delete_me.txt</name>
<revision>1.1</revision>
</file>
<file>
<name>doc/delete_me.txt</name>
<revision>1.1</revision>
</file>
<file>
<name>release-notes/delete_me.txt</name>
<revision>1.1</revision>
</file>
<file>
<name>script/delete_me.txt</name>
<revision>1.1</revision>
</file>
<msg><![CDATA[*** empty log message ***
]]></msg>
</changelog-entry>
</changelog>

View File

@@ -0,0 +1,25 @@
<!--
/*
* Copyright 2004 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.
*/
-->
<project xmlns:j="jelly:core">
<preGoal name="dashboard:report-single">
<copy file="./conf/test/changelog.xml" todir="${maven.build.dir}"/>
</preGoal>
</project>

View File

@@ -40,5 +40,6 @@
<report>maven-junit-report-plugin</report>
<report>maven-simian-plugin</report>
<report>maven-jcoverage-plugin</report>
<report>maven-tasklist-plugin</report>
</reports>
</project>

View File

@@ -58,17 +58,26 @@ package org.apache.maven.dashboard.test.subproject1;
/**
* Example voluntarily generating checsktyle errors.
* @todo Used by tasklistclass & tasklist aggregators
*
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
*
* @version $Id: Sample.java,v 1.2 2004/04/30 14:47:11 vmassol Exp $
* @version $Id: Sample.java,v 1.3 2004/11/26 08:33:00 vmassol Exp $
*/
public class Sample
{
/**
* @todo Used by tasklistmethod & tasklist aggregators
*
*/
public void unusedMethod()
{
}
/**
* @todo Used by tasklistmethod & tasklist aggregators
*
*/
public void someMethod()
{
new Boolean(true);

View File

@@ -165,6 +165,41 @@
Total number of FindBugs violations.
</td>
</tr>
<tr>
<td>tasklistclass</td>
<td>Maven Tasks</td>
<td>
Total number of classes with task definition (@todo tag).
</td>
</tr>
<tr>
<td>tasklistmethod</td>
<td>Maven Tasks</td>
<td>
Total number of methods with task definition (@todo tag).
</td>
</tr>
<tr>
<td>tasklist</td>
<td>Maven Tasks</td>
<td>
Total number of task definition (@todo tag).
</td>
</tr>
<tr>
<td>scmchangedfiles</td>
<td>SCM Changed Files</td>
<td>
Total number of changed files in scm.
</td>
</tr>
<tr>
<td>scmchangedcommit</td>
<td>SCM commits</td>
<td>
Total number of scm commit.
</td>
</tr>
</table>
</section>
</body>

View File

@@ -25,8 +25,15 @@
</properties>
<body>
<release version="1.6-SNAPSHOT" date="in CVS">
<action dev="pkernevez" type="add" issue="MPDASHBOARD-16">
Added Maven Change Log aggregators.
</action>
<action dev="pkernevez" type="add" issue="MPDASHBOARD-16">
Added Maven Tasks List aggregators.
</action>
<action dev="vmassol" type="fix" issue="MPDASHBOARD-16">
Added Findbugs aggregators which were missing.
Added Findbugs aggregators which were supposed to have been committed
in the previous version but which somehow were not...
</action>
</release>
<release version="1.5" date="2004-10-15">

View File

@@ -180,6 +180,58 @@ maven.dashboard.aggregator.simiantdl.artifact = ${maven.build.dir}/generated-xdo
maven.dashboard.aggregator.simiantdl.label = Simian TDL
maven.dashboard.aggregator.simiantdl.goal = maven-simian-plugin:report
maven.dashboard.aggregator.simiantdl.description = Simian Total Duplicate Lines
# Properties for the JCoverage covered lines percent aggregator
maven.dashboard.aggregator.jcoveragelipc.script = ${maven.dashboard.aggregators.dir}/jcoveragelipc.jelly
maven.dashboard.aggregator.jcoveragelipc.artifact = ${maven.build.dir}/jcoverage/coverage.xml
maven.dashboard.aggregator.jcoveragelipc.label = JCoverage %lines
maven.dashboard.aggregator.jcoveragelipc.goal = maven-jcoverage-plugin:report
maven.dashboard.aggregator.jcoveragelipc.description = JCoverage covered lines percentile
# Properties for the JCoverage total lines aggregator
maven.dashboard.aggregator.jcoverageloc.script = ${maven.dashboard.aggregators.dir}/jcoverageloc.jelly
maven.dashboard.aggregator.jcoverageloc.artifact = ${maven.build.dir}/jcoverage/coverage.xml
maven.dashboard.aggregator.jcoverageloc.label = JCoverage LOC
maven.dashboard.aggregator.jcoverageloc.goal = maven-jcoverage-plugin:report
maven.dashboard.aggregator.jcoverageloc.description = JCoverage total lines of code
# Classes Tasks aggregator
maven.dashboard.aggregator.tasklistclass.script = ${maven.dashboard.aggregators.dir}/task-list-classes.jelly
maven.dashboard.aggregator.tasklistclass.artifact = ${maven.build.dir}/generated-xdocs/task-list.xml
maven.dashboard.aggregator.tasklistclass.label = Classes Tasks
maven.dashboard.aggregator.tasklistclass.goal = maven-tasklist-plugin:report
maven.dashboard.aggregator.tasklistclass.description = Number of classes with task definition (@todo tag).
# Methods Tasks aggregator
maven.dashboard.aggregator.tasklistmethod.script = ${maven.dashboard.aggregators.dir}/task-list-methods.jelly
maven.dashboard.aggregator.tasklistmethod.artifact = ${maven.build.dir}/generated-xdocs/task-list.xml
maven.dashboard.aggregator.tasklistmethod.label = Methods Tasks
maven.dashboard.aggregator.tasklistmethod.goal = maven-tasklist-plugin:report
maven.dashboard.aggregator.tasklistmethod.description = Number of methods with task definition (@todo tag).
# All Tasks aggregator
maven.dashboard.aggregator.tasklist.script = ${maven.dashboard.aggregators.dir}/task-list-all.jelly
maven.dashboard.aggregator.tasklist.artifact = ${maven.build.dir}/generated-xdocs/task-list.xml
maven.dashboard.aggregator.tasklist.label = All Tasks
maven.dashboard.aggregator.tasklist.goal = maven-tasklist-plugin:report
maven.dashboard.aggregator.tasklist.description = Number of task definition (@todo tag).
# Changed log: total number of scm changed files aggregator
maven.dashboard.aggregator.scmchangedfiles.script = D:/Developpement/VMA/maven/dashboard/src/plugin-resources/aggregators/changelogfiles.jelly
maven.dashboard.aggregator.scmchangedfiles.artifact = ${maven.build.dir}/changelog.xml
maven.dashboard.aggregator.scmchangedfiles.label = SCM Changed Files
maven.dashboard.aggregator.scmchangedfiles.goal = maven-changelog-plugin:report
maven.dashboard.aggregator.scmchangedfiles.description = Total number of changed files in scm.
# Changed log: total number of scm commit aggregator
maven.dashboard.aggregator.scmchangedcommit.script = D:/Developpement/VMA/maven/dashboard/src/plugin-resources/aggregators/changelogcommit.jelly
maven.dashboard.aggregator.scmchangedcommit.artifact = ${maven.build.dir}/changelog.xml
maven.dashboard.aggregator.scmchangedcommit.label = SCM commits
maven.dashboard.aggregator.scmchangedcommit.goal = maven-changelog-plugin:report
maven.dashboard.aggregator.scmchangedcommit.description = Total number of scm commit.
]]></source>
</section>
</body>