@Component(role=RepositorySystem.class, hint="default") public class LegacyRepositorySystem extends java.lang.Object implements RepositorySystem
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
LegacyRepositorySystem.UnknownRepositoryLayout
In the future, the legacy system might encounter repository types for which no layout components exists because
the actual communication with the repository happens via a repository connector.
|
| Modifier and Type | Field and Description |
|---|---|
private ArtifactFactory |
artifactFactory |
private ArtifactRepositoryFactory |
artifactRepositoryFactory |
private ArtifactResolver |
artifactResolver |
private java.util.Map<java.lang.String,ArtifactRepositoryLayout> |
layouts |
private org.codehaus.plexus.logging.Logger |
logger |
private MirrorSelector |
mirrorSelector |
private org.codehaus.plexus.PlexusContainer |
plexus |
private SettingsDecrypter |
settingsDecrypter |
private WagonManager |
wagonManager |
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) |
private java.lang.String |
canonicalFileUrl(java.lang.String url) |
Artifact |
createArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String packaging) |
Artifact |
createArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String scope,
java.lang.String type) |
ArtifactRepository |
createArtifactRepository(java.lang.String repositoryId,
java.lang.String url,
ArtifactRepositoryLayout repositoryLayout,
ArtifactRepositoryPolicy snapshots,
ArtifactRepositoryPolicy releases) |
Artifact |
createArtifactWithClassifier(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
java.lang.String classifier) |
ArtifactRepository |
createDefaultLocalRepository() |
ArtifactRepository |
createDefaultRemoteRepository() |
Artifact |
createDependencyArtifact(Dependency d) |
Artifact |
createExtensionArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version) |
ArtifactRepository |
createLocalRepository(java.io.File localRepository) |
ArtifactRepository |
createLocalRepository(java.lang.String url,
java.lang.String repositoryId) |
Artifact |
createParentArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version) |
Artifact |
createPluginArtifact(Plugin plugin) |
Artifact |
createProjectArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String metaVersionId) |
private ArtifactRepository |
createRepository(java.lang.String url,
java.lang.String repositoryId,
boolean releases,
java.lang.String releaseUpdates,
boolean snapshots,
java.lang.String snapshotUpdates,
java.lang.String checksumPolicy) |
private Authentication |
getAuthentication(org.eclipse.aether.RepositorySystemSession session,
ArtifactRepository repository) |
private ArtifactRepositoryPolicy |
getEffectivePolicy(java.util.Collection<ArtifactRepositoryPolicy> policies) |
java.util.List<ArtifactRepository> |
getEffectiveRepositories(java.util.List<ArtifactRepository> repositories)
Calculates the effective repositories for the given input repositories which are assumed to be already mirrored
(if applicable).
|
private ArtifactRepositoryLayout |
getLayout(java.lang.String id) |
private static java.lang.String |
getMessage(java.lang.Throwable error,
java.lang.String def) |
Mirror |
getMirror(ArtifactRepository repository,
java.util.List<Mirror> mirrors)
Determines the mirror for the specified repository.
|
private Mirror |
getMirror(org.eclipse.aether.RepositorySystemSession session,
ArtifactRepository repository) |
private Proxy |
getProxy(ArtifactRepository repository,
java.util.List<Proxy> proxies) |
private Proxy |
getProxy(org.eclipse.aether.RepositorySystemSession session,
ArtifactRepository repository) |
void |
injectAuthentication(java.util.List<ArtifactRepository> repositories,
java.util.List<Server> servers)
Injects the authentication information into the specified repositories.
|
void |
injectAuthentication(org.eclipse.aether.RepositorySystemSession session,
java.util.List<ArtifactRepository> repositories) |
private void |
injectMirror(ArtifactRepository repository,
Mirror mirror) |
void |
injectMirror(java.util.List<ArtifactRepository> repositories,
java.util.List<Mirror> mirrors)
Injects the mirroring information into the specified repositories.
|
void |
injectMirror(org.eclipse.aether.RepositorySystemSession session,
java.util.List<ArtifactRepository> repositories) |
void |
injectProxy(java.util.List<ArtifactRepository> repositories,
java.util.List<Proxy> proxies)
Injects the proxy information into the specified repositories.
|
void |
injectProxy(org.eclipse.aether.RepositorySystemSession session,
java.util.List<ArtifactRepository> repositories) |
void |
publish(ArtifactRepository repository,
java.io.File source,
java.lang.String remotePath,
ArtifactTransferListener transferListener) |
ArtifactResolutionResult |
resolve(ArtifactResolutionRequest request) |
void |
retrieve(ArtifactRepository repository,
java.io.File destination,
java.lang.String remotePath,
ArtifactTransferListener transferListener) |
@Requirement private org.codehaus.plexus.logging.Logger logger
@Requirement private ArtifactFactory artifactFactory
@Requirement private ArtifactResolver artifactResolver
@Requirement private ArtifactRepositoryFactory artifactRepositoryFactory
@Requirement(role=ArtifactRepositoryLayout.class) private java.util.Map<java.lang.String,ArtifactRepositoryLayout> layouts
@Requirement private WagonManager wagonManager
@Requirement private org.codehaus.plexus.PlexusContainer plexus
@Requirement private MirrorSelector mirrorSelector
@Requirement private SettingsDecrypter settingsDecrypter
public Artifact createArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String scope, java.lang.String type)
createArtifact in interface RepositorySystempublic Artifact createArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String packaging)
createArtifact in interface RepositorySystempublic Artifact createArtifactWithClassifier(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.lang.String classifier)
createArtifactWithClassifier in interface RepositorySystempublic Artifact createProjectArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String metaVersionId)
createProjectArtifact in interface RepositorySystempublic Artifact createDependencyArtifact(Dependency d)
createDependencyArtifact in interface RepositorySystempublic Artifact createExtensionArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
public Artifact createParentArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
public Artifact createPluginArtifact(Plugin plugin)
createPluginArtifact in interface RepositorySystempublic ArtifactRepositoryPolicy buildArtifactRepositoryPolicy(RepositoryPolicy policy)
public ArtifactRepository createDefaultLocalRepository() throws InvalidRepositoryException
createDefaultLocalRepository in interface RepositorySystemInvalidRepositoryExceptionpublic ArtifactRepository createLocalRepository(java.io.File localRepository) throws InvalidRepositoryException
createLocalRepository in interface RepositorySystemInvalidRepositoryExceptionpublic ArtifactRepository createDefaultRemoteRepository() throws InvalidRepositoryException
createDefaultRemoteRepository in interface RepositorySystemInvalidRepositoryExceptionpublic ArtifactRepository createLocalRepository(java.lang.String url, java.lang.String repositoryId) throws java.io.IOException
java.io.IOExceptionprivate java.lang.String canonicalFileUrl(java.lang.String url)
throws java.io.IOException
java.io.IOExceptionpublic ArtifactResolutionResult resolve(ArtifactResolutionRequest request)
resolve in interface RepositorySystempublic java.util.List<ArtifactRepository> getEffectiveRepositories(java.util.List<ArtifactRepository> repositories)
RepositorySystemgetEffectiveRepositories in interface RepositorySystemrepositories - The original repositories, may be null.null if the input was null.private ArtifactRepositoryPolicy getEffectivePolicy(java.util.Collection<ArtifactRepositoryPolicy> policies)
public Mirror getMirror(ArtifactRepository repository, java.util.List<Mirror> mirrors)
RepositorySystemgetMirror in interface RepositorySystemrepository - 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(java.util.List<ArtifactRepository> repositories, java.util.List<Mirror> mirrors)
RepositorySystemRepositorySystem.injectAuthentication(List, List) or the repositories will end up with the wrong credentials.injectMirror in interface RepositorySystemrepositories - The repositories into which to inject the mirror information, may be null.mirrors - The available mirrors, may be null.private Mirror getMirror(org.eclipse.aether.RepositorySystemSession session, ArtifactRepository repository)
public void injectMirror(org.eclipse.aether.RepositorySystemSession session,
java.util.List<ArtifactRepository> repositories)
injectMirror in interface RepositorySystemprivate void injectMirror(ArtifactRepository repository, Mirror mirror)
public void injectAuthentication(java.util.List<ArtifactRepository> repositories, java.util.List<Server> servers)
RepositorySystemRepositorySystem.injectMirror(List, List) or the repositories will end up with the wrong credentials.injectAuthentication in interface RepositorySystemrepositories - The repositories into which to inject the authentication information, may be null.servers - The available servers, may be null.private Authentication getAuthentication(org.eclipse.aether.RepositorySystemSession session, ArtifactRepository repository)
public void injectAuthentication(org.eclipse.aether.RepositorySystemSession session,
java.util.List<ArtifactRepository> repositories)
injectAuthentication in interface RepositorySystemprivate Proxy getProxy(ArtifactRepository repository, java.util.List<Proxy> proxies)
public void injectProxy(java.util.List<ArtifactRepository> repositories, java.util.List<Proxy> proxies)
RepositorySystemRepositorySystem.injectMirror(List, List) or the repositories will end up
with the wrong proxies.injectProxy in interface RepositorySystemrepositories - The repositories into which to inject the proxy information, may be null.proxies - The available proxies, may be null.private Proxy getProxy(org.eclipse.aether.RepositorySystemSession session, ArtifactRepository repository)
public void injectProxy(org.eclipse.aether.RepositorySystemSession session,
java.util.List<ArtifactRepository> repositories)
injectProxy in interface RepositorySystempublic void retrieve(ArtifactRepository repository, java.io.File destination, java.lang.String remotePath, ArtifactTransferListener transferListener) throws ArtifactTransferFailedException, ArtifactDoesNotExistException
retrieve in interface RepositorySystemArtifactTransferFailedExceptionArtifactDoesNotExistExceptionpublic void publish(ArtifactRepository repository, java.io.File source, java.lang.String remotePath, ArtifactTransferListener transferListener) throws ArtifactTransferFailedException
publish in interface RepositorySystemArtifactTransferFailedExceptionpublic ArtifactRepository buildArtifactRepository(Repository repo) throws InvalidRepositoryException
buildArtifactRepository in interface RepositorySystemInvalidRepositoryExceptionprivate ArtifactRepository createRepository(java.lang.String url, java.lang.String repositoryId, boolean releases, java.lang.String releaseUpdates, boolean snapshots, java.lang.String snapshotUpdates, java.lang.String checksumPolicy)
public ArtifactRepository createArtifactRepository(java.lang.String repositoryId, java.lang.String url, ArtifactRepositoryLayout repositoryLayout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases)
createArtifactRepository in interface RepositorySystemprivate static java.lang.String getMessage(java.lang.Throwable error,
java.lang.String def)
private ArtifactRepositoryLayout getLayout(java.lang.String id)