diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java b/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java index e5014cf08e..6589989a44 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java @@ -18,7 +18,6 @@ package org.apache.maven.artifact.deployer; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.ArtifactRepository; import java.io.File; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JarHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JarHandler.java index 0d40c383eb..1b6de9c4a8 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JarHandler.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JarHandler.java @@ -1,9 +1,5 @@ package org.apache.maven.artifact.handler; -import org.apache.maven.artifact.Artifact; - -import java.io.File; - /* * Copyright 2001-2004 The Apache Software Foundation. * diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PluginHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PluginHandler.java index d11e805625..de8cb9ccca 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PluginHandler.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PluginHandler.java @@ -16,10 +16,6 @@ package org.apache.maven.artifact.handler; * limitations under the License. */ -import org.apache.maven.artifact.Artifact; - -import java.io.File; - /** * @author Jason van Zyl * @version $Id$ diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PomHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PomHandler.java index 02c6b63333..71eb072fbf 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PomHandler.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/PomHandler.java @@ -16,10 +16,6 @@ package org.apache.maven.artifact.handler; * limitations under the License. */ -import org.apache.maven.artifact.Artifact; - -import java.io.File; - /** * @author Jason van Zyl * @version $Id$ diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/TestHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/TestHandler.java index 22a3bc8cb3..2345cd860e 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/TestHandler.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/TestHandler.java @@ -16,10 +16,6 @@ package org.apache.maven.artifact.handler; * limitations under the License. */ -import org.apache.maven.artifact.Artifact; - -import java.io.File; - /** * @todo [BP] should be removed and replaced with scope if other design is approved * @author Jason van Zyl diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java b/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java index 924120f8b4..4d6c00da0c 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java @@ -18,7 +18,6 @@ package org.apache.maven.artifact.installer; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.ArtifactRepository; import java.io.File; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java index c88264e4cd..4fa684fbd9 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java @@ -17,7 +17,6 @@ package org.apache.maven.artifact.repository; */ import org.apache.maven.wagon.repository.Repository; -import org.codehaus.plexus.util.StringUtils; /** * This class is an abstraction of the location from/to resources diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/request/ArtifactRequestTransformation.java b/maven-artifact/src/main/java/org/apache/maven/artifact/request/ArtifactRequestTransformation.java index 519ec9327e..84027ce6ed 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/request/ArtifactRequestTransformation.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/request/ArtifactRequestTransformation.java @@ -1,12 +1,5 @@ package org.apache.maven.artifact.request; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.ArtifactRepository; - -import java.util.Map; -import java.util.Set; - /* * Copyright 2001-2004 The Apache Software Foundation. * @@ -23,6 +16,12 @@ import java.util.Set; * limitations under the License. */ +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.repository.ArtifactRepository; + +import java.util.Map; +import java.util.Set; + /** * @author Jason van Zyl * @version $Id$ diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index b5ef7b66bf..4f77f946af 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -62,7 +62,7 @@ public class DefaultArtifactResolver return artifact; } - private String LS = System.getProperty( "line.separator" ); + private static final String LS = System.getProperty( "line.separator" ); private String artifactNotFound( Artifact artifact, Set remoteRepositories ) { diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java index 8655ec18f4..45a8899e44 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java @@ -16,9 +16,8 @@ package org.apache.maven.artifact.installer; * limitations under the License. */ -import org.apache.maven.artifact.ArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DefaultArtifact; +import org.apache.maven.artifact.ArtifactComponentTestCase; import java.io.File; diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java index 59c601feb5..ba1575c0c7 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java @@ -35,30 +35,21 @@ public class DefaultWagonManagerTest Wagon wagon = null; - try - { - wagon = (Wagon) wagonManager.getWagon( "a" ); + wagon = (Wagon) wagonManager.getWagon( "a" ); - assertNotNull( wagon ); + assertNotNull( wagon ); - wagon = (Wagon) wagonManager.getWagon( "b1" ); + wagon = (Wagon) wagonManager.getWagon( "b1" ); - assertNotNull( wagon ); + assertNotNull( wagon ); - wagon = (Wagon) wagonManager.getWagon( "b2" ); + wagon = (Wagon) wagonManager.getWagon( "b2" ); - assertNotNull( wagon ); + assertNotNull( wagon ); - wagon = (Wagon) wagonManager.getWagon( "c" ); + wagon = (Wagon) wagonManager.getWagon( "c" ); - assertNotNull( wagon ); - } - catch ( Exception e ) - { - e.printStackTrace(); - - fail( e.getMessage() ); - } + assertNotNull( wagon ); try {