mirror of https://github.com/apache/maven.git
o shortening the interface name for the repository system
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@751196 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd7c521580
commit
b68c9f9231
|
@ -79,7 +79,7 @@ import org.apache.maven.realm.MavenRealmManager;
|
|||
import org.apache.maven.realm.RealmManagementException;
|
||||
import org.apache.maven.realm.RealmScanningUtils;
|
||||
import org.apache.maven.reporting.MavenReport;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.repository.VersionNotFoundException;
|
||||
import org.apache.maven.shared.model.InterpolatorProperty;
|
||||
import org.apache.maven.shared.model.ModelMarshaller;
|
||||
|
@ -139,7 +139,7 @@ public class DefaultPluginManager
|
|||
protected MavenPluginCollector pluginCollector;
|
||||
|
||||
@Requirement
|
||||
protected MavenRepositorySystem repositorySystem;
|
||||
protected RepositorySystem repositorySystem;
|
||||
|
||||
@Requirement
|
||||
private ResolutionErrorHandler resolutionErrorHandler;
|
||||
|
@ -1327,7 +1327,7 @@ public class DefaultPluginManager
|
|||
// Artifact resolution
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
protected void resolveTransitiveDependencies( MavenSession context, MavenRepositorySystem repositorySystem, String scope, MavenProject project, boolean isAggregator )
|
||||
protected void resolveTransitiveDependencies( MavenSession context, RepositorySystem repositorySystem, String scope, MavenProject project, boolean isAggregator )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException, InvalidDependencyVersionException
|
||||
{
|
||||
// TODO: such a call in MavenMetadataSource too - packaging not really the intention of type
|
||||
|
@ -1430,7 +1430,7 @@ public class DefaultPluginManager
|
|||
// Artifact downloading
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
private void downloadDependencies( MavenProject project, MavenSession context, MavenRepositorySystem repositorySystem )
|
||||
private void downloadDependencies( MavenProject project, MavenSession context, RepositorySystem repositorySystem )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
ArtifactRepository localRepository = context.getLocalRepository();
|
||||
|
|
|
@ -64,7 +64,7 @@ import org.apache.maven.project.MavenProjectBuildingResult;
|
|||
import org.apache.maven.project.ProjectBuildingException;
|
||||
import org.apache.maven.reactor.MavenExecutionException;
|
||||
import org.apache.maven.reactor.MissingModuleException;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.settings.Settings;
|
||||
import org.apache.maven.settings.SettingsConfigurationException;
|
||||
import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
|
||||
|
@ -127,7 +127,7 @@ public class MavenEmbedder
|
|||
|
||||
private MavenProjectBuilder mavenProjectBuilder;
|
||||
|
||||
private MavenRepositorySystem repositorySystem;
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
private MavenXpp3Reader modelReader;
|
||||
|
||||
|
@ -540,7 +540,7 @@ public class MavenEmbedder
|
|||
|
||||
populator = container.lookup( MavenExecutionRequestPopulator.class );
|
||||
|
||||
repositorySystem = container.lookup( MavenRepositorySystem.class );
|
||||
repositorySystem = container.lookup( RepositorySystem.class );
|
||||
|
||||
// This is temporary as we can probably cache a single request and use it for default values and
|
||||
// simply cascade values in from requests used for individual executions.
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.apache.maven.profiles.DefaultProfileManager;
|
|||
import org.apache.maven.profiles.ProfileActivationContext;
|
||||
import org.apache.maven.profiles.ProfileManager;
|
||||
import org.apache.maven.realm.DefaultMavenRealmManager;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.settings.MavenSettingsBuilder;
|
||||
import org.apache.maven.settings.Mirror;
|
||||
import org.apache.maven.settings.Proxy;
|
||||
|
@ -75,7 +75,7 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
private MavenSettingsBuilder settingsBuilder;
|
||||
|
||||
@Requirement
|
||||
private MavenRepositorySystem repositorySystem;
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
// 2009-03-05 Oleg: this component is defined sub-classed in this package
|
||||
@Requirement(hint = "maven")
|
||||
|
|
|
@ -61,7 +61,7 @@ import org.apache.maven.project.builder.ProjectUri;
|
|||
import org.apache.maven.project.builder.profile.ProfileContext;
|
||||
import org.apache.maven.project.validation.ModelValidationResult;
|
||||
import org.apache.maven.project.validation.ModelValidator;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.repository.VersionNotFoundException;
|
||||
import org.apache.maven.shared.model.DomainModel;
|
||||
import org.apache.maven.shared.model.InterpolatorProperty;
|
||||
|
@ -97,7 +97,7 @@ public class DefaultMavenProjectBuilder
|
|||
private ModelValidator validator;
|
||||
|
||||
@Requirement
|
||||
private MavenRepositorySystem repositorySystem;
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
@Requirement
|
||||
private PlexusContainer container;
|
||||
|
|
|
@ -69,7 +69,7 @@ import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
|||
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
|
||||
import org.apache.maven.project.artifact.ActiveProjectArtifact;
|
||||
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.repository.MavenRepositoryWrapper;
|
||||
import org.apache.maven.repository.VersionNotFoundException;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
|
@ -165,7 +165,7 @@ public class MavenProject
|
|||
|
||||
private ProjectBuilderConfiguration projectBuilderConfiguration;
|
||||
|
||||
private MavenRepositorySystem repositorySystem;
|
||||
private RepositorySystem repositorySystem;
|
||||
//
|
||||
|
||||
private File parentFile;
|
||||
|
@ -210,7 +210,7 @@ public class MavenProject
|
|||
* @param projectBuilderConfiguration
|
||||
* @throws InvalidRepositoryException
|
||||
*/
|
||||
public MavenProject( Model model, MavenRepositorySystem repositorySystem, MavenProjectBuilder mavenProjectBuilder, ProjectBuilderConfiguration projectBuilderConfiguration )
|
||||
public MavenProject( Model model, RepositorySystem repositorySystem, MavenProjectBuilder mavenProjectBuilder, ProjectBuilderConfiguration projectBuilderConfiguration )
|
||||
throws InvalidRepositoryException
|
||||
{
|
||||
if ( model == null )
|
||||
|
|
|
@ -48,7 +48,7 @@ import org.apache.maven.project.MavenProject;
|
|||
import org.apache.maven.project.MavenProjectBuilder;
|
||||
import org.apache.maven.project.ProjectBuildingException;
|
||||
import org.apache.maven.project.validation.ModelValidationResult;
|
||||
import org.apache.maven.repository.LegacyMavenRepositorySystem;
|
||||
import org.apache.maven.repository.LegacyRepositorySystem;
|
||||
import org.apache.maven.repository.VersionNotFoundException;
|
||||
import org.codehaus.plexus.PlexusContainer;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
|
@ -459,7 +459,7 @@ public class MavenMetadataSource
|
|||
{
|
||||
try
|
||||
{
|
||||
return LegacyMavenRepositorySystem.createArtifacts( artifactFactory, dependencies, inheritedScope,
|
||||
return LegacyRepositorySystem.createArtifacts( artifactFactory, dependencies, inheritedScope,
|
||||
dependencyFilter, project );
|
||||
}
|
||||
catch ( VersionNotFoundException e )
|
||||
|
|
|
@ -20,24 +20,25 @@ package org.apache.maven.project;
|
|||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.profiles.DefaultProfileManager;
|
||||
import org.apache.maven.profiles.ProfileActivationContext;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
import org.apache.maven.profiles.DefaultProfileManager;
|
||||
import org.apache.maven.profiles.ProfileActivationContext;
|
||||
import org.apache.maven.project.harness.PomTestWrapper;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
public class PomConstructionTest
|
||||
extends PlexusTestCase
|
||||
{
|
||||
|
||||
private static String BASE_DIR = "src/test";
|
||||
|
||||
private static String BASE_POM_DIR = BASE_DIR + "/resources-project-builder";
|
||||
|
@ -46,6 +47,8 @@ public class PomConstructionTest
|
|||
|
||||
private DefaultMavenProjectBuilder mavenProjectBuilder;
|
||||
|
||||
private RepositorySystem mavenTools;
|
||||
|
||||
private File testDirectory;
|
||||
|
||||
private File testMixinDirectory;
|
||||
|
@ -56,6 +59,7 @@ public class PomConstructionTest
|
|||
testDirectory = new File( getBasedir(), BASE_POM_DIR );
|
||||
testMixinDirectory = new File( getBasedir(), BASE_MIXIN_DIR );
|
||||
mavenProjectBuilder = (DefaultMavenProjectBuilder) lookup( MavenProjectBuilder.class );
|
||||
mavenTools = lookup( RepositorySystem.class );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,16 +13,16 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
|
|||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
|
||||
import org.apache.maven.repository.LegacyMavenRepositorySystem;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.LegacyRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.repository.VersionNotFoundException;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
@Component(role = MavenRepositorySystem.class, hint = "test")
|
||||
@Component(role = RepositorySystem.class, hint = "test")
|
||||
public class TestMavenRepositorySystem
|
||||
extends LegacyMavenRepositorySystem
|
||||
extends LegacyRepositorySystem
|
||||
{
|
||||
public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories )
|
||||
throws ArtifactMetadataRetrievalException
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.apache.maven.model.DependencyManagement;
|
|||
import org.apache.maven.model.Exclusion;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -41,13 +41,13 @@ import java.util.Set;
|
|||
public class MavenMetadataSourceTest
|
||||
extends PlexusTestCase
|
||||
{
|
||||
private MavenRepositorySystem repositorySystem;
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
protected void setUp()
|
||||
throws Exception
|
||||
{
|
||||
super.setUp();
|
||||
repositorySystem = lookup( MavenRepositorySystem.class );
|
||||
repositorySystem = lookup( RepositorySystem.class );
|
||||
}
|
||||
|
||||
public void testShouldNotCarryExclusionsOverFromDependencyToDependency()
|
||||
|
|
|
@ -37,7 +37,7 @@ extends AbstractMavenRepositorySystemTest
|
|||
{
|
||||
super.setUp();
|
||||
|
||||
_mrs = getContainer().lookup( MavenRepositorySystem.class, "default" );
|
||||
_mrs = getContainer().lookup( RepositorySystem.class, "default" );
|
||||
}
|
||||
|
||||
// TODO: 2009-03-Oleg : turned it off till we figure out which methods work, which don't
|
||||
|
|
|
@ -31,8 +31,8 @@ import org.apache.maven.mercury.plexus.PlexusMercury;
|
|||
import org.apache.maven.mercury.repository.api.Repository;
|
||||
import org.apache.maven.mercury.repository.api.RepositoryException;
|
||||
import org.apache.maven.mercury.util.Util;
|
||||
import org.apache.maven.repository.LegacyMavenRepositorySystem;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.apache.maven.repository.LegacyRepositorySystem;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
import org.codehaus.plexus.component.annotations.Requirement;
|
||||
import org.codehaus.plexus.lang.DefaultLanguage;
|
||||
|
@ -42,10 +42,10 @@ import org.codehaus.plexus.lang.Language;
|
|||
* @author Oleg Gusakov
|
||||
* @version $Id$
|
||||
*/
|
||||
@Component( role = MavenRepositorySystem.class, hint = "mercury" )
|
||||
@Component( role = RepositorySystem.class, hint = "mercury" )
|
||||
public class MercuryRepositorySystem
|
||||
extends LegacyMavenRepositorySystem
|
||||
implements MavenRepositorySystem
|
||||
extends LegacyRepositorySystem
|
||||
implements RepositorySystem
|
||||
{
|
||||
private static final Language LANG = new DefaultLanguage( MercuryRepositorySystem.class );
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
|
|||
import org.apache.maven.model.DeploymentRepository;
|
||||
import org.apache.maven.model.Repository;
|
||||
import org.apache.maven.model.RepositoryPolicy;
|
||||
import org.apache.maven.repository.MavenRepositorySystem;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.codehaus.plexus.PlexusContainer;
|
||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
|
||||
|
@ -38,7 +38,7 @@ import java.util.List;
|
|||
|
||||
public final class ProjectUtils
|
||||
{
|
||||
static MavenRepositorySystem rs;
|
||||
static RepositorySystem rs;
|
||||
|
||||
private ProjectUtils()
|
||||
{
|
||||
|
@ -72,11 +72,11 @@ public final class ProjectUtils
|
|||
return rs( c ).buildArtifactRepository( repo );
|
||||
}
|
||||
|
||||
private static MavenRepositorySystem rs( PlexusContainer c )
|
||||
private static RepositorySystem rs( PlexusContainer c )
|
||||
{
|
||||
try
|
||||
{
|
||||
rs = c.lookup( MavenRepositorySystem.class );
|
||||
rs = c.lookup( RepositorySystem.class );
|
||||
}
|
||||
catch ( ComponentLookupException e )
|
||||
{
|
||||
|
|
|
@ -59,9 +59,9 @@ import org.codehaus.plexus.util.StringUtils;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
@Component(role = MavenRepositorySystem.class)
|
||||
public class LegacyMavenRepositorySystem
|
||||
implements MavenRepositorySystem
|
||||
@Component(role = RepositorySystem.class)
|
||||
public class LegacyRepositorySystem
|
||||
implements RepositorySystem
|
||||
{
|
||||
|
||||
@Requirement
|
|
@ -39,7 +39,7 @@ import org.apache.maven.wagon.events.TransferListener;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public interface MavenRepositorySystem
|
||||
public interface RepositorySystem
|
||||
{
|
||||
Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type );
|
||||
|
||||
|
@ -83,7 +83,6 @@ public interface MavenRepositorySystem
|
|||
|
||||
// Mirrors
|
||||
|
||||
void addMirror( String id, String mirrorOf, String url );
|
||||
|
||||
void addMirror( String id, String mirrorOf, String url );
|
||||
List<ArtifactRepository> getMirrors( List<ArtifactRepository> repositories );
|
||||
}
|
|
@ -64,7 +64,7 @@ public abstract class AbstractMavenRepositorySystemTest
|
|||
|
||||
ArtifactFactory _artifactFactory;
|
||||
|
||||
protected MavenRepositorySystem _mrs;
|
||||
protected RepositorySystem _mrs;
|
||||
|
||||
protected Startable _server;
|
||||
|
||||
|
|
Loading…
Reference in New Issue