You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/07/30 22:32:06 UTC

svn commit: r1367274 - in /maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency: ./ fromConfiguration/ resolvers/ treeSerializers/ utils/filters/ utils/markers/ utils/translators/

Author: hboutemy
Date: Mon Jul 30 20:32:05 2012
New Revision: 1367274

URL: http://svn.apache.org/viewvc?rev=1367274&view=rev
Log:
fixed errors reported by Checkstyle

Modified:
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyFilterMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeReportMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/ArtifactItem.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/resolvers/ResolvePluginsMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/DOTDependencyNodeVisitor.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/TGFDependencyNodeVisitor.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/DestFileFilter.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/MarkerFileFilter.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/markers/SourcesFileMarkerHandler.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/translators/ClassifierTypeTranslator.java

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyFilterMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyFilterMojo.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyFilterMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyFilterMojo.java Mon Jul 30 20:32:05 2012
@@ -1,18 +1,22 @@
 package org.apache.maven.plugin.dependency;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file 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
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ *  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.
+ * 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.maven.artifact.Artifact;

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeReportMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeReportMojo.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeReportMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeReportMojo.java Mon Jul 30 20:32:05 2012
@@ -135,9 +135,9 @@ public class AnalyzeReportMojo
                 }
             }
 
-            ProjectDependencyAnalysis analysisTemp = new ProjectDependencyAnalysis( analysis.getUsedDeclaredArtifacts(),
-                                                                                    analysis.getUsedUndeclaredArtifacts(),
-                                                                                    filteredUnusedDeclared );
+            ProjectDependencyAnalysis analysisTemp =
+                new ProjectDependencyAnalysis( analysis.getUsedDeclaredArtifacts(),
+                                               analysis.getUsedUndeclaredArtifacts(), filteredUnusedDeclared );
             analysis = analysisTemp;
         }
 

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java Mon Jul 30 20:32:05 2012
@@ -331,9 +331,9 @@ public class BuildClasspathMojo
     }
 
     /**
-     * Reads into a string the file specified by the mojo param 'outputFile'. Assumes, the instance variable 'outputFile' is not
-     * null.
-     *
+     * Reads into a string the file specified by the mojo param 'outputFile'. Assumes, the instance variable
+     * 'outputFile' is not null.
+     * 
      * @return the string contained in the classpathFile, if exists, or null otherwise.
      * @throws MojoExecutionException
      */

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java Mon Jul 30 20:32:05 2012
@@ -97,12 +97,11 @@ public class CopyDependenciesMojo
         {
             try
             {
-                ArtifactRepository targetRepository = repositoryFactory.createDeploymentArtifactRepository( "local",
-                                                                                                            outputDirectory.toURL().toExternalForm(),
-                                                                                                            (ArtifactRepositoryLayout) repositoryLayouts.get(
-                                                                                                                "default" ),
-                                                                                                            false
-                                                                                                            /*uniqueVersion*/ );
+                ArtifactRepository targetRepository =
+                    repositoryFactory.createDeploymentArtifactRepository( "local",
+                                                                          outputDirectory.toURL().toExternalForm(),
+                                                                          (ArtifactRepositoryLayout) repositoryLayouts.get( "default" ),
+                                                                          false /* uniqueVersion */);
                 for ( Artifact artifact : artifacts )
                 {
                     installArtifact( artifact, targetRepository );

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java Mon Jul 30 20:32:05 2012
@@ -181,7 +181,7 @@ public class GetMojo
         if ( artifactId == null && artifact == null )
         {
             throw new MojoFailureException( "You must specify an artifact, "
-                                                + "e.g. -Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0" );
+                + "e.g. -Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0" );
         }
         if ( artifact != null )
         {

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/ArtifactItem.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/ArtifactItem.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/ArtifactItem.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/ArtifactItem.java Mon Jul 30 20:32:05 2012
@@ -330,11 +330,9 @@ public class ArtifactItem
     }
 
     /**
-     * @param excludes
-     * 			A comma separated list of items to exclude
-     * 			i.e.  <code>**\/*.xml, **\/*.properties</code>
+     * @param excludes A comma separated list of items to exclude i.e. <code>**\/*.xml, **\/*.properties</code>
      */
-    public void setExcludes ( String excludes )
+    public void setExcludes( String excludes )
     {
         this.excludes = excludes;
     }
@@ -348,9 +346,7 @@ public class ArtifactItem
     }
 
     /**
-     * @param includes
-     * 			A comma separated list of items to include
-     * 			i.e.  <code>**\/*.xml, **\/*.properties</code>
+     * @param includes A comma separated list of items to include i.e. <code>**\/*.xml, **\/*.properties</code>
      */
     public void setIncludes ( String includes )
     {

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/resolvers/ResolvePluginsMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/resolvers/ResolvePluginsMojo.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/resolvers/ResolvePluginsMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/resolvers/ResolvePluginsMojo.java Mon Jul 30 20:32:05 2012
@@ -1,18 +1,22 @@
 package org.apache.maven.plugin.dependency.resolvers;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file 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
- * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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.
+ *
+ * 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.maven.artifact.Artifact;
@@ -148,11 +152,6 @@ public class ResolvePluginsMojo
     /**
      * This method resolves the plugin artifacts from the project.
      *
-     * @param project                  The POM.
-     * @param artifactFactory          component to build artifact objects.
-     * @param localRepository          where to resolve artifacts.
-     * @param remotePluginRepositories list of remote repositories used to resolve plugins.
-     * @param artifactResolver         component used to resolve artifacts.
      * @return set of resolved plugin artifacts.
      * @throws ArtifactResolutionException
      * @throws ArtifactNotFoundException

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/DOTDependencyNodeVisitor.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/DOTDependencyNodeVisitor.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/DOTDependencyNodeVisitor.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/DOTDependencyNodeVisitor.java Mon Jul 30 20:32:05 2012
@@ -42,7 +42,7 @@ public class DOTDependencyNodeVisitor
      *
      * @param writer the writer to write to.
      */
-    public DOTDependencyNodeVisitor( Writer writer)
+    public DOTDependencyNodeVisitor( Writer writer )
     {
         super( writer );
     }

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/TGFDependencyNodeVisitor.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/TGFDependencyNodeVisitor.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/TGFDependencyNodeVisitor.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/treeSerializers/TGFDependencyNodeVisitor.java Mon Jul 30 20:32:05 2012
@@ -44,7 +44,7 @@ public class TGFDependencyNodeVisitor
      *
      * @author <a href="mailto:jerome.creignou@gmail.com">Jerome Creignou</a>
      */
-    final static class EdgeAppender
+    static final class EdgeAppender
     {
         /**
          * Edge start.

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/DestFileFilter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/DestFileFilter.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/DestFileFilter.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/DestFileFilter.java Mon Jul 30 20:32:05 2012
@@ -69,8 +69,9 @@ public class DestFileFilter
     }
 
     public DestFileFilter( boolean overWriteReleases, boolean overWriteSnapshots, boolean overWriteIfNewer,
-                          boolean useSubDirectoryPerArtifact, boolean useSubDirectoryPerType, boolean useSubDirectoryPerScope,
-                          boolean useRepositoryLayout, boolean removeVersion, File outputFileDirectory )
+                           boolean useSubDirectoryPerArtifact, boolean useSubDirectoryPerType,
+                           boolean useSubDirectoryPerScope, boolean useRepositoryLayout, boolean removeVersion,
+                           File outputFileDirectory )
     {
         this.overWriteReleases = overWriteReleases;
         this.overWriteSnapshots = overWriteSnapshots;
@@ -95,7 +96,7 @@ public class DestFileFilter
         Set<Artifact> artifacts_ = artifacts;
         Set<Artifact> result = new HashSet<Artifact>();
         
-        for( Artifact artifact : artifacts_ )
+        for ( Artifact artifact : artifacts_ )
         {
             if ( isArtifactIncluded( new ArtifactItem( artifact ) ) )
             {
@@ -254,9 +255,10 @@ public class DestFileFilter
         File destFolder = item.getOutputDirectory();
         if ( destFolder == null )
         {
-            destFolder = DependencyUtil.getFormattedOutputDirectory( useSubDirectoryPerScope, useSubDirectoryPerType,
-                                                                     useSubDirectoryPerArtifact, useRepositoryLayout,
-                                                                     removeVersion, this.outputFileDirectory, artifact );
+            destFolder =
+                DependencyUtil.getFormattedOutputDirectory( useSubDirectoryPerScope, useSubDirectoryPerType,
+                                                            useSubDirectoryPerArtifact, useRepositoryLayout,
+                                                            removeVersion, this.outputFileDirectory, artifact );
         }
 
         File destFile = null;

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/MarkerFileFilter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/MarkerFileFilter.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/MarkerFileFilter.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/filters/MarkerFileFilter.java Mon Jul 30 20:32:05 2012
@@ -67,7 +67,7 @@ public class MarkerFileFilter
         Set<Artifact> artifacts_ = artifacts;
         Set<Artifact> result = new HashSet<Artifact>();
         
-        for( Artifact artifact : artifacts_ )
+        for ( Artifact artifact : artifacts_ )
         {
             if ( isArtifactIncluded( new ArtifactItem( artifact ) ) )
             {

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/markers/SourcesFileMarkerHandler.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/markers/SourcesFileMarkerHandler.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/markers/SourcesFileMarkerHandler.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/markers/SourcesFileMarkerHandler.java Mon Jul 30 20:32:05 2012
@@ -59,7 +59,7 @@ public class SourcesFileMarkerHandler
     /**
      * Get MarkerFile, exposed for unit testing purposes
      * 
-     * @param is
+     * @param res
      *            resolved or not.
      * @return marker file for this artifact.
      */
@@ -85,7 +85,7 @@ public class SourcesFileMarkerHandler
      * @return <code>true</code> if and only if the file or directory denoted
      *         by this abstract pathname exists; <code>false</code> otherwise
      * 
-     * @throws SecurityException
+     * @throws MojoExecutionException
      *             If a security manager exists and its <code>{@link
      *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
      *             method denies read access to the file or directory
@@ -188,7 +188,7 @@ public class SourcesFileMarkerHandler
     }
 
     /**
-     * @param resolved
+     * @param isResolved
      *            The resolved to set.
      */
     public void setResolved( boolean isResolved )

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/translators/ClassifierTypeTranslator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/translators/ClassifierTypeTranslator.java?rev=1367274&r1=1367273&r2=1367274&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/translators/ClassifierTypeTranslator.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/translators/ClassifierTypeTranslator.java Mon Jul 30 20:32:05 2012
@@ -109,7 +109,7 @@ public class ClassifierTypeTranslator
     }
 
     /**
-     * @param type
+     * @param theType
      *            The type to set.
      */
     public void setType( String theType )