mirror of https://github.com/apache/maven.git
o use RepositorySystem and LegacyRepositorySystem
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@746432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a85440fe92
commit
b4257bad3b
|
@ -34,7 +34,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.ArtifactFilterManager;
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
||||
|
@ -137,7 +137,7 @@ public class DefaultPluginManager
|
|||
protected PluginVersionManager pluginVersionManager;
|
||||
|
||||
@Requirement
|
||||
protected MavenTools repositoryTools;
|
||||
protected RepositorySystem repositoryTools;
|
||||
|
||||
@Requirement
|
||||
protected RuntimeInformation runtimeInformation;
|
||||
|
@ -1471,7 +1471,7 @@ public class DefaultPluginManager
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
protected void resolveTransitiveDependencies( MavenSession context,
|
||||
MavenTools repositoryTools,
|
||||
RepositorySystem repositoryTools,
|
||||
String scope,
|
||||
MavenProject project,
|
||||
boolean isAggregator )
|
||||
|
@ -1582,7 +1582,7 @@ public class DefaultPluginManager
|
|||
|
||||
private void downloadDependencies( MavenProject project,
|
||||
MavenSession context,
|
||||
MavenTools repositoryTools )
|
||||
RepositorySystem repositoryTools )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
ArtifactRepository localRepository = context.getLocalRepository();
|
||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.maven.plugin.version;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.ArtifactUtils;
|
||||
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
||||
|
@ -51,7 +51,7 @@ public class DefaultPluginVersionManager
|
|||
implements PluginVersionManager
|
||||
{
|
||||
@Requirement
|
||||
private MavenTools repositoryTools;
|
||||
private RepositorySystem repositoryTools;
|
||||
|
||||
@Requirement
|
||||
private MavenProjectBuilder mavenProjectBuilder;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
import org.apache.maven.Maven;
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
||||
|
@ -137,7 +137,7 @@ public class MavenEmbedder
|
|||
|
||||
private MavenXpp3Writer modelWriter;
|
||||
|
||||
private MavenTools repositoryTools;
|
||||
private RepositorySystem repositoryTools;
|
||||
|
||||
private Maven maven;
|
||||
|
||||
|
@ -659,7 +659,7 @@ public class MavenEmbedder
|
|||
|
||||
pluginRepository = container.lookup( PluginRepository.class );
|
||||
|
||||
repositoryTools = container.lookup( MavenTools.class );
|
||||
repositoryTools = 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.
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.Maven;
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.InvalidRepositoryException;
|
||||
import org.apache.maven.artifact.manager.WagonManager;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
|
@ -87,7 +87,7 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
private MavenSettingsBuilder settingsBuilder;
|
||||
|
||||
@Requirement
|
||||
private MavenTools mavenTools;
|
||||
private RepositorySystem mavenTools;
|
||||
|
||||
// 2009-02-12 Oleg: this component is defined in maven-core components.xml
|
||||
// because it already has another declared (not generated) component
|
||||
|
|
|
@ -72,9 +72,9 @@ import org.codehaus.plexus.util.StringUtils;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
@Component(role = MavenTools.class)
|
||||
public class DefaultMavenTools
|
||||
implements MavenTools, LogEnabled
|
||||
@Component(role = RepositorySystem.class)
|
||||
public class LegacyRepositorySystem
|
||||
implements RepositorySystem, LogEnabled
|
||||
{
|
||||
@Requirement
|
||||
private ArtifactFactory artifactFactory;
|
|
@ -51,7 +51,7 @@ import org.codehaus.plexus.component.annotations.Requirement;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public interface MavenTools
|
||||
public interface RepositorySystem
|
||||
{
|
||||
List<ArtifactRepository> buildArtifactRepositories( List<Repository> repositories )
|
||||
throws InvalidRepositoryException;
|
|
@ -19,7 +19,7 @@ package org.apache.maven.profiles.build;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.ArtifactUtils;
|
||||
import org.apache.maven.artifact.InvalidRepositoryException;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
|
@ -60,7 +60,7 @@ public class DefaultProfileAdvisor
|
|||
public static final String ROLE_HINT = "default";
|
||||
|
||||
@Requirement
|
||||
private MavenTools mavenTools;
|
||||
private RepositorySystem mavenTools;
|
||||
|
||||
@Requirement
|
||||
private MavenProfilesBuilder profilesBuilder;
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.ArtifactUtils;
|
||||
import org.apache.maven.artifact.InvalidRepositoryException;
|
||||
|
@ -74,7 +74,7 @@ public class DefaultMavenProjectBuilder
|
|||
private ProfileAdvisor profileAdvisor;
|
||||
|
||||
@Requirement
|
||||
private MavenTools mavenTools;
|
||||
private RepositorySystem mavenTools;
|
||||
|
||||
@Requirement
|
||||
private ProjectBuilder projectBuilder;
|
||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.maven.project;
|
|||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.mercury.PomProcessor;
|
||||
import org.apache.maven.mercury.PomProcessorException;
|
||||
import org.apache.maven.mercury.MavenDomainModel;
|
||||
|
@ -61,7 +61,7 @@ public class DefaultProjectBuilder
|
|||
private ArtifactFactory artifactFactory;
|
||||
|
||||
@Requirement
|
||||
private MavenTools mavenTools;
|
||||
private RepositorySystem mavenTools;
|
||||
|
||||
@Requirement
|
||||
List<ModelEventListener> listeners;
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.Properties;
|
|||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.ArtifactUtils;
|
||||
import org.apache.maven.artifact.DependencyResolutionRequiredException;
|
||||
|
@ -213,7 +213,7 @@ public class MavenProject
|
|||
* @param projectBuilderConfiguration
|
||||
* @throws InvalidRepositoryException
|
||||
*/
|
||||
public MavenProject( Model model, ArtifactFactory artifactFactory, MavenTools mavenTools, MavenProjectBuilder mavenProjectBuilder, ProjectBuilderConfiguration projectBuilderConfiguration )
|
||||
public MavenProject( Model model, ArtifactFactory artifactFactory, RepositorySystem mavenTools, MavenProjectBuilder mavenProjectBuilder, ProjectBuilderConfiguration projectBuilderConfiguration )
|
||||
throws InvalidRepositoryException
|
||||
{
|
||||
if(model == null)
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.io.IOException;
|
|||
import java.io.FileInputStream;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.maven.MavenTools;
|
||||
import org.apache.maven.RepositorySystem;
|
||||
import org.apache.maven.profiles.DefaultProfileManager;
|
||||
import org.apache.maven.profiles.activation.DefaultProfileActivationContext;
|
||||
import org.apache.maven.profiles.activation.ProfileActivationContext;
|
||||
|
@ -52,7 +52,7 @@ public class PomConstructionTest
|
|||
|
||||
private MavenProjectBuilder mavenProjectBuilder;
|
||||
|
||||
private MavenTools mavenTools;
|
||||
private RepositorySystem mavenTools;
|
||||
|
||||
private PomArtifactResolver pomArtifactResolver;
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class PomConstructionTest
|
|||
testMixinDirectory = new File( getBasedir(), BASE_MIXIN_DIR );
|
||||
mavenProjectBuilder = lookup( MavenProjectBuilder.class );
|
||||
projectBuilder = lookup( ProjectBuilder.class );
|
||||
mavenTools = lookup( MavenTools.class );
|
||||
mavenTools = lookup( RepositorySystem.class );
|
||||
pomArtifactResolver = new PomArtifactResolver()
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue