diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index 61869386b0..5d5ca736d2 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -1331,7 +1331,7 @@ public class DefaultPluginManager throws ArtifactResolutionException, ArtifactNotFoundException, InvalidDependencyVersionException { // TODO: such a call in MavenMetadataSource too - packaging not really the intention of type - Artifact artifact = repositorySystem.createBuildArtifact( project.getGroupId(), project.getArtifactId(), project.getVersion(), project.getPackaging() ); + Artifact artifact = repositorySystem.createArtifact( project.getGroupId(), project.getArtifactId(), project.getVersion(), null, project.getPackaging() ); // TODO: we don't need to resolve over and over again, as long as we are sure that the parameters are the same // check this with yourkit as a hot spot. diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index 954c45ef7d..e18ff39d5f 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -328,7 +328,7 @@ public class DefaultMavenProjectBuilder validateModel( model, projectDescriptor ); - Artifact projectArtifact = repositorySystem.createBuildArtifact( project.getGroupId(), project.getArtifactId(), project.getVersion(), project.getPackaging() ); + Artifact projectArtifact = repositorySystem.createArtifact( project.getGroupId(), project.getArtifactId(), project.getVersion(), null, project.getPackaging() ); project.setArtifact( projectArtifact ); project.setParentFile( parentDescriptor ); @@ -699,7 +699,7 @@ public class DefaultMavenProjectBuilder return domainModels; } - Artifact artifactParent = repositorySystem.createParentArtifact( domainModel.getParentGroupId(), domainModel.getParentArtifactId(), domainModel.getParentVersion() ); + Artifact artifactParent = repositorySystem.createProjectArtifact( domainModel.getParentGroupId(), domainModel.getParentArtifactId(), domainModel.getParentVersion() ); ArtifactResolutionRequest request = new ArtifactResolutionRequest( artifactParent, localRepository, remoteRepositories ); ArtifactResolutionResult result = repositorySystem.resolve( request ); diff --git a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java index 4e9e1fe1b9..0ae1105b96 100644 --- a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java +++ b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java @@ -25,7 +25,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Properties; @@ -1238,7 +1237,7 @@ public class MavenProject if ( parentArtifact == null && model.getParent() != null ) { Parent p = model.getParent(); - parentArtifact = repositorySystem.createParentArtifact( p.getGroupId(), p.getArtifactId(), p.getVersion() ); + parentArtifact = repositorySystem.createProjectArtifact( p.getGroupId(), p.getArtifactId(), p.getVersion() ); } return parentArtifact; } diff --git a/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java b/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java index d60113cee1..5b716b1ac0 100644 --- a/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java +++ b/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java @@ -97,14 +97,4 @@ public class MercuryRepositorySystem return result; } - - @Override - public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository, - List remoteRepositories ) - throws ArtifactMetadataRetrievalException - { - // TODO Auto-generated method stub - return super.retrieve( artifact, localRepository, remoteRepositories ); - } - } diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MavenRepositorySystem.java b/maven-repository/src/main/java/org/apache/maven/repository/MavenRepositorySystem.java index 6abe144898..3f72bb9a31 100644 --- a/maven-repository/src/main/java/org/apache/maven/repository/MavenRepositorySystem.java +++ b/maven-repository/src/main/java/org/apache/maven/repository/MavenRepositorySystem.java @@ -44,18 +44,12 @@ public interface MavenRepositorySystem Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type ); - Artifact createArtifactWithClassifier( String groupId, String artifactId, String version, String type, String classifier ); - - Artifact createBuildArtifact( String groupId, String artifactId, String version, String packaging ); - Artifact createProjectArtifact( String groupId, String artifactId, String metaVersionId ); Artifact createPluginArtifact( String groupId, String artifactId, String version ); Artifact createExtensionArtifact( String groupId, String artifactId, String version ); - Artifact createParentArtifact( String groupId, String artifactId, String version ); - Artifact createDependencyArtifact( String groupId, String artifactId, String version, String type, String classifier, String scope, boolean optional ); Artifact createDependencyArtifact( String groupId, String artifactId, String version, String type, String classifier, String scope, String inheritedScope );