You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/10/12 00:53:37 UTC

svn commit: r1021541 - in /directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins: AbstractStudioMojo.java ArtifactItem.java

Author: seelmann
Date: Mon Oct 11 22:53:37 2010
New Revision: 1021541

URL: http://svn.apache.org/viewvc?rev=1021541&view=rev
Log:
Fix checkstyle errors

Modified:
    directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java
    directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java

Modified: directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java
URL: http://svn.apache.org/viewvc/directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java?rev=1021541&r1=1021540&r2=1021541&view=diff
==============================================================================
--- directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java (original)
+++ directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java Mon Oct 11 22:53:37 2010
@@ -172,6 +172,8 @@ public abstract class AbstractStudioMojo
      *            The location to unpack the file to
      * @param file
      *            The file to unpack
+     * @throws Exception
+     *            If an error occurs
      */
     protected void unpackToLocation( final File location, final File file ) throws Exception
     {
@@ -204,7 +206,7 @@ public abstract class AbstractStudioMojo
      *            A location to pack
      * @param file
      *            The file to pack the location into
-     * @throws Exception
+     * @throws MojoExecutionException
      *             If an error occurs
      */
     protected void packFromLocation( final File location, final File file ) throws MojoExecutionException
@@ -420,6 +422,7 @@ public abstract class AbstractStudioMojo
      * @param artifact
      *            representing configured file.
      * @throws MojoExecutionException
+     *            if something goes wrong
      */
     protected void fillMissingArtifactVersion( ArtifactItem artifact ) throws MojoExecutionException
     {
@@ -474,16 +477,20 @@ public abstract class AbstractStudioMojo
      * Complete the artifacts in the artifactItems list (e.g. complete with
      * version number)
      *
+     * @param artifactItems
+     *            the artifact items
+     * @param relaxed
+     *            the relaxed
      * @throws MojoExecutionException
+     *            if something goes wrong
      */
     protected void completeArtifactItems( List<ArtifactItem> artifactItems, boolean relaxed )
         throws MojoExecutionException
     {
         List<String> warnings = new ArrayList<String>();
         // Get and complete artifacts
-        for ( Iterator<ArtifactItem> artifactItem = artifactItems.iterator(); artifactItem.hasNext(); )
+        for ( ArtifactItem item : artifactItems )
         {
-            ArtifactItem item = artifactItem.next();
             try
             {
                 // make sure we have a version.
@@ -525,6 +532,7 @@ public abstract class AbstractStudioMojo
      * Delete a directory
      *
      * @param path
+     *            the path to the directory to delete
      * @return True if directory is deleted
      */
     protected static boolean deleteDirectory( File path )
@@ -557,7 +565,8 @@ public abstract class AbstractStudioMojo
         List<Artifact> list = new ArrayList<Artifact>();
 
         // Copying only artifacts with 'provided' scope
-        for ( Iterator<Artifact> artifactItem = project.getArtifacts().iterator(); artifactItem.hasNext(); )
+        Iterator<Artifact> artifactItem = project.getArtifacts().iterator();
+        while ( artifactItem.hasNext() )
         {
             Artifact artifact = ( Artifact ) artifactItem.next();
             if ( !artifact.getScope().equalsIgnoreCase( "provided" ) )

Modified: directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java
URL: http://svn.apache.org/viewvc/directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java?rev=1021541&r1=1021540&r2=1021541&view=diff
==============================================================================
--- directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java (original)
+++ directory/studio-plugin/trunk/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java Mon Oct 11 22:53:37 2010
@@ -6,16 +6,16 @@
  *  to you 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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.studio.maven.plugins;
 
@@ -27,14 +27,14 @@ import org.apache.maven.artifact.Artifac
 /**
  * ArtifactItem represents information specified in the plugin configuration
  * section for each artifact.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ArtifactItem
 {
     /**
      * Group Id of Artifact
-     * 
+     *
      * @parameter
      * @required
      */
@@ -42,7 +42,7 @@ public class ArtifactItem
 
     /**
      * Name of Artifact
-     * 
+     *
      * @parameter
      * @required
      */
@@ -50,14 +50,14 @@ public class ArtifactItem
 
     /**
      * Version of Artifact
-     * 
+     *
      * @parameter
      */
     private String version = null;
 
     /**
      * Type of Artifact (War,Jar,etc)
-     * 
+     *
      * @parameter
      * @required
      */
@@ -65,7 +65,7 @@ public class ArtifactItem
 
     /**
      * Classifier for Artifact (tests,sources,etc)
-     * 
+     *
      * @parameter
      */
     private String classifier;
@@ -76,12 +76,20 @@ public class ArtifactItem
     private Artifact artifact;
 
 
+    /**
+     * Instantiates a new artifact item.
+     */
     public ArtifactItem()
     {
         // default constructor
     }
 
 
+    /**
+     * Instantiates a new artifact item.
+     *
+     * @param artifact the artifact
+     */
     public ArtifactItem( Artifact artifact )
     {
         this.setArtifact( artifact );
@@ -116,12 +124,12 @@ public class ArtifactItem
 
 
     /**
-     * @param artifact
-     *            The artifact to set.
+     * @param artifactId
+     *            The artifactId to set.
      */
-    public void setArtifactId( String artifact )
+    public void setArtifactId( String artifactId )
     {
-        this.artifactId = filterEmptyString( artifact );
+        this.artifactId = filterEmptyString( artifactId );
     }
 
 
@@ -201,6 +209,10 @@ public class ArtifactItem
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public String toString()
     {
         if ( this.classifier == null )