Package org.apache.maven.internal.impl
Class AbstractSession
java.lang.Object
org.apache.maven.internal.impl.AbstractSession
- All Implemented Interfaces:
Session
,InternalSession
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Lookup
protected final List
<RemoteRepository> protected final org.eclipse.aether.RepositorySystem
protected final org.eclipse.aether.RepositorySystemSession
-
Constructor Summary
ConstructorDescriptionAbstractSession
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RepositorySystem repositorySystem, List<RemoteRepository> repositories, List<org.eclipse.aether.repository.RemoteRepository> resolverRepositories, Lookup lookup) -
Method Summary
Modifier and TypeMethodDescriptioncollectDependencies
(Artifact artifact) Shortcut forgetService(DependencyCollector.class).collect(...)
collectDependencies
(DependencyCoordinate dependency) Shortcut forgetService(DependencyCollector.class).collect(...)
collectDependencies
(Project project) Shortcut forgetService(DependencyCollector.class).collect(...)
createArtifact
(String groupId, String artifactId, String version, String extension) Shortcut forgetService(ArtifactFactory.class).create(...)
createArtifact
(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(ArtifactFactory.class).create(...)
createArtifactCoordinate
(String coordString) Shortcut forgetService(CoordinateFactory.class).create(...)
createArtifactCoordinate
(String groupId, String artifactId, String version, String extension) Shortcut forgetService(CoordinateFactory.class).create(...)
createArtifactCoordinate
(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(CoordinateFactory.class).create(...)
createArtifactCoordinate
(Artifact artifact) Shortcut forgetService(CoordinateFactory.class).create(...)
createDependencyCoordinate
(ArtifactCoordinate coordinate) Shortcut forgetService(DependencyFactory.class).create(...)
createDependencyCoordinate
(Dependency dependency) Shortcut forgetService(DependencyFactory.class).create(...)
createLocalRepository
(Path path) Shortcut forgetService(RepositoryFactory.class).createLocal(...)
createRemoteRepository
(String id, String url) Shortcut forgetService(RepositoryFactory.class).createRemote(...)
createRemoteRepository
(Repository repository) Shortcut forgetService(RepositoryFactory.class).createRemote(...)
void
deployArtifact
(RemoteRepository repository, Artifact... artifacts) Shortcut forgetService(ArtifactDeployer.class).deploy(...)
flattenDependencies
(Node node, PathScope scope) getArtifact
(org.eclipse.aether.artifact.Artifact artifact) getArtifactPath
(Artifact artifact) Shortcut forgetService(ArtifactManager.class).getPath(...)
getData()
getDependency
(org.eclipse.aether.graph.Dependency dependency) getNode
(org.eclipse.aether.graph.DependencyNode node) getNode
(org.eclipse.aether.graph.DependencyNode node, boolean verbose) getPathForLocalArtifact
(Artifact artifact) getPathForRemoteArtifact
(RemoteRepository remote, Artifact artifact) getRemoteRepository
(org.eclipse.aether.repository.RemoteRepository repository) org.eclipse.aether.RepositorySystem
<T extends Service>
TgetService
(Class<T> clazz) org.eclipse.aether.RepositorySystemSession
void
installArtifacts
(Collection<Artifact> artifacts) Shortcut forgetService(ArtifactInstaller.class).install(...)
void
installArtifacts
(Artifact... artifacts) Shortcut forgetService(ArtifactInstaller.class).install(...)
boolean
isVersionSnapshot
(String version) Shortcut forgetService(VersionParser.class).isSnapshot(...)
protected abstract Session
newSession
(org.eclipse.aether.RepositorySystemSession session, List<RemoteRepository> repositories) parseVersion
(String version) parseVersionConstraint
(String versionConstraint) parseVersionRange
(String versionRange) void
registerListener
(Listener listener) requireType
(String id) resolveArtifact
(Artifact artifact) Shortcut forgetService(ArtifactResolver.class).resolve(...)
resolveArtifact
(ArtifactCoordinate coordinate) Shortcut forgetService(ArtifactResolver.class).resolve(...)
resolveArtifacts
(Collection<? extends ArtifactCoordinate> coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)
resolveArtifacts
(Artifact... artifacts) resolveArtifacts
(ArtifactCoordinate... coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)
resolveDependencies
(List<DependencyCoordinate> dependencies) resolveDependencies
(DependencyCoordinate dependency) resolveDependencies
(DependencyCoordinate dependency, PathScope scope, Collection<PathType> desiredTypes) resolveDependencies
(Project project, PathScope scope) resolveDependencies
(Project project, PathScope scope, Collection<PathType> desiredTypes) resolveVersion
(ArtifactCoordinate artifact) resolveVersionRange
(ArtifactCoordinate artifact) void
setArtifactPath
(Artifact artifact, Path path) Shortcut forgetService(ArtifactManager.class).setPath(...)
org.eclipse.aether.artifact.Artifact
toArtifact
(Artifact artifact) org.eclipse.aether.artifact.Artifact
toArtifact
(ArtifactCoordinate coord) List
<org.eclipse.aether.artifact.Artifact> toArtifacts
(Collection<Artifact> artifacts) List
<org.eclipse.aether.graph.Dependency> toDependencies
(Collection<DependencyCoordinate> dependencies, boolean managed) org.eclipse.aether.graph.Dependency
toDependency
(DependencyCoordinate dependency, boolean managed) List
<org.eclipse.aether.repository.RemoteRepository> toRepositories
(List<RemoteRepository> repositories) org.eclipse.aether.repository.LocalRepository
toRepository
(LocalRepository repository) org.eclipse.aether.repository.RemoteRepository
toRepository
(RemoteRepository repository) void
unregisterListener
(Listener listener) withLocalRepository
(LocalRepository localRepository) withRemoteRepositories
(List<RemoteRepository> repositories) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.api.Session
getDegreeOfConcurrency, getEffectiveProperties, getMavenVersion, getPluginContext, getProjects, getRootDirectory, getSettings, getStartTime, getSystemProperties, getTopDirectory, getUserProperties
-
Field Details
-
session
protected final org.eclipse.aether.RepositorySystemSession session -
repositorySystem
protected final org.eclipse.aether.RepositorySystem repositorySystem -
repositories
-
lookup
-
-
Constructor Details
-
AbstractSession
public AbstractSession(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RepositorySystem repositorySystem, List<RemoteRepository> repositories, List<org.eclipse.aether.repository.RemoteRepository> resolverRepositories, Lookup lookup)
-
-
Method Details
-
getRemoteRepository
public RemoteRepository getRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository) - Specified by:
getRemoteRepository
in interfaceInternalSession
-
getNode
- Specified by:
getNode
in interfaceInternalSession
-
getNode
- Specified by:
getNode
in interfaceInternalSession
-
getArtifact
- Specified by:
getArtifact
in interfaceInternalSession
-
getDependency
- Specified by:
getDependency
in interfaceInternalSession
-
toRepositories
public List<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<RemoteRepository> repositories) - Specified by:
toRepositories
in interfaceInternalSession
-
toRepository
- Specified by:
toRepository
in interfaceInternalSession
-
toRepository
- Specified by:
toRepository
in interfaceInternalSession
-
toDependencies
public List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinate> dependencies, boolean managed) - Specified by:
toDependencies
in interfaceInternalSession
-
getRemoteRepositories
- Specified by:
getRemoteRepositories
in interfaceSession
-
getData
-
getLocalRepository
- Specified by:
getLocalRepository
in interfaceSession
-
withLocalRepository
- Specified by:
withLocalRepository
in interfaceSession
-
withRemoteRepositories
- Specified by:
withRemoteRepositories
in interfaceSession
-
newSession
protected abstract Session newSession(org.eclipse.aether.RepositorySystemSession session, List<RemoteRepository> repositories) -
getService
- Specified by:
getService
in interfaceSession
- Throws:
NoSuchElementException
-
getSession
- Specified by:
getSession
in interfaceInternalSession
-
getRepositorySystem
- Specified by:
getRepositorySystem
in interfaceInternalSession
-
toDependency
public org.eclipse.aether.graph.Dependency toDependency(DependencyCoordinate dependency, boolean managed) - Specified by:
toDependency
in interfaceInternalSession
-
toArtifacts
- Specified by:
toArtifacts
in interfaceInternalSession
-
toArtifact
- Specified by:
toArtifact
in interfaceInternalSession
-
toArtifact
- Specified by:
toArtifact
in interfaceInternalSession
-
registerListener
- Specified by:
registerListener
in interfaceSession
-
unregisterListener
- Specified by:
unregisterListener
in interfaceSession
-
getListeners
- Specified by:
getListeners
in interfaceSession
-
createLocalRepository
Shortcut forgetService(RepositoryFactory.class).createLocal(...)
- Specified by:
createLocalRepository
in interfaceSession
- See Also:
-
createRemoteRepository
Shortcut forgetService(RepositoryFactory.class).createRemote(...)
- Specified by:
createRemoteRepository
in interfaceSession
- See Also:
-
createRemoteRepository
Shortcut forgetService(RepositoryFactory.class).createRemote(...)
- Specified by:
createRemoteRepository
in interfaceSession
- See Also:
-
createArtifactCoordinate
public ArtifactCoordinate createArtifactCoordinate(String groupId, String artifactId, String version, String extension) Shortcut forgetService(CoordinateFactory.class).create(...)
- Specified by:
createArtifactCoordinate
in interfaceSession
- See Also:
-
createArtifactCoordinate
Shortcut forgetService(CoordinateFactory.class).create(...)
- Specified by:
createArtifactCoordinate
in interfaceSession
- See Also:
-
createArtifactCoordinate
public ArtifactCoordinate createArtifactCoordinate(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(CoordinateFactory.class).create(...)
- Specified by:
createArtifactCoordinate
in interfaceSession
- See Also:
-
createArtifactCoordinate
Shortcut forgetService(CoordinateFactory.class).create(...)
- Specified by:
createArtifactCoordinate
in interfaceSession
- See Also:
-
createArtifact
Shortcut forgetService(ArtifactFactory.class).create(...)
- Specified by:
createArtifact
in interfaceSession
- See Also:
-
createArtifact
public Artifact createArtifact(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(ArtifactFactory.class).create(...)
- Specified by:
createArtifact
in interfaceSession
- See Also:
-
resolveArtifact
Shortcut forgetService(ArtifactResolver.class).resolve(...)
- Specified by:
resolveArtifact
in interfaceSession
- Throws:
ArtifactResolverException
- if the artifact resolution failed- See Also:
-
resolveArtifacts
Shortcut forgetService(ArtifactResolver.class).resolve(...)
- Specified by:
resolveArtifacts
in interfaceSession
- Throws:
ArtifactResolverException
- if the artifact resolution failed- See Also:
-
resolveArtifacts
Shortcut forgetService(ArtifactResolver.class).resolve(...)
- Specified by:
resolveArtifacts
in interfaceSession
- Throws:
ArtifactResolverException
- if the artifact resolution failed- See Also:
-
resolveArtifact
Shortcut forgetService(ArtifactResolver.class).resolve(...)
- Specified by:
resolveArtifact
in interfaceSession
- Throws:
ArtifactResolverException
- if the artifact resolution failed- See Also:
-
resolveArtifacts
- Specified by:
resolveArtifacts
in interfaceSession
-
installArtifacts
Shortcut forgetService(ArtifactInstaller.class).install(...)
- Specified by:
installArtifacts
in interfaceSession
- Throws:
ArtifactInstallerException
- if the artifacts installation failed- See Also:
-
installArtifacts
Shortcut forgetService(ArtifactInstaller.class).install(...)
- Specified by:
installArtifacts
in interfaceSession
- Throws:
ArtifactInstallerException
- if the artifacts installation failed- See Also:
-
deployArtifact
Shortcut forgetService(ArtifactDeployer.class).deploy(...)
- Specified by:
deployArtifact
in interfaceSession
- Throws:
ArtifactDeployerException
- if the artifacts deployment failed- See Also:
-
setArtifactPath
Shortcut forgetService(ArtifactManager.class).setPath(...)
- Specified by:
setArtifactPath
in interfaceSession
- See Also:
-
getArtifactPath
Shortcut forgetService(ArtifactManager.class).getPath(...)
- Specified by:
getArtifactPath
in interfaceSession
- See Also:
-
isVersionSnapshot
Shortcut forgetService(VersionParser.class).isSnapshot(...)
- Specified by:
isVersionSnapshot
in interfaceSession
- See Also:
-
createDependencyCoordinate
@Nonnull public DependencyCoordinate createDependencyCoordinate(@Nonnull ArtifactCoordinate coordinate) Shortcut forgetService(DependencyFactory.class).create(...)
- Specified by:
createDependencyCoordinate
in interfaceSession
- See Also:
-
createDependencyCoordinate
Shortcut forgetService(DependencyFactory.class).create(...)
- Specified by:
createDependencyCoordinate
in interfaceSession
- See Also:
-
collectDependencies
Shortcut forgetService(DependencyCollector.class).collect(...)
- Specified by:
collectDependencies
in interfaceSession
- Throws:
DependencyCollectorException
- if the dependency collection failed- See Also:
-
collectDependencies
Shortcut forgetService(DependencyCollector.class).collect(...)
- Specified by:
collectDependencies
in interfaceSession
- Throws:
DependencyCollectorException
- if the dependency collection failed- See Also:
-
collectDependencies
Shortcut forgetService(DependencyCollector.class).collect(...)
- Specified by:
collectDependencies
in interfaceSession
- Throws:
DependencyCollectorException
- if the dependency collection failed- See Also:
-
flattenDependencies
- Specified by:
flattenDependencies
in interfaceSession
-
resolveDependencies
- Specified by:
resolveDependencies
in interfaceSession
-
resolveDependencies
- Specified by:
resolveDependencies
in interfaceSession
-
resolveDependencies
- Specified by:
resolveDependencies
in interfaceSession
-
resolveDependencies
public Map<PathType,List<Path>> resolveDependencies(@Nonnull DependencyCoordinate dependency, @Nonnull PathScope scope, @Nonnull Collection<PathType> desiredTypes) - Specified by:
resolveDependencies
in interfaceSession
-
resolveDependencies
public Map<PathType,List<Path>> resolveDependencies(@Nonnull Project project, @Nonnull PathScope scope, @Nonnull Collection<PathType> desiredTypes) - Specified by:
resolveDependencies
in interfaceSession
-
getPathForLocalArtifact
- Specified by:
getPathForLocalArtifact
in interfaceSession
-
getPathForRemoteArtifact
- Specified by:
getPathForRemoteArtifact
in interfaceSession
-
parseVersion
- Specified by:
parseVersion
in interfaceSession
-
parseVersionRange
- Specified by:
parseVersionRange
in interfaceSession
-
parseVersionConstraint
- Specified by:
parseVersionConstraint
in interfaceSession
-
resolveVersion
- Specified by:
resolveVersion
in interfaceSession
-
resolveVersionRange
- Specified by:
resolveVersionRange
in interfaceSession
-
requireType
- Specified by:
requireType
in interfaceSession
-
requireLanguage
- Specified by:
requireLanguage
in interfaceSession
-
requirePackaging
- Specified by:
requirePackaging
in interfaceSession
-
requireProjectScope
- Specified by:
requireProjectScope
in interfaceSession
-
requireDependencyScope
- Specified by:
requireDependencyScope
in interfaceSession
-
requirePathScope
- Specified by:
requirePathScope
in interfaceSession
-