Author: epunzalan
Date: Sun Jun 18 23:33:02 2006
New Revision: 415252

URL: http://svn.apache.org/viewvc?rev=415252&view=rev
Log:
Apply code formatting and added the license header

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=415252&r1=415251&r2=415252&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
 Sun Jun 18 23:33:02 2006
@@ -1,15 +1,20 @@
 package org.apache.maven.plugin.docck;
 
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+/*
+ * Copyright 2001-2005 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.
+ */
 
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpException;
@@ -23,12 +28,22 @@
 import org.apache.maven.shared.model.fileset.util.FileSetManager;
 import org.codehaus.plexus.util.IOUtil;
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Performs the heavy lifting for documentation checks. This is designed to be
  * reused for other types of projects, too.
- * 
- * @author jdcasey
  *
+ * @author jdcasey
  */
 public abstract class AbstractCheckDocumentationMojo
     extends AbstractMojo
@@ -43,7 +58,7 @@
 
     /**
      * An optional location where the results should be written.
-     * 
+     *
      * @parameter expression="${output}"
      */
     private File output;
@@ -182,7 +197,7 @@
     private List checkProject( MavenProject project )
     {
         getLog().info( "Checking project: " + project.getName() );
-        
+
         List errors = new ArrayList();
 
         // check for licenses
@@ -199,15 +214,15 @@
                 License license = (License) it.next();
 
                 String url = license.getUrl();
-                
+
                 String protocol = null;
-                
+
                 try
                 {
                     URL licenseUrl = new URL( url );
-                    
+
                     protocol = licenseUrl.getProtocol();
-                    
+
                     if ( protocol != null )
                     {
                         protocol = protocol.toLowerCase();
@@ -215,8 +230,8 @@
                 }
                 catch ( MalformedURLException e )
                 {
-                    getLog().debug( "License: " + license.getName() + " with 
appears to have an invalid URL: \'" + url + "\'.\nError: "
-                                + e.getMessage() + "\n\nTrying to access it as 
a file instead." );
+                    getLog().debug( "License: " + license.getName() + " with 
appears to have an invalid URL: \'" + url +
+                        "\'.\nError: " + e.getMessage() + "\n\nTrying to 
access it as a file instead." );
                 }
 
                 if ( protocol != null && protocol.startsWith( "http" ) )
@@ -224,7 +239,7 @@
                     HeadMethod headMethod = new HeadMethod( url );
                     headMethod.setFollowRedirects( true );
                     headMethod.setDoAuthentication( false );
-                    
+
                     try
                     {
                         if ( httpClient.executeMethod( headMethod ) != 200 )
@@ -234,13 +249,13 @@
                     }
                     catch ( HttpException e )
                     {
-                        errors.add( "Cannot reach license: " + 
license.getName() + " with URL: \'" + url
-                            + "\'.\nError: " + e.getMessage() );
+                        errors.add( "Cannot reach license: " + 
license.getName() + " with URL: \'" + url +
+                            "\'.\nError: " + e.getMessage() );
                     }
                     catch ( IOException e )
                     {
-                        errors.add( "Cannot reach license: " + 
license.getName() + " with URL: \'" + url
-                            + "\'.\nError: " + e.getMessage() );
+                        errors.add( "Cannot reach license: " + 
license.getName() + " with URL: \'" + url +
+                            "\'.\nError: " + e.getMessage() );
                     }
                     finally
                     {
@@ -295,7 +310,8 @@
         return errors;
     }
 
-    protected abstract void checkPackagingSpecificDocumentation( MavenProject 
project, List errors, File siteDirectory );
+    protected abstract void checkPackagingSpecificDocumentation( MavenProject 
project, List errors,
+                                                                 File 
siteDirectory );
 
     private boolean findFiles( File siteDirectory, String pattern )
     {

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=415252&r1=415251&r2=415252&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
 Sun Jun 18 23:33:02 2006
@@ -16,10 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.Parameter;
@@ -28,15 +24,17 @@
 import org.apache.maven.tools.plugin.extractor.ExtractionException;
 import org.apache.maven.tools.plugin.scanner.MojoScanner;
 
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+
 /**
  * Checks a plugin's documentation for the standard minimums.
  *
+ * @author jdcasey
  * @goal plugin
  * @aggregator
- * 
  * @phase validate
- *
- * @author jdcasey
  */
 public class CheckPluginDocumentationMojo
     extends AbstractCheckDocumentationMojo
@@ -100,8 +98,8 @@
 
                                 if ( paramDescription == null || 
paramDescription.trim().length() < 1 )
                                 {
-                                    errors.add( "Parameter: \'" + 
param.getName() + "\' in mojo: \'" + mojo.getGoal()
-                                        + "\' is missing a description." );
+                                    errors.add( "Parameter: \'" + 
param.getName() + "\' in mojo: \'" + mojo.getGoal() +
+                                        "\' is missing a description." );
                                 }
                             }
                         }


Reply via email to