You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/09/19 16:51:45 UTC
cvs commit: maven/src/plugins-build/statcvs/xdocs goals.xml changes.xml
vmassol 2003/09/19 07:51:45
Modified: src/plugins-build/statcvs project.xml plugin.jelly
src/plugins-build/statcvs/xdocs goals.xml changes.xml
Log:
Migrated the plugin to use the new statcvs-xml jar (which generates XML xdoc output instead of HTML).
Revision Changes Path
1.16 +36 -11 maven/src/plugins-build/statcvs/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/statcvs/project.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- project.xml 19 Sep 2003 08:40:50 -0000 1.15
+++ project.xml 19 Sep 2003 14:51:44 -0000 1.16
@@ -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>
1.10 +71 -54 maven/src/plugins-build/statcvs/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/statcvs/plugin.jelly,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- plugin.jelly 29 Aug 2003 06:27:52 -0000 1.9
+++ plugin.jelly 19 Sep 2003 14:51:44 -0000 1.10
@@ -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"/>
- </j:if>
- </goal>
-
- <goal name="maven-statcvs-plugin:deregister">
- <j:if test="${jdk14 == 'true'}">
- <doc:deregisterReport name="StatCVS Report"/>
+
+ <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: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>
1.2 +22 -2 maven/src/plugins-build/statcvs/xdocs/goals.xml
Index: goals.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/statcvs/xdocs/goals.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- goals.xml 24 Jan 2003 03:45:50 -0000 1.1
+++ goals.xml 19 Sep 2003 14:51:45 -0000 1.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>
1.5 +6 -0 maven/src/plugins-build/statcvs/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/statcvs/xdocs/changes.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- changes.xml 19 Sep 2003 08:40:50 -0000 1.4
+++ changes.xml 19 Sep 2003 14:51:45 -0000 1.5
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org