public class DefaultSession extends AbstractSession
Constructor and Description |
---|
DefaultSession(MavenSession session,
org.eclipse.aether.RepositorySystem repositorySystem,
List<RemoteRepository> repositories,
MavenRepositorySystem mavenRepositorySystem,
org.codehaus.plexus.PlexusContainer container,
RuntimeInformation runtimeInformation) |
Modifier and Type | Method and Description |
---|---|
SessionData |
getData() |
int |
getDegreeOfConcurrency() |
Path |
getExecutionRootDirectory() |
LocalRepository |
getLocalRepository() |
MavenSession |
getMavenSession() |
String |
getMavenVersion()
Returns the current maven version
|
Path |
getMultiModuleProjectDirectory() |
Map<String,Object> |
getPluginContext(Project project)
Returns the plugin context for mojo being executed and the specified
Project , never returns null as if context not present, creates it. |
List<Project> |
getProjects() |
List<RemoteRepository> |
getRemoteRepositories() |
org.eclipse.aether.RepositorySystem |
getRepositorySystem() |
<T extends Service> |
getService(Class<T> clazz)
Retrieves the service for the interface
|
org.eclipse.aether.RepositorySystemSession |
getSession() |
Settings |
getSettings() |
Instant |
getStartTime() |
Map<String,String> |
getSystemProperties() |
Map<String,String> |
getUserProperties() |
ArtifactRepository |
toArtifactRepository(RemoteRepository repository) |
org.eclipse.aether.graph.Dependency |
toDependency(DependencyCoordinate dependency) |
Session |
withLocalRepository(LocalRepository localRepository)
Creates a derived session using the given local repository.
|
Session |
withRemoteRepositories(List<RemoteRepository> repositories)
Creates a derived session using the given remote repositories.
|
collectDependencies, collectDependencies, collectDependencies, createArtifact, createArtifact, createArtifactCoordinate, createArtifactCoordinate, createArtifactCoordinate, createDependencyCoordinate, createDependencyCoordinate, createLocalRepository, createRemoteRepository, createRemoteRepository, deployArtifact, getArtifact, getArtifactPath, getDependency, getListeners, getNode, getNode, getPathForLocalArtifact, getPathForRemoteArtifact, getProject, getProjects, getRemoteRepository, installArtifacts, installArtifacts, isVersionSnapshot, parseVersion, parseVersionRange, registerListener, resolveArtifact, resolveArtifact, resolveArtifacts, resolveArtifacts, resolveArtifacts, setArtifactPath, toArtifact, toArtifact, toArtifactRepositories, toArtifacts, toDependencies, toRepositories, toRepository, toRepository, unregisterListener
public DefaultSession(@Nonnull MavenSession session, @Nonnull org.eclipse.aether.RepositorySystem repositorySystem, @Nullable List<RemoteRepository> repositories, @Nonnull MavenRepositorySystem mavenRepositorySystem, @Nonnull org.codehaus.plexus.PlexusContainer container, @Nonnull RuntimeInformation runtimeInformation)
public MavenSession getMavenSession()
@Nonnull public LocalRepository getLocalRepository()
@Nonnull public List<RemoteRepository> getRemoteRepositories()
@Nonnull public String getMavenVersion()
Session
null
.public int getDegreeOfConcurrency()
@Nonnull public Map<String,Object> getPluginContext(Project project)
Session
Project
, never returns null
as if context not present, creates it.
Implementation note: while this method return type is Map
, the returned map instance
implements ConcurrentMap
as well.@Nonnull public SessionData getData()
@Nonnull public Session withLocalRepository(@Nonnull LocalRepository localRepository)
Session
localRepository
- the new local repository@Nonnull public Session withRemoteRepositories(@Nonnull List<RemoteRepository> repositories)
Session
repositories
- the new list of remote repositories@Nonnull public <T extends Service> T getService(Class<T> clazz) throws NoSuchElementException
Session
NoSuchElementException
- if the service could not be found@Nonnull public org.eclipse.aether.RepositorySystemSession getSession()
@Nonnull public org.eclipse.aether.RepositorySystem getRepositorySystem()
public ArtifactRepository toArtifactRepository(RemoteRepository repository)
toArtifactRepository
in class AbstractSession
public org.eclipse.aether.graph.Dependency toDependency(DependencyCoordinate dependency)
toDependency
in class AbstractSession
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.