@Component(role=RepositorySystem.class, hint="default") public class LegacyRepositorySystem extends Object implements RepositorySystem
DEFAULT_LOCAL_REPO_ID, DEFAULT_REMOTE_REPO_ID, DEFAULT_REMOTE_REPO_URL, defaultUserLocalRepository, userHome, userMavenConfigurationHome
Constructor and Description |
---|
LegacyRepositorySystem() |
Modifier and Type | Method and Description |
---|---|
ArtifactRepository |
buildArtifactRepository(Repository repo) |
ArtifactRepositoryPolicy |
buildArtifactRepositoryPolicy(RepositoryPolicy policy) |
Artifact |
createArtifact(String groupId,
String artifactId,
String version,
String packaging) |
Artifact |
createArtifact(String groupId,
String artifactId,
String version,
String scope,
String type) |
ArtifactRepository |
createArtifactRepository(String repositoryId,
String url,
ArtifactRepositoryLayout repositoryLayout,
ArtifactRepositoryPolicy snapshots,
ArtifactRepositoryPolicy releases) |
Artifact |
createArtifactWithClassifier(String groupId,
String artifactId,
String version,
String type,
String classifier) |
ArtifactRepository |
createDefaultLocalRepository() |
ArtifactRepository |
createDefaultRemoteRepository() |
Artifact |
createDependencyArtifact(Dependency d) |
Artifact |
createExtensionArtifact(String groupId,
String artifactId,
String version) |
ArtifactRepository |
createLocalRepository(File localRepository) |
ArtifactRepository |
createLocalRepository(String url,
String repositoryId) |
Artifact |
createParentArtifact(String groupId,
String artifactId,
String version) |
Artifact |
createPluginArtifact(Plugin plugin) |
Artifact |
createProjectArtifact(String groupId,
String artifactId,
String metaVersionId) |
List<ArtifactRepository> |
getEffectiveRepositories(List<ArtifactRepository> repositories)
Calculates the effective repositories for the given input repositories which are assumed to be already mirrored
(if applicable).
|
Mirror |
getMirror(ArtifactRepository repository,
List<Mirror> mirrors)
Determines the mirror for the specified repository.
|
void |
injectAuthentication(List<ArtifactRepository> repositories,
List<Server> servers)
Injects the authentication information into the specified repositories.
|
void |
injectAuthentication(org.eclipse.aether.RepositorySystemSession session,
List<ArtifactRepository> repositories) |
void |
injectMirror(List<ArtifactRepository> repositories,
List<Mirror> mirrors)
Injects the mirroring information into the specified repositories.
|
void |
injectMirror(org.eclipse.aether.RepositorySystemSession session,
List<ArtifactRepository> repositories) |
void |
injectProxy(List<ArtifactRepository> repositories,
List<Proxy> proxies)
Injects the proxy information into the specified repositories.
|
void |
injectProxy(org.eclipse.aether.RepositorySystemSession session,
List<ArtifactRepository> repositories) |
void |
publish(ArtifactRepository repository,
File source,
String remotePath,
ArtifactTransferListener transferListener) |
ArtifactResolutionResult |
resolve(ArtifactResolutionRequest request) |
void |
retrieve(ArtifactRepository repository,
File destination,
String remotePath,
ArtifactTransferListener transferListener) |
public Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type)
createArtifact
in interface RepositorySystem
public Artifact createArtifact(String groupId, String artifactId, String version, String packaging)
createArtifact
in interface RepositorySystem
public Artifact createArtifactWithClassifier(String groupId, String artifactId, String version, String type, String classifier)
createArtifactWithClassifier
in interface RepositorySystem
public Artifact createProjectArtifact(String groupId, String artifactId, String metaVersionId)
createProjectArtifact
in interface RepositorySystem
public Artifact createDependencyArtifact(Dependency d)
createDependencyArtifact
in interface RepositorySystem
public Artifact createExtensionArtifact(String groupId, String artifactId, String version)
public Artifact createParentArtifact(String groupId, String artifactId, String version)
public Artifact createPluginArtifact(Plugin plugin)
createPluginArtifact
in interface RepositorySystem
public ArtifactRepositoryPolicy buildArtifactRepositoryPolicy(RepositoryPolicy policy)
public ArtifactRepository createDefaultLocalRepository() throws InvalidRepositoryException
createDefaultLocalRepository
in interface RepositorySystem
InvalidRepositoryException
public ArtifactRepository createLocalRepository(File localRepository) throws InvalidRepositoryException
createLocalRepository
in interface RepositorySystem
InvalidRepositoryException
public ArtifactRepository createDefaultRemoteRepository() throws InvalidRepositoryException
createDefaultRemoteRepository
in interface RepositorySystem
InvalidRepositoryException
public ArtifactRepository createLocalRepository(String url, String repositoryId) throws IOException
IOException
public ArtifactResolutionResult resolve(ArtifactResolutionRequest request)
resolve
in interface RepositorySystem
public List<ArtifactRepository> getEffectiveRepositories(List<ArtifactRepository> repositories)
RepositorySystem
getEffectiveRepositories
in interface RepositorySystem
repositories
- The original repositories, may be null
.null
if the input was null
.public Mirror getMirror(ArtifactRepository repository, List<Mirror> mirrors)
RepositorySystem
getMirror
in interface RepositorySystem
repository
- The repository to determine the mirror for, must not be null
.mirrors
- The available mirrors, may be null
.null
if no mirror matched.public void injectMirror(List<ArtifactRepository> repositories, List<Mirror> mirrors)
RepositorySystem
RepositorySystem.injectAuthentication(List, List)
or the repositories will end up with the wrong credentials.injectMirror
in interface RepositorySystem
repositories
- The repositories into which to inject the mirror information, may be null
.mirrors
- The available mirrors, may be null
.public void injectMirror(org.eclipse.aether.RepositorySystemSession session, List<ArtifactRepository> repositories)
injectMirror
in interface RepositorySystem
public void injectAuthentication(List<ArtifactRepository> repositories, List<Server> servers)
RepositorySystem
RepositorySystem.injectMirror(List, List)
or the repositories will end up with the wrong credentials.injectAuthentication
in interface RepositorySystem
repositories
- The repositories into which to inject the authentication information, may be null
.servers
- The available servers, may be null
.public void injectAuthentication(org.eclipse.aether.RepositorySystemSession session, List<ArtifactRepository> repositories)
injectAuthentication
in interface RepositorySystem
public void injectProxy(List<ArtifactRepository> repositories, List<Proxy> proxies)
RepositorySystem
RepositorySystem.injectMirror(List, List)
or the repositories will end up
with the wrong proxies.injectProxy
in interface RepositorySystem
repositories
- The repositories into which to inject the proxy information, may be null
.proxies
- The available proxies, may be null
.public void injectProxy(org.eclipse.aether.RepositorySystemSession session, List<ArtifactRepository> repositories)
injectProxy
in interface RepositorySystem
public void retrieve(ArtifactRepository repository, File destination, String remotePath, ArtifactTransferListener transferListener) throws ArtifactTransferFailedException, ArtifactDoesNotExistException
retrieve
in interface RepositorySystem
ArtifactTransferFailedException
ArtifactDoesNotExistException
public void publish(ArtifactRepository repository, File source, String remotePath, ArtifactTransferListener transferListener) throws ArtifactTransferFailedException
publish
in interface RepositorySystem
ArtifactTransferFailedException
public ArtifactRepository buildArtifactRepository(Repository repo) throws InvalidRepositoryException
buildArtifactRepository
in interface RepositorySystem
InvalidRepositoryException
public ArtifactRepository createArtifactRepository(String repositoryId, String url, ArtifactRepositoryLayout repositoryLayout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases)
createArtifactRepository
in interface RepositorySystem
Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.