diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java index 7f9c7231d4..8435c40ca6 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java @@ -19,16 +19,15 @@ package org.apache.maven.artifact.manager; import org.apache.maven.artifact.AbstractArtifactComponent; import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.wagon.ConnectionException; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.TransferFailedException; import org.apache.maven.wagon.UnsupportedProtocolException; import org.apache.maven.wagon.Wagon; -import org.apache.maven.wagon.events.TransferListener; import org.apache.maven.wagon.authentication.AuthenticationException; import org.apache.maven.wagon.authorization.AuthorizationException; +import org.apache.maven.wagon.events.TransferListener; import org.apache.maven.wagon.proxy.ProxyInfo; import org.codehaus.plexus.PlexusConstants; import org.codehaus.plexus.PlexusContainer; @@ -55,13 +54,6 @@ public class DefaultWagonManager private TransferListener downloadMonitor; - public Artifact createArtifact( String groupId, String artifactId, String version, String type ) - { - Artifact artifact = new DefaultArtifact( groupId, artifactId, version, type ); - - return artifact; - } - public Wagon getWagon( String protocol ) throws UnsupportedProtocolException { diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/manager/WagonManager.java b/maven-artifact/src/main/java/org/apache/maven/artifact/manager/WagonManager.java index 8784b6e062..4b46d6ddc0 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/manager/WagonManager.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/manager/WagonManager.java @@ -51,6 +51,4 @@ public interface WagonManager void setProxy( String protocol, String host, int port, String username, String password, String nonProxyHosts ); void setDownloadMonitor( TransferListener downloadMonitor ); - - Artifact createArtifact( String groupId, String artifactId, String version, String type ); } \ No newline at end of file diff --git a/maven-core/src/main/java/org/apache/maven/artifact/JarOverrideRequestTransformation.java b/maven-core/src/main/java/org/apache/maven/artifact/JarOverrideRequestTransformation.java deleted file mode 100644 index 742b167ef3..0000000000 --- a/maven-core/src/main/java/org/apache/maven/artifact/JarOverrideRequestTransformation.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.apache.maven.artifact; - -/* ==================================================================== - * Copyright 2001-2004 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.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.request.ArtifactRequestTransformation; - -import java.util.Map; -import java.util.Set; - -public class JarOverrideRequestTransformation - implements ArtifactRequestTransformation -{ - public Artifact transform( Artifact artifact, - ArtifactRepository localRepository, - Set remoteRepositories, - Map parameters ) - throws Exception - { -/* TODO: need an override in the POM - MavenProject project = (MavenProject) parameters.get( "project" ); - - boolean mavenJarOverride = project.getBooleanProperty( "maven.jar.override" ); - - String mavenJarProperty = project.getProperty( "maven.jar." + project.getArtifactId() ); - - if ( mavenJarOverride && StringUtils.isNotEmpty( mavenJarProperty ) ) - { - Artifact transformedArtifact = new DefaultArtifact( artifact.getGroupId(), - artifact.getArtifactId(), - mavenJarProperty, - artifact.getType() ); - return transformedArtifact; - } -*/ - return artifact; - } -} diff --git a/maven-core/src/main/java/org/apache/maven/artifact/MavenMetadataSource.java b/maven-core/src/main/java/org/apache/maven/artifact/MavenMetadataSource.java index d8a7e52c1b..f039d52da3 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/MavenMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/MavenMetadataSource.java @@ -113,6 +113,7 @@ public class MavenMetadataSource public Artifact createArtifact( Dependency dependency, ArtifactRepository localRepository ) { + // TODO: duplicated with the ArtifactFactory, localRepository not used (should be used here to resolve path? Artifact artifact = new DefaultArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(),