o reducing the signature size of the repository system some more

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@751104 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-03-06 22:14:08 +00:00
parent ff1c73a37d
commit 410e6cab4b
5 changed files with 4 additions and 21 deletions

View File

@ -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.

View File

@ -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 );

View File

@ -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;
}

View File

@ -97,14 +97,4 @@ public class MercuryRepositorySystem
return result;
}
@Override
public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories )
throws ArtifactMetadataRetrievalException
{
// TODO Auto-generated method stub
return super.retrieve( artifact, localRepository, remoteRepositories );
}
}

View File

@ -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 );