Package org.apache.maven.internal.impl
Class AbstractSession
java.lang.Object
org.apache.maven.internal.impl.AbstractSession
- All Implemented Interfaces:
Session,InternalSession
- Direct Known Subclasses:
DefaultSession
-
Constructor Summary
Constructors -
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(...)voiddeployArtifact(RemoteRepository repository, Artifact... artifacts) Shortcut forgetService(ArtifactDeployer.class).deploy(...)flattenDependencies(Node node, ResolutionScope scope) Shortcut forgetService(DependencyResolver.class).flatten(...).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) Gets the relative path for a locally installed artifact.getPathForRemoteArtifact(RemoteRepository remote, Artifact artifact) Gets the relative path for an artifact cached from a remote repository.getProject(MavenProject project) getProjects(List<MavenProject> projects) getRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository) voidinstallArtifacts(Collection<Artifact> artifacts) Shortcut forgetService(ArtifactInstaller.class).install(...)voidinstallArtifacts(Artifact... artifacts) Shortcut forgetService(ArtifactInstaller.class).install(...)booleanisVersionSnapshot(String version) Shortcut forgetService(VersionParser.class).isSnapshot(...)parseVersion(String version) Parses the specified version string, for example "1.0".parseVersionConstraint(String versionConstraint) Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".parseVersionRange(String versionRange) Parses the specified version range specification, for example "[1.0,2.0)".voidregisterListener(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(...)resolveDependencies(List<DependencyCoordinate> dependencies) resolveDependencies(DependencyCoordinate dependency) resolveDependencies(Project project, ResolutionScope scope) resolveVersion(ArtifactCoordinate artifact) Resolves an artifact's meta version (if any) to a concrete version.resolveVersionRange(ArtifactCoordinate artifact) Expands a version range to a list of matching versions, in ascending order.voidsetArtifactPath(Artifact artifact, Path path) Shortcut forgetService(ArtifactManager.class).setPath(...)org.eclipse.aether.artifact.ArtifacttoArtifact(Artifact artifact) org.eclipse.aether.artifact.ArtifacttoArtifact(ArtifactCoordinate coord) toArtifactRepositories(List<RemoteRepository> repositories) abstract ArtifactRepositorytoArtifactRepository(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.DependencytoDependency(DependencyCoordinate dependency) 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) Unregisters a previously registered listener.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.internal.impl.InternalSession
getMavenSession, getRepositorySystem, getSessionMethods inherited from interface org.apache.maven.api.Session
getData, getDegreeOfConcurrency, getLocalRepository, getMavenVersion, getPluginContext, getProjects, getRemoteRepositories, getRootDirectory, getService, getSettings, getStartTime, getSystemProperties, getTopDirectory, getUserProperties, withLocalRepository, withRemoteRepositories
-
Constructor Details
-
AbstractSession
public AbstractSession()
-
-
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
-
getDependency
- Specified by:
getDependencyin interfaceInternalSession
-
getProjects
- Specified by:
getProjectsin interfaceInternalSession
-
getProject
- Specified by:
getProjectin 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
-
toArtifactRepositories
- Specified by:
toArtifactRepositoriesin interfaceInternalSession
-
toArtifactRepository
- Specified by:
toArtifactRepositoryin interfaceInternalSession
-
toDependencies
public List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinate> dependencies) - Specified by:
toDependenciesin interfaceInternalSession
-
toDependency
- Specified by:
toDependencyin interfaceInternalSession
-
toArtifacts
- Specified by:
toArtifactsin interfaceInternalSession
-
toArtifact
- Specified by:
toArtifactin interfaceInternalSession
-
toArtifact
- Specified by:
toArtifactin interfaceInternalSession
-
registerListener
Description copied from interface:SessionRegister the given listener which will receive all events.- Specified by:
registerListenerin interfaceSession- Parameters:
listener- the listener to register
-
unregisterListener
Description copied from interface:SessionUnregisters a previously registered listener.- Specified by:
unregisterListenerin interfaceSession- Parameters:
listener- the listener to unregister
-
getListeners
Description copied from interface:SessionReturns the list of registered listeners.- Specified by:
getListenersin interfaceSession- Returns:
- an immutable collection of listeners, never
null
-
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:
-
createArtifactCoordinate
public ArtifactCoordinate createArtifactCoordinate(String groupId, String artifactId, String version, String extension) Shortcut forgetService(CoordinateFactory.class).create(...)- Specified by:
createArtifactCoordinatein interfaceSession- See Also:
-
createArtifactCoordinate
Shortcut forgetService(CoordinateFactory.class).create(...)- Specified by:
createArtifactCoordinatein interfaceSession- Parameters:
coordString- the string having "standard" coordinate.- Returns:
- an
ArtifactCoordinate, nevernull - 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:
createArtifactCoordinatein interfaceSession- See Also:
-
createArtifactCoordinate
Shortcut forgetService(CoordinateFactory.class).create(...)- Specified by:
createArtifactCoordinatein 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:
-
resolveArtifact
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
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:
-
resolveArtifacts
Description copied from interface:SessionShortcut forgetService(ArtifactResolver.class).resolve(...).- Specified by:
resolveArtifactsin interfaceSession- See Also:
-
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:
-
createDependencyCoordinate
@Nonnull public DependencyCoordinate createDependencyCoordinate(@Nonnull ArtifactCoordinate coordinate) Shortcut forgetService(DependencyFactory.class).create(...)- Specified by:
createDependencyCoordinatein interfaceSession- See Also:
-
createDependencyCoordinate
Shortcut forgetService(DependencyFactory.class).create(...)- Specified by:
createDependencyCoordinatein interfaceSession- See Also:
-
collectDependencies
Shortcut forgetService(DependencyCollector.class).collect(...)- Specified by:
collectDependenciesin interfaceSession- Throws:
DependencyCollectorException- if the dependency collection failed- See Also:
-
collectDependencies
Shortcut forgetService(DependencyCollector.class).collect(...)- Specified by:
collectDependenciesin interfaceSession- Throws:
DependencyCollectorException- if the dependency collection failed- See Also:
-
collectDependencies
Shortcut forgetService(DependencyCollector.class).collect(...)- Specified by:
collectDependenciesin interfaceSession- Throws:
DependencyCollectorException- if the dependency collection failed- See Also:
-
flattenDependencies
Description copied from interface:SessionShortcut forgetService(DependencyResolver.class).flatten(...).- Specified by:
flattenDependenciesin interfaceSession- See Also:
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceSession
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceSession
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceSession
-
getPathForLocalArtifact
Description copied from interface:SessionGets the relative path for a locally installed artifact. Note that the artifact need not actually exist yet at the returned location, the path merely indicates where the artifact would eventually be stored.Shortcut for
getService(LocalArtifactManager.class).getPathForLocalArtitact(...).- Specified by:
getPathForLocalArtifactin interfaceSession- See Also:
-
getPathForRemoteArtifact
Description copied from interface:SessionGets the relative path for an artifact cached from a remote repository. Note that the artifact need not actually exist yet at the returned location, the path merely indicates where the artifact would eventually be stored.Shortcut for
getService(LocalArtifactManager.class).getPathForRemoteArtifact(...).- Specified by:
getPathForRemoteArtifactin interfaceSession- See Also:
-
parseVersion
Description copied from interface:SessionParses the specified version string, for example "1.0".Shortcut for
getService(VersionParser.class).parseVersion(...).- Specified by:
parseVersionin interfaceSession- See Also:
-
parseVersionRange
Description copied from interface:SessionParses the specified version range specification, for example "[1.0,2.0)".Shortcut for
getService(VersionParser.class).parseVersionRange(...).- Specified by:
parseVersionRangein interfaceSession- See Also:
-
parseVersionConstraint
Description copied from interface:SessionParses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".Shortcut for
getService(VersionParser.class).parseVersionConstraint(...).- Specified by:
parseVersionConstraintin interfaceSession- See Also:
-
resolveVersion
Description copied from interface:SessionResolves an artifact's meta version (if any) to a concrete version. For example, resolves "1.0-SNAPSHOT" to "1.0-20090208.132618-23" or "RELEASE"/"LATEST" to "2.0".Shortcut for
getService(VersionResolver.class).resolve(...)- Specified by:
resolveVersionin interfaceSession- See Also:
-
resolveVersionRange
Description copied from interface:SessionExpands a version range to a list of matching versions, in ascending order. For example, resolves "[3.8,4.0)" to "3.8", "3.8.1", "3.8.2". The returned list of versions is only dependent on the configured repositories and their contents. The supplied request may also refer to a single concrete version rather than a version range. In this case though, the result contains simply the (parsed) input version, regardless of the repositories and their contents.- Specified by:
resolveVersionRangein interfaceSession- Returns:
- a list of resolved
Versions. - See Also:
-