Package org.apache.maven.internal.impl
Class AbstractSession
java.lang.Object
org.apache.maven.internal.impl.AbstractSession
- All Implemented Interfaces:
Session
- Direct Known Subclasses:
DefaultSession
-
Constructor Summary
-
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 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(...)
getArtifact
(org.eclipse.aether.artifact.Artifact artifact) getArtifactPath
(Artifact artifact) Shortcut forgetService(ArtifactManager.class).getPath(...)
getDependency
(org.eclipse.aether.graph.Dependency dependency) Returns the list of registered listeners.getNode
(org.eclipse.aether.graph.DependencyNode node) getNode
(org.eclipse.aether.graph.DependencyNode node, boolean verbose) getPathForLocalArtifact
(Artifact artifact) getPathForRemoteArtifact
(RemoteRepository remote, Artifact artifact) getProject
(MavenProject project) getProjects
(List<MavenProject> projects) getRemoteRepository
(org.eclipse.aether.repository.RemoteRepository repository) 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(...)
parseVersion
(String version) Shortcut forgetService(VersionParser.class).parseVersion(...)
parseVersionRange
(String versionRange) Shortcut forgetService(VersionParser.class).parseVersionRange(...)
void
registerListener
(Listener listener) Register the given listener which will receive all events.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) Shortcut forgetService(ArtifactResolver.class).resolve(...)
resolveArtifacts
(ArtifactCoordinate... coordinates) Shortcut forgetService(ArtifactResolver.class).resolve(...)
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) toArtifactRepositories
(List<RemoteRepository> repositories) abstract ArtifactRepository
toArtifactRepository
(RemoteRepository repository) List<org.eclipse.aether.artifact.Artifact>
toArtifacts
(Collection<Artifact> artifacts) List<org.eclipse.aether.graph.Dependency>
toDependencies
(Collection<DependencyCoordinate> dependencies) abstract org.eclipse.aether.graph.Dependency
toDependency
(DependencyCoordinate dependency) 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) Unregisters a previously registered listener.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
getData, getDegreeOfConcurrency, getExecutionRootDirectory, getLocalRepository, getMavenVersion, getMultiModuleProjectDirectory, getPluginContext, getProjects, getRemoteRepositories, getService, getSettings, getStartTime, getSystemProperties, getUserProperties, withLocalRepository, withRemoteRepositories
-
Constructor Details
-
AbstractSession
public AbstractSession()
-
-
Method Details
-
getRemoteRepository
public RemoteRepository getRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository) -
getNode
-
getNode
-
getArtifact
-
getDependency
-
getProjects
-
getProject
-
toRepositories
public List<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<RemoteRepository> repositories) -
toRepository
-
toRepository
-
toArtifactRepositories
-
toArtifactRepository
-
toDependencies
public List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinate> dependencies) -
toDependency
-
toArtifacts
-
toArtifact
-
toArtifact
-
registerListener
Description copied from interface:Session
Register the given listener which will receive all events.- Specified by:
registerListener
in interfaceSession
- Parameters:
listener
- the listener to register
-
unregisterListener
Description copied from interface:Session
Unregisters a previously registered listener.- Specified by:
unregisterListener
in interfaceSession
- Parameters:
listener
- the listener to unregister
-
getListeners
Description copied from interface:Session
Returns the list of registered listeners.- Specified by:
getListeners
in interfaceSession
- Returns:
- an immutable collection of listeners, never
null
-
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
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
Description copied from interface:Session
Shortcut forgetService(ArtifactResolver.class).resolve(...)
- Specified by:
resolveArtifacts
in interfaceSession
- See Also:
-
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(...)
-
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:
-
getPathForLocalArtifact
- Specified by:
getPathForLocalArtifact
in interfaceSession
-
getPathForRemoteArtifact
- Specified by:
getPathForRemoteArtifact
in interfaceSession
-
parseVersion
Description copied from interface:Session
Shortcut forgetService(VersionParser.class).parseVersion(...)
- Specified by:
parseVersion
in interfaceSession
- See Also:
-
parseVersionRange
Description copied from interface:Session
Shortcut forgetService(VersionParser.class).parseVersionRange(...)
- Specified by:
parseVersionRange
in interfaceSession
- See Also:
-