Migrated the plugin to use the new statcvs-xml jar (which generates XML xdoc output instead of HTML).
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114041 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
9072919863
commit
d7e5d050cb
4 files changed
+135
-67
No files matched your search
+71
-54
@@ -1,80 +1,97 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!-- ==================================================================
|
||||
Generate CVS statistics on the current CVS project
|
||||
|
||||
Note: Needs JDK 1.4+
|
||||
================================================================== -->
|
||||
<project
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:doc="doc">
|
||||
|
||||
<!-- ==================================================================
|
||||
Generate CVS statistics on the current CVS project
|
||||
|
||||
Note: Needs JDK 1.4+
|
||||
|
||||
TODO: Specify a range for the cvs log command.
|
||||
TODO: Bug if there are files not in CVS as statcvs need a fist
|
||||
empty line. This have bee reported as a bug to StatCVS
|
||||
team
|
||||
================================================================== -->
|
||||
|
||||
<goal name="maven-statcvs-plugin:register">
|
||||
<available property="jdk14" classname="java.lang.CharSequence"/>
|
||||
|
||||
<j:if test="${jdk14 == 'true'}">
|
||||
<doc:registerReport
|
||||
name="StatCVS Report"
|
||||
pluginName="maven-statcvs-plugin"
|
||||
link="statcvs/index"
|
||||
description="Show some statistics about the CVS repository"/>
|
||||
<goal name="statcvs:init">
|
||||
<ant:available property="jdk14" classname="java.lang.CharSequence"/>
|
||||
<j:if test="${jdk14 != 'true'}">
|
||||
<ant:fail>The StatCvs plugin requires JDK 1.4+</ant:fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="maven-statcvs-plugin:deregister">
|
||||
<j:if test="${jdk14 == 'true'}">
|
||||
<doc:deregisterReport name="StatCVS Report"/>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="maven-statcvs-plugin:report">
|
||||
<attainGoal name="statcvs"/>
|
||||
</goal>
|
||||
|
||||
<goal name="statcvs" prereqs="statcvs:generate"
|
||||
description="Generate CVS statistics for the current CVS project"/>
|
||||
description="Generate CVS statistics for the current CVS project"/>
|
||||
|
||||
<goal name="statcvs:generate"
|
||||
description="Generate CVS statistics for the current CVS project">
|
||||
|
||||
<available property="jdk14" classname="java.lang.CharSequence"/>
|
||||
<goal name="statcvs:generate" prereqs="statcvs:init"
|
||||
description="Generate CVS statistics for the current CVS project">
|
||||
|
||||
<j:choose>
|
||||
<j:when test="${jdk14 == 'true'}">
|
||||
<j:when test="${maven.mode.online}">
|
||||
<ant:echo>fetching cvs logs...</ant:echo>
|
||||
|
||||
<ant:mkdir dir="${maven.build.dir}"/>
|
||||
<property name="statcvs.logfile" value="${maven.build.dir}/statcvs.log"/>
|
||||
<ant:property name="statcvs.logfile"
|
||||
value="${maven.build.dir}/statcvs.log"/>
|
||||
|
||||
<!-- FIXME : We must use, with cvs, the connection string define in project.xml -->
|
||||
<cvs command="-q log" output="${statcvs.logfile}"/>
|
||||
<!-- FIXME : We must use, with cvs, the connection string define
|
||||
in project.xml -->
|
||||
<ant:cvs command="-q log" output="${statcvs.logfile}"/>
|
||||
|
||||
<property name="maven.docs.dest"
|
||||
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
|
||||
<property name="maven.gen.docs"
|
||||
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.gen.docs')}"/>
|
||||
<ant:mkdir dir="${maven.docs.dest}/statcvs"/>
|
||||
<ant:mkdir dir="${maven.gen.docs}/statcvs"/>
|
||||
|
||||
<ant:java classname="net.sf.statcvs.Main" fork="true">
|
||||
<ant:arg line="-output-dir ${maven.gen.docs}/statcvs"/>
|
||||
<ant:arg line="-title '${pom.name}'"/>
|
||||
<ant:arg line="-output-suite xdoc"/>
|
||||
<ant:arg line="-verbose"/>
|
||||
<ant:arg line="-weburl ${pom.repository.url}"/>
|
||||
|
||||
<!-- TODO/FIXME: For some reason, it is hanging if I use the
|
||||
-use-history command line argument -->
|
||||
<!--ant:arg line="-use-history"/-->
|
||||
|
||||
<ant:arg line="${statcvs.include}"/>
|
||||
<ant:arg value="${statcvs.logfile}"/>
|
||||
<ant:arg value="${basedir}/"/>
|
||||
<ant:classpath>
|
||||
<ant:pathelement location="${plugin.getDependencyPath('statcvs:statcvs-xml')}"/>
|
||||
<ant:pathelement location="${plugin.getDependencyPath('jfreechart:jfreechart')}"/>
|
||||
<ant:pathelement location="${plugin.getDependencyPath('jcommon:jcommon')}"/>
|
||||
<ant:pathelement location="${plugin.getDependencyPath('jdom:jdom')}"/>
|
||||
</ant:classpath>
|
||||
</ant:java>
|
||||
|
||||
<!-- Copy images -->
|
||||
<copy todir="${maven.docs.dest}/statcvs" overwrite="yes"
|
||||
filtering="no">
|
||||
<fileset dir="${maven.gen.docs}/statcvs">
|
||||
<include name="**/*.png"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<ant:mkdir dir="${maven.docs.dest}"/>
|
||||
|
||||
<java jar="${plugin.getDependencyPath('statcvs')}" fork="true">
|
||||
<arg value="${pom.name}"/>
|
||||
<arg value="${statcvs.logfile}"/>
|
||||
<arg value="${basedir}"/>
|
||||
<arg value="${maven.docs.dest}/statcvs"/>
|
||||
<classpath>
|
||||
<pathelement location="${plugin.getDependencyPath('statcvs')}"/>
|
||||
<pathelement location="${plugin.getDependencyPath('jfreechart')}"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</j:when>
|
||||
|
||||
<j:otherwise>
|
||||
<echo>Sorry, it needs JDK 1.4+ ...</echo>
|
||||
<ant:echo>StatCvs can obtain statistics in the online-mode only.</ant:echo>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="maven-statcvs-plugin:register" prereqs="statcvs:init">
|
||||
<doc:registerReport
|
||||
name="StatCvs Report"
|
||||
pluginName="statcvs"
|
||||
link="statcvs/index"
|
||||
description="Show some statistics about the CVS repository"/>
|
||||
</goal>
|
||||
|
||||
<goal name="maven-statcvs-plugin:deregister" prereqs="statcvs:init">
|
||||
<doc:deregisterReport name="StatCvs Report"/>
|
||||
</goal>
|
||||
|
||||
<goal name="statcvs:report" prereqs="statcvs"/>
|
||||
|
||||
</project>
|
||||
+36
-11
@@ -5,9 +5,12 @@
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-statcvs-plugin</id>
|
||||
<name>Maven StatCvs Plug-in</name>
|
||||
<currentVersion>1.2</currentVersion>
|
||||
<description/>
|
||||
<currentVersion>2.0-SNAPSHOT</currentVersion>
|
||||
<description>
|
||||
Generate CVS statistics reports.
|
||||
</description>
|
||||
<shortDescription>Provides CVS statistics</shortDescription>
|
||||
<logo>http://statcvs-xml.berlios.de/images/statcvslogo.png</logo>
|
||||
<url>http://maven.apache.org/reference/plugins/statcvs/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/statcvs/</siteDirectory>
|
||||
<repository>
|
||||
@@ -20,6 +23,11 @@
|
||||
<name>1.2</name>
|
||||
<tag>MAVEN_STATCVS_1_2</tag>
|
||||
</version>
|
||||
<version>
|
||||
<id>2.0</id>
|
||||
<name>2.0</name>
|
||||
<tag>HEAD</tag>
|
||||
</version>
|
||||
</versions>
|
||||
<developers>
|
||||
<developer>
|
||||
@@ -50,20 +58,37 @@
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
<contributors>
|
||||
<contributor>
|
||||
<name>Tammo van Lessen</name>
|
||||
<email></email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Steffen Pingel</name>
|
||||
<email></email>
|
||||
</contributor>
|
||||
</contributors>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<id>statcvs</id>
|
||||
<version>0.1.2a</version>
|
||||
<properties>
|
||||
<classloader>root.maven</classloader>
|
||||
</properties>
|
||||
<groupId>statcvs</groupId>
|
||||
<artifactId>statcvs-xml</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jfreechart</groupId>
|
||||
<artifactId>jfreechart</artifactId>
|
||||
<id>jfreechart</id>
|
||||
<version>0.9.2</version>
|
||||
<properties>
|
||||
<classloader>root.maven</classloader>
|
||||
</properties>
|
||||
<version>0.9.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jcommon</groupId>
|
||||
<artifactId>jcommon</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
<version>b9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -7,6 +7,12 @@
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<release version="2.0" date="in CVS">
|
||||
<action dev="vmassol" type="update">
|
||||
Migrated the plugin to use the new statcvs-xml jar (which generates
|
||||
XML xdoc output instead of HTML).
|
||||
</action>
|
||||
</release>
|
||||
<release version="1.2" date="2003-09-19">
|
||||
<action dev="dion" type="update">
|
||||
Updated to use maven.docs.*/maven.gen.docs
|
||||
|
||||
+22
-2
@@ -9,12 +9,32 @@
|
||||
<goals>
|
||||
<goal>
|
||||
<name>statcvs</name>
|
||||
<description>Generate CVS statistics for the current CVS project</description>
|
||||
<description>
|
||||
Generate CVS statistics for the current CVS project. You'll need to
|
||||
run <code>maven xdoc</code> (or <code>maven site</code>) to render
|
||||
the StatCvs reports as HTML (they are rendered as XML).
|
||||
</description>
|
||||
</goal>
|
||||
<goal>
|
||||
<name>statcvs:generate</name>
|
||||
<description>Generate CVS statistics for the current CVS project</description>
|
||||
<description>
|
||||
Same as <code>maven statcvs</code> (see above).
|
||||
</description>
|
||||
</goal>
|
||||
</goals>
|
||||
<section name="Automatic report generation">
|
||||
<p>
|
||||
In order to automaticall generate StatCvs reports when you generate
|
||||
your project's web site with <code>maven site</code>, add the
|
||||
following to your <code>project.xml</code>:
|
||||
</p>
|
||||
<source><![CDATA[
|
||||
<reports>
|
||||
[...]
|
||||
<report>maven-statcvs-plugin</report>
|
||||
[...]
|
||||
</reports>
|
||||
]]></source>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
Reference in new issue
Block a user