Package org.apache.maven.internal.impl
Class AbstractSession
java.lang.Object
org.apache.maven.internal.impl.AbstractSession
- All Implemented Interfaces:
ProtoSession,Session,InternalSession
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.maven.api.ProtoSession
ProtoSession.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Lookupprotected final List<RemoteRepository>protected final org.eclipse.aether.RepositorySystemprotected final org.eclipse.aether.RepositorySystemSession -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSession(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, PathScope scope) Shortcut forgetService(DependencyResolver.class).collect(...)collectDependencies(DependencyCoordinates dependency, PathScope scope) Shortcut forgetService(DependencyResolver.class).collect(...)collectDependencies(Project project, PathScope scope) Shortcut forgetService(DependencyResolver.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(...)createArtifactCoordinates(String coordString) Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)createArtifactCoordinates(String groupId, String artifactId, String version, String extension) Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)createArtifactCoordinates(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)createArtifactCoordinates(Artifact artifact) Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)createDependencyCoordinates(ArtifactCoordinates coordinates) Shortcut forgetService(DependencyFactory.class).create(...)createDependencyCoordinates(Dependency dependency) Shortcut forgetService(DependencyFactory.class).create(...)createLocalRepository(Path path) Shortcut forgetService(RepositoryFactory.class).createLocal(...)createProducedArtifact(String groupId, String artifactId, String version, String extension) Shortcut forgetService(ArtifactFactory.class).createProduced(...)createProducedArtifact(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(ArtifactFactory.class).createProduced(...)createRemoteRepository(String id, String url) Shortcut forgetService(RepositoryFactory.class).createRemote(...)createRemoteRepository(Repository repository) Shortcut forgetService(RepositoryFactory.class).createRemote(...)voiddeployArtifact(RemoteRepository repository, ProducedArtifact... artifacts) Shortcut forgetService(ArtifactDeployer.class).deploy(...)flattenDependencies(Node node, PathScope scope) <T extends Artifact>
TgetArtifact(Class<T> clazz, org.eclipse.aether.artifact.Artifact artifact) 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.RepositorySystemSessionvoidinstallArtifacts(Collection<ProducedArtifact> artifacts) Shortcut forgetService(ArtifactInstaller.class).install(...)voidinstallArtifacts(ProducedArtifact... artifacts) Shortcut forgetService(ArtifactInstaller.class).install(...)booleanisVersionSnapshot(String version) Shortcut forgetService(VersionParser.class).isSnapshot(...)protected abstract SessionnewSession(org.eclipse.aether.RepositorySystemSession session, List<RemoteRepository> repositories) parseVersion(String version) parseVersionConstraint(String versionConstraint) parseVersionRange(String versionRange) voidregisterListener(Listener listener) requireType(String id) resolveArtifact(Artifact artifact) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveArtifact(ArtifactCoordinates coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveArtifact(ArtifactCoordinates coordinates, List<RemoteRepository> repositories) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveArtifact(Artifact artifact, List<RemoteRepository> repositories) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveArtifacts(Collection<? extends ArtifactCoordinates> coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveArtifacts(Collection<? extends ArtifactCoordinates> coordinates, List<RemoteRepository> repositories) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveArtifacts(Artifact... artifacts) resolveArtifacts(ArtifactCoordinates... coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)resolveDependencies(List<DependencyCoordinates> dependencies) resolveDependencies(DependencyCoordinates dependency) resolveDependencies(DependencyCoordinates dependency, PathScope scope, Collection<PathType> desiredTypes) resolveDependencies(Project project, PathScope scope) resolveDependencies(Project project, PathScope scope, Collection<PathType> desiredTypes) resolveVersion(ArtifactCoordinates artifact) resolveVersionRange(ArtifactCoordinates artifact) resolveVersionRange(ArtifactCoordinates artifact, List<RemoteRepository> repositories) voidsetArtifactPath(ProducedArtifact artifact, Path path) Shortcut forgetService(ArtifactManager.class).setPath(...)org.eclipse.aether.artifact.ArtifacttoArtifact(Artifact artifact) org.eclipse.aether.artifact.ArtifacttoArtifact(ArtifactCoordinates coords) List<org.eclipse.aether.artifact.Artifact>toArtifacts(Collection<? extends Artifact> artifacts) List<org.eclipse.aether.graph.Dependency>toDependencies(Collection<DependencyCoordinates> dependencies, boolean managed) org.eclipse.aether.graph.DependencytoDependency(DependencyCoordinates dependency, boolean managed) List<org.eclipse.aether.repository.RemoteRepository>toRepositories(List<RemoteRepository> repositories) org.eclipse.aether.repository.LocalRepositorytoRepository(LocalRepository repository) org.eclipse.aether.repository.RemoteRepositorytoRepository(RemoteRepository repository) voidunregisterListener(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, waitMethods inherited from interface org.apache.maven.api.ProtoSession
getRootDirectory, getStartTime, getSystemProperties, getTopDirectory, getUserProperties, toBuilderMethods inherited from interface org.apache.maven.api.Session
getDegreeOfConcurrency, getEffectiveProperties, getMavenVersion, getPluginContext, getProjects, getSettings
-
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:
getRemoteRepositoryin interfaceInternalSession
-
getNode
- Specified by:
getNodein interfaceInternalSession
-
getNode
- Specified by:
getNodein interfaceInternalSession
-
getArtifact
- Specified by:
getArtifactin interfaceInternalSession
-
getArtifact
public <T extends Artifact> T getArtifact(Class<T> clazz, org.eclipse.aether.artifact.Artifact artifact) - Specified by:
getArtifactin interfaceInternalSession
-
getDependency
- Specified by:
getDependencyin interfaceInternalSession
-
toRepositories
public List<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<RemoteRepository> repositories) - Specified by:
toRepositoriesin interfaceInternalSession
-
toRepository
- Specified by:
toRepositoryin interfaceInternalSession
-
toRepository
- Specified by:
toRepositoryin interfaceInternalSession
-
toDependencies
public List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinates> dependencies, boolean managed) - Specified by:
toDependenciesin interfaceInternalSession
-
getRemoteRepositories
- Specified by:
getRemoteRepositoriesin interfaceSession
-
getData
-
getLocalRepository
- Specified by:
getLocalRepositoryin interfaceSession
-
withLocalRepository
- Specified by:
withLocalRepositoryin interfaceSession
-
withRemoteRepositories
- Specified by:
withRemoteRepositoriesin interfaceSession
-
newSession
protected abstract Session newSession(org.eclipse.aether.RepositorySystemSession session, List<RemoteRepository> repositories) -
getService
- Specified by:
getServicein interfaceSession- Throws:
NoSuchElementException
-
getSession
- Specified by:
getSessionin interfaceInternalSession
-
getRepositorySystem
- Specified by:
getRepositorySystemin interfaceInternalSession
-
toDependency
public org.eclipse.aether.graph.Dependency toDependency(DependencyCoordinates dependency, boolean managed) - Specified by:
toDependencyin interfaceInternalSession
-
toArtifacts
public List<org.eclipse.aether.artifact.Artifact> toArtifacts(Collection<? extends Artifact> artifacts) - Specified by:
toArtifactsin interfaceInternalSession
-
toArtifact
- Specified by:
toArtifactin interfaceInternalSession
-
toArtifact
- Specified by:
toArtifactin interfaceInternalSession
-
registerListener
- Specified by:
registerListenerin interfaceSession
-
unregisterListener
- Specified by:
unregisterListenerin interfaceSession
-
getListeners
- Specified by:
getListenersin interfaceSession
-
createLocalRepository
Shortcut forgetService(RepositoryFactory.class).createLocal(...)- Specified by:
createLocalRepositoryin interfaceSession- See Also:
-
createRemoteRepository
Shortcut forgetService(RepositoryFactory.class).createRemote(...)- Specified by:
createRemoteRepositoryin interfaceSession- See Also:
-
createRemoteRepository
Shortcut forgetService(RepositoryFactory.class).createRemote(...)- Specified by:
createRemoteRepositoryin interfaceSession- See Also:
-
createArtifactCoordinates
public ArtifactCoordinates createArtifactCoordinates(String groupId, String artifactId, String version, String extension) Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)- Specified by:
createArtifactCoordinatesin interfaceSession- See Also:
-
createArtifactCoordinates
Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)- Specified by:
createArtifactCoordinatesin interfaceSession- See Also:
-
createArtifactCoordinates
public ArtifactCoordinates createArtifactCoordinates(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)- Specified by:
createArtifactCoordinatesin interfaceSession- See Also:
-
createArtifactCoordinates
Shortcut forgetService(ArtifactCoordinatesFactory.class).create(...)- Specified by:
createArtifactCoordinatesin interfaceSession- See Also:
-
createArtifact
Shortcut forgetService(ArtifactFactory.class).create(...)- Specified by:
createArtifactin 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:
createArtifactin interfaceSession- See Also:
-
createProducedArtifact
public ProducedArtifact createProducedArtifact(String groupId, String artifactId, String version, String extension) Shortcut forgetService(ArtifactFactory.class).createProduced(...)- Specified by:
createProducedArtifactin interfaceSession- See Also:
-
createProducedArtifact
public ProducedArtifact createProducedArtifact(String groupId, String artifactId, String version, String classifier, String extension, String type) Shortcut forgetService(ArtifactFactory.class).createProduced(...)- Specified by:
createProducedArtifactin interfaceSession- See Also:
-
resolveArtifact
Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifact
public DownloadedArtifact resolveArtifact(ArtifactCoordinates coordinates, List<RemoteRepository> repositories) Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifacts
Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactsin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifacts
public Collection<DownloadedArtifact> resolveArtifacts(Collection<? extends ArtifactCoordinates> coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactsin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifacts
public Collection<DownloadedArtifact> resolveArtifacts(Collection<? extends ArtifactCoordinates> coordinates, List<RemoteRepository> repositories) Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactsin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifact
Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifact
Shortcut forgetService(ArtifactResolver.class).resolve(...)- Specified by:
resolveArtifactin interfaceSession- Throws:
ArtifactResolverException- if the artifact resolution failed- See Also:
-
resolveArtifacts
- Specified by:
resolveArtifactsin interfaceSession
-
installArtifacts
Shortcut forgetService(ArtifactInstaller.class).install(...)- Specified by:
installArtifactsin interfaceSession- Throws:
ArtifactInstallerException- if the artifacts installation failed- See Also:
-
installArtifacts
Shortcut forgetService(ArtifactInstaller.class).install(...)- Specified by:
installArtifactsin interfaceSession- Throws:
ArtifactInstallerException- if the artifacts installation failed- See Also:
-
deployArtifact
Shortcut forgetService(ArtifactDeployer.class).deploy(...)- Specified by:
deployArtifactin interfaceSession- Throws:
ArtifactDeployerException- if the artifacts deployment failed- See Also:
-
setArtifactPath
Shortcut forgetService(ArtifactManager.class).setPath(...)- Specified by:
setArtifactPathin interfaceSession- See Also:
-
getArtifactPath
Shortcut forgetService(ArtifactManager.class).getPath(...)- Specified by:
getArtifactPathin interfaceSession- See Also:
-
isVersionSnapshot
Shortcut forgetService(VersionParser.class).isSnapshot(...)- Specified by:
isVersionSnapshotin interfaceSession- See Also:
-
createDependencyCoordinates
@Nonnull public DependencyCoordinates createDependencyCoordinates(@Nonnull ArtifactCoordinates coordinates) Shortcut forgetService(DependencyFactory.class).create(...)- Specified by:
createDependencyCoordinatesin interfaceSession- See Also:
-
createDependencyCoordinates
Shortcut forgetService(DependencyFactory.class).create(...)- Specified by:
createDependencyCoordinatesin interfaceSession- See Also:
-
collectDependencies
Shortcut forgetService(DependencyResolver.class).collect(...)- Specified by:
collectDependenciesin interfaceSession- Throws:
DependencyResolverException- if the dependency collection failed- See Also:
-
collectDependencies
Shortcut forgetService(DependencyResolver.class).collect(...)- Specified by:
collectDependenciesin interfaceSession- Throws:
DependencyResolverException- if the dependency collection failed- See Also:
-
collectDependencies
@Nonnull public Node collectDependencies(@Nonnull DependencyCoordinates dependency, @Nonnull PathScope scope) Shortcut forgetService(DependencyResolver.class).collect(...)- Specified by:
collectDependenciesin interfaceSession- Throws:
DependencyResolverException- if the dependency collection failed- See Also:
-
flattenDependencies
- Specified by:
flattenDependenciesin interfaceSession
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceSession
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceSession
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceSession
-
resolveDependencies
public Map<PathType,List<Path>> resolveDependencies(@Nonnull DependencyCoordinates dependency, @Nonnull PathScope scope, @Nonnull Collection<PathType> desiredTypes) - Specified by:
resolveDependenciesin interfaceSession
-
resolveDependencies
public Map<PathType,List<Path>> resolveDependencies(@Nonnull Project project, @Nonnull PathScope scope, @Nonnull Collection<PathType> desiredTypes) - Specified by:
resolveDependenciesin interfaceSession
-
getPathForLocalArtifact
- Specified by:
getPathForLocalArtifactin interfaceSession
-
getPathForRemoteArtifact
- Specified by:
getPathForRemoteArtifactin interfaceSession
-
parseVersion
- Specified by:
parseVersionin interfaceSession
-
parseVersionRange
- Specified by:
parseVersionRangein interfaceSession
-
parseVersionConstraint
- Specified by:
parseVersionConstraintin interfaceSession
-
resolveVersion
- Specified by:
resolveVersionin interfaceSession- Throws:
VersionResolverException
-
resolveVersionRange
public List<Version> resolveVersionRange(ArtifactCoordinates artifact) throws VersionResolverException - Specified by:
resolveVersionRangein interfaceSession- Throws:
VersionResolverException
-
resolveVersionRange
public List<Version> resolveVersionRange(ArtifactCoordinates artifact, List<RemoteRepository> repositories) throws VersionResolverException - Specified by:
resolveVersionRangein interfaceSession- Throws:
VersionResolverException
-
requireType
- Specified by:
requireTypein interfaceSession
-
requireLanguage
- Specified by:
requireLanguagein interfaceSession
-
requirePackaging
- Specified by:
requirePackagingin interfaceSession
-
requireProjectScope
- Specified by:
requireProjectScopein interfaceSession
-
requireDependencyScope
- Specified by:
requireDependencyScopein interfaceSession
-
requirePathScope
- Specified by:
requirePathScopein interfaceSession
-