Package org.apache.maven.internal.impl
Class DefaultSession
java.lang.Object
org.apache.maven.internal.impl.AbstractSession
org.apache.maven.internal.impl.DefaultSession
- All Implemented Interfaces:
- Session,- InternalSession
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultSession(MavenSession session, org.eclipse.aether.RepositorySystem repositorySystem, List<RemoteRepository> repositories, MavenRepositorySystem mavenRepositorySystem, org.codehaus.plexus.PlexusContainer container, RuntimeInformation runtimeInformation) 
- 
Method SummaryModifier and TypeMethodDescriptiongetData()intReturns the current maven versiongetPluginContext(Project project) Returns the plugin context for mojo being executed and the specifiedProject, never returnsnullas if context not present, creates it.org.eclipse.aether.RepositorySystemGets the root directory of the session, which is the root directory for the top directory project.<T extends Service>
 TgetService(Class<T> clazz) Retrieves the service for the interfaceorg.eclipse.aether.RepositorySystemSessionGets the system properties to use for interpolation.Gets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--filecommand line argument.Gets the user properties to use for interpolation.toArtifactRepository(RemoteRepository repository) org.eclipse.aether.graph.DependencytoDependency(DependencyCoordinate dependency) withLocalRepository(LocalRepository localRepository) Creates a derived session using the given local repository.withRemoteRepositories(List<RemoteRepository> repositories) Creates a derived session using the given remote repositories.Methods inherited from class org.apache.maven.internal.impl.AbstractSessioncollectDependencies, collectDependencies, collectDependencies, createArtifact, createArtifact, createArtifactCoordinate, createArtifactCoordinate, createArtifactCoordinate, createArtifactCoordinate, createDependencyCoordinate, createDependencyCoordinate, createLocalRepository, createRemoteRepository, createRemoteRepository, deployArtifact, flattenDependencies, getArtifact, getArtifactPath, getDependency, getListeners, getNode, getNode, getPathForLocalArtifact, getPathForRemoteArtifact, getProject, getProjects, getRemoteRepository, installArtifacts, installArtifacts, isVersionSnapshot, parseVersion, parseVersionRange, registerListener, resolveArtifact, resolveArtifact, resolveArtifacts, resolveArtifacts, resolveArtifacts, resolveDependencies, resolveDependencies, resolveDependencies, resolveVersion, resolveVersionRange, setArtifactPath, toArtifact, toArtifact, toArtifactRepositories, toArtifacts, toDependencies, toRepositories, toRepository, toRepository, unregisterListener
- 
Constructor Details- 
DefaultSessionpublic 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) 
 
- 
- 
Method Details- 
getMavenSession
- 
getLocalRepository
- 
getRemoteRepositories
- 
getSettings
- 
getUserPropertiesDescription copied from interface:SessionGets the user properties to use for interpolation. The user properties have been configured directly by the user, e.g. via the-Dkey=valueparameter on the command line.- Returns:
- the user properties, never null
 
- 
getSystemPropertiesDescription copied from interface:SessionGets the system properties to use for interpolation. The system properties are collected from the runtime environment such asSystem.getProperties()and environment variables.- Returns:
- the system properties, never null
 
- 
getMavenVersionDescription copied from interface:SessionReturns the current maven version- Returns:
- the maven version, never null
 
- 
getDegreeOfConcurrencypublic int getDegreeOfConcurrency()
- 
getStartTime
- 
getRootDirectoryDescription copied from interface:SessionGets the root directory of the session, which is the root directory for the top directory project.
- 
getTopDirectoryDescription copied from interface:SessionGets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--filecommand line argument.
- 
getProjects
- 
getPluginContextDescription copied from interface:SessionReturns the plugin context for mojo being executed and the specifiedProject, never returnsnullas if context not present, creates it. Implementation note: while this method return type isMap, the returned map instance implementsConcurrentMapas well.
- 
getData
- 
withLocalRepositoryDescription copied from interface:SessionCreates a derived session using the given local repository.- Parameters:
- localRepository- the new local repository
- Returns:
- the derived session
 
- 
withRemoteRepositoriesDescription copied from interface:SessionCreates a derived session using the given remote repositories.- Parameters:
- repositories- the new list of remote repositories
- Returns:
- the derived session
 
- 
getServiceDescription copied from interface:SessionRetrieves the service for the interface- Throws:
- NoSuchElementException- if the service could not be found
 
- 
getSession
- 
getRepositorySystem
- 
toArtifactRepository- Specified by:
- toArtifactRepositoryin interface- InternalSession
- Specified by:
- toArtifactRepositoryin class- AbstractSession
 
- 
toDependency- Specified by:
- toDependencyin interface- InternalSession
- Specified by:
- toDependencyin class- AbstractSession
 
 
-