You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2007/07/28 02:51:55 UTC
svn commit: r560431 - in
/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck:
AbstractCheckDocumentationMojo.java CheckPluginDocumentationMojo.java
reports/DocumentationReport.java reports/DocumentationReporter.java
Author: dennisl
Date: Fri Jul 27 17:51:54 2007
New Revision: 560431
URL: http://svn.apache.org/viewvc?view=rev&rev=560431
Log:
o Fix Checkstyle errors.
Modified:
maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java
maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java
Modified: maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java?view=diff&rev=560431&r1=560430&r2=560431
==============================================================================
--- maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java (original)
+++ maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java Fri Jul 27 17:51:54 2007
@@ -63,6 +63,8 @@
public abstract class AbstractCheckDocumentationMojo
extends AbstractMojo
{
+ private static final int HTTP_STATUS_200 = 200;
+
/**
* @parameter default-value="${reactorProjects}"
* @readonly
@@ -439,7 +441,8 @@
String url = license.getUrl();
if ( StringUtils.isEmpty( url ) )
{
- reporter.error( "pom.xml is missing the <licenses>/<license>/<url> tag for the license \'" + license.getName() + "\'." );
+ reporter.error( "pom.xml is missing the <licenses>/<license>/<url> tag for the license \'"
+ + license.getName() + "\'." );
}
else
{
@@ -487,7 +490,7 @@
try
{
getLog().debug( "Verifying http url: " + url );
- if ( httpClient.executeMethod( headMethod ) != 200 )
+ if ( httpClient.executeMethod( headMethod ) != HTTP_STATUS_200 )
{
reporter.error( "Cannot reach " + description + " with URL: \'" + url + "\'." );
}
Modified: maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java?view=diff&rev=560431&r1=560430&r2=560431
==============================================================================
--- maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java (original)
+++ maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java Fri Jul 27 17:51:54 2007
@@ -108,10 +108,11 @@
{
String paramDescription = param.getDescription();
- if ( paramDescription == null || paramDescription.trim().length() < MIN_DESCRIPTION_LENGTH )
+ if ( paramDescription == null
+ || paramDescription.trim().length() < MIN_DESCRIPTION_LENGTH )
{
- reporter.error( "Parameter: \'" + param.getName() + "\' in mojo: \'" + mojo.getGoal() +
- "\' is missing a description." );
+ reporter.error( "Parameter: \'" + param.getName() + "\' in mojo: \'"
+ + mojo.getGoal() + "\' is missing a description." );
}
}
}
@@ -169,8 +170,8 @@
}
catch ( IOException e )
{
- reporter.error( "Unable to read site.xml file: \'" + siteXml.getAbsolutePath() +
- "\'.\nError: " + e.getMessage() );
+ reporter.error( "Unable to read site.xml file: \'" + siteXml.getAbsolutePath()
+ + "\'.\nError: " + e.getMessage() );
}
}
@@ -187,8 +188,8 @@
}
// check for **/examples/**.(apt|html|xml) or **/example*.(apt|html|xml)
- if ( !findFiles( projectSiteDirectory, "**/examples/*" ) &&
- !findFiles( projectSiteDirectory, "**/example*" ) )
+ if ( !findFiles( projectSiteDirectory, "**/examples/*" )
+ && !findFiles( projectSiteDirectory, "**/example*" ) )
{
reporter.error( "There are no example files in your site directory (in apt|html|xml format)."
+ " They should either be called \'example*.(apt|html|xml)\'"
Modified: maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java?view=diff&rev=560431&r1=560430&r2=560431
==============================================================================
--- maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java (original)
+++ maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReport.java Fri Jul 27 17:51:54 2007
@@ -24,9 +24,9 @@
*/
public interface DocumentationReport
{
- static final int TYPE_INFO = 1;
- static final int TYPE_WARN = 2;
- static final int TYPE_ERROR = 3;
+ int TYPE_INFO = 1;
+ int TYPE_WARN = 2;
+ int TYPE_ERROR = 3;
String getMessage();
Modified: maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java?view=diff&rev=560431&r1=560430&r2=560431
==============================================================================
--- maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java (original)
+++ maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/reports/DocumentationReporter.java Fri Jul 27 17:51:54 2007
@@ -49,7 +49,7 @@
{
List list = new ArrayList();
- for( Iterator iter = reports.iterator(); iter.hasNext(); )
+ for ( Iterator iter = reports.iterator(); iter.hasNext(); )
{
DocumentationReport report = (DocumentationReport) iter.next();
@@ -66,7 +66,7 @@
{
List list = new ArrayList();
- for( Iterator iter = reports.iterator(); iter.hasNext(); )
+ for ( Iterator iter = reports.iterator(); iter.hasNext(); )
{
DocumentationReport report = (DocumentationReport) iter.next();
@@ -78,7 +78,7 @@
public boolean hasErrors()
{
- for( Iterator iter = reports.iterator(); iter.hasNext(); )
+ for ( Iterator iter = reports.iterator(); iter.hasNext(); )
{
DocumentationReport report = (DocumentationReport) iter.next();