You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/06/19 11:12:15 UTC
svn commit: r415265 - in /maven/sandbox/plugins/maven-docck-plugin/src:
main/java/org/apache/maven/plugin/docck/ site/ site/apt/ site/apt/examples/
Author: epunzalan
Date: Mon Jun 19 02:12:14 2006
New Revision: 415265
URL: http://svn.apache.org/viewvc?rev=415265&view=rev
Log:
PR: 2394
Implemented some of the documentation rules required by the docck plugin
Added:
maven/sandbox/plugins/maven-docck-plugin/src/site/
maven/sandbox/plugins/maven-docck-plugin/src/site/apt/
maven/sandbox/plugins/maven-docck-plugin/src/site/apt/examples/
maven/sandbox/plugins/maven-docck-plugin/src/site/apt/examples/file-output.apt
maven/sandbox/plugins/maven-docck-plugin/src/site/apt/usage.apt
maven/sandbox/plugins/maven-docck-plugin/src/site/site.xml (with props)
Modified:
maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
Modified: maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java?rev=415265&r1=415264&r2=415265&view=diff
==============================================================================
--- maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java (original)
+++ maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java Mon Jun 19 02:12:14 2006
@@ -287,11 +287,13 @@
errors.add( "site.xml is missing." );
}
+ /* disabled bec site:site generates a duplicate file error
// check for index.(xml|apt|html)
if ( !findFiles( siteDirectory, "index" ) )
{
errors.add( "Missing site index.(html|xml|apt)." );
}
+ */
// check for usage.(xml|apt|html)
if ( !findFiles( siteDirectory, "usage" ) )
Modified: maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java?rev=415265&r1=415264&r2=415265&view=diff
==============================================================================
--- maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java (original)
+++ maven/sandbox/plugins/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java Mon Jun 19 02:12:14 2006
@@ -41,6 +41,8 @@
{
/**
+ * Plexus component that searches for Mojos
+ *
* @component
*/
protected MojoScanner mojoScanner;
Added: maven/sandbox/plugins/maven-docck-plugin/src/site/apt/examples/file-output.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-docck-plugin/src/site/apt/examples/file-output.apt?rev=415265&view=auto
==============================================================================
--- maven/sandbox/plugins/maven-docck-plugin/src/site/apt/examples/file-output.apt (added)
+++ maven/sandbox/plugins/maven-docck-plugin/src/site/apt/examples/file-output.apt Mon Jun 19 02:12:14 2006
@@ -0,0 +1,41 @@
+
+Using the DOCCK Plugin to send its output to a file
+
+* Configuring your pom.xml
+
+ You can use the following configuration in your pom.xml to run the DOCCK
+ Plugin everytime the project is built and send its output to a file.
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ [...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-docck-plugin</artifactId>
+ <executions>
+ <execution>
+ <configuration>
+ <output>target/docck-results.txt</output>
+ </configuration>
+ <goals>
+ <goal>plugin</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ [...]
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+* You can also direct the command-line execution output to a file using:
+
++---+
+mvn docck:plugin -Doutput=target/docck-results.txt
++---+
+
Added: maven/sandbox/plugins/maven-docck-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-docck-plugin/src/site/apt/usage.apt?rev=415265&view=auto
==============================================================================
--- maven/sandbox/plugins/maven-docck-plugin/src/site/apt/usage.apt (added)
+++ maven/sandbox/plugins/maven-docck-plugin/src/site/apt/usage.apt Mon Jun 19 02:12:14 2006
@@ -0,0 +1,130 @@
+ ------
+ Maven 2 DOCCK Plugin
+ ------
+ ------
+ 19-June-2006
+ ------
+
+DOCCK Plugin - Configuration and Usage
+
+* Introduction
+
+ This document is intended to provide instructions for using the
+ maven-docck-plugin. In order for this discussion to be useful, it's
+ critical to cover two topics: Using the DOCCK Plugin from the command-line
+ and configuring your project's pom.xml to run the DOCCK Plugin during its
+ build.
+
+* Configuring DOCCK Plugin inside pom.xml
+
+** Using the DOCCK Plugin defaults
+
+ You can use the following configuration in your pom.xml to run the DOCCK
+ Plugin everytime the project is built.
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ [...]
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-docck-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>plugin</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ [...]
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
+
+* Using the command-line
+
+ The DOCCK Plugin is easily executed from the command line since it can run at
+ without any parameter configuration.
+
+ To run DOCCK Plugin on a project, use:
+
++---+
+mvn docck:plugin
++---+
+
+* Sample Output of the DOCCK Plugin
+
+** Successful run with no documentation errors
+
++---+
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'docck'.
+[INFO] -------------------------------------------------------------------------
+---
+[INFO] Building Mojo Project
+[INFO] task-segment: [docck:plugin] (aggregator-style)
+[INFO] -------------------------------------------------------------------------
+---
+[INFO] [docck:plugin]
+[INFO] Checking project: Mojo Project
+[INFO] Using 2 extractors.
+[INFO] Applying extractor for language: java
+[INFO] Extractor for language: java found 1 mojo descriptors.
+[INFO] Applying extractor for language: bsh
+[INFO] Extractor for language: bsh found 0 mojo descriptors.
+[INFO] No documentation errors were found.
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 3 seconds
+[INFO] Finished at: Mon Jun 19 16:06:25 CST 2006
+[INFO] Final Memory: 3M/7M
+[INFO] ------------------------------------------------------------------------
++---+
+
+** Successful run with documentation errors
+
++---+
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'docck'.
+[INFO] -------------------------------------------------------------------------
+---
+[INFO] Building Mojo Project
+[INFO] task-segment: [docck:plugin] (aggregator-style)
+[INFO] -------------------------------------------------------------------------
+---
+[INFO] [docck:plugin]
+[INFO] Checking project: Mojo Project
+[INFO] Using 2 extractors.
+[INFO] Applying extractor for language: java
+[INFO] Extractor for language: java found 1 mojo descriptors.
+[INFO] Applying extractor for language: bsh
+[INFO] Extractor for language: bsh found 0 mojo descriptors.
+[INFO]
+The following documentation problems were found:
+
+o Maven Documentation Checker Plugin (3 errors)
+ - Missing site index.(html|xml|apt).
+ - Missing examples.
+ - Parameter: 'mojoParameter' in mojo: 'plugin' is missing a description.
+
+[INFO] ------------------------------------------------------------------------
+[ERROR] BUILD FAILURE
+[INFO] ------------------------------------------------------------------------
+[INFO] : documentation check
+Documentation errors were found.
+
+Please see the console output above for more information.
+[INFO] ------------------------------------------------------------------------
+[INFO] For more information, run Maven with the -e switch
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 3 seconds
+[INFO] Finished at: Mon Jun 19 15:54:58 CST 2006
+[INFO] Final Memory: 3M/7M
+[INFO] ------------------------------------------------------------------------
++---+
\ No newline at end of file
Added: maven/sandbox/plugins/maven-docck-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-docck-plugin/src/site/site.xml?rev=415265&view=auto
==============================================================================
--- maven/sandbox/plugins/maven-docck-plugin/src/site/site.xml (added)
+++ maven/sandbox/plugins/maven-docck-plugin/src/site/site.xml Mon Jun 19 02:12:14 2006
@@ -0,0 +1,23 @@
+<project name="Maven DOCCK plugin">
+ <bannerLeft>
+ <name>Maven DOCCK plugin</name>
+ <src>http://maven.apache.org/images/apache-maven-project.png</src>
+ <href>http://maven.apache.org/</href>
+ </bannerLeft>
+ <bannerRight>
+ <src>http://maven.apache.org/images/maven-small.gif</src>
+ </bannerRight>
+ <body>
+ <links>
+ <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+ </links>
+
+ <menu name="Maven DOCCK Quickstart">
+ <item name="How to Use" href="usage.html"/>
+ </menu>
+ <menu name="Examples">
+ <item name="Sending output to a file" href="examples/file-output.html" />
+ </menu>
+ ${reports}
+ </body>
+</project>
Propchange: maven/sandbox/plugins/maven-docck-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native