Interface InternalSession
- All Superinterfaces:
org.apache.maven.api.ProtoSession, org.apache.maven.api.Session
- All Known Implementing Classes:
AbstractSession
public interface InternalSession
extends org.apache.maven.api.Session
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.maven.api.ProtoSession
org.apache.maven.api.ProtoSession.Builder -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassociate(org.eclipse.aether.RepositorySystemSession rsession, org.apache.maven.api.Session session) static InternalSessionfrom(org.apache.maven.api.Session session) static InternalSessionfrom(org.eclipse.aether.RepositorySystemSession session) Map<Class<? extends org.apache.maven.api.Service>, Supplier<? extends org.apache.maven.api.Service>> Retrieves a map of all services.<T extends org.apache.maven.api.Artifact>
TgetArtifact(Class<T> clazz, org.eclipse.aether.artifact.Artifact artifact) org.apache.maven.api.ArtifactgetArtifact(org.eclipse.aether.artifact.Artifact artifact) org.apache.maven.api.services.RequestTraceGets the current request trace for the session from thread-local storage.org.apache.maven.api.DependencygetDependency(org.eclipse.aether.graph.Dependency dependency) org.apache.maven.api.LocalRepositorygetLocalRepository(org.eclipse.aether.repository.LocalRepository repository) org.apache.maven.api.NodegetNode(org.eclipse.aether.graph.DependencyNode node) org.apache.maven.api.NodegetNode(org.eclipse.aether.graph.DependencyNode node, boolean verbose) org.apache.maven.api.RemoteRepositorygetRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository) org.apache.maven.api.RepositorygetRepository(org.eclipse.aether.repository.ArtifactRepository repository) org.eclipse.aether.RepositorySystemorg.eclipse.aether.RepositorySystemSessionorg.apache.maven.api.WorkspaceRepositorygetWorkspaceRepository(org.eclipse.aether.repository.WorkspaceRepository repository) <REQ extends org.apache.maven.api.services.Request<?>, REP extends org.apache.maven.api.services.Result<REQ>>
REPExecutes and optionally caches a request using the provided supplier function.<REQ extends org.apache.maven.api.services.Request<?>, REP extends org.apache.maven.api.services.Result<REQ>>
List<REP> voidsetCurrentTrace(org.apache.maven.api.services.RequestTrace trace) Sets the current request trace for the session.org.eclipse.aether.artifact.ArtifacttoArtifact(org.apache.maven.api.Artifact artifact) org.eclipse.aether.artifact.ArtifacttoArtifact(org.apache.maven.api.ArtifactCoordinates coords) List<org.eclipse.aether.artifact.Artifact> toArtifacts(Collection<? extends org.apache.maven.api.Artifact> artifacts) List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<org.apache.maven.api.DependencyCoordinates> dependencies, boolean managed) org.eclipse.aether.graph.DependencytoDependency(org.apache.maven.api.DependencyCoordinates dependency, boolean managed) List<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<org.apache.maven.api.RemoteRepository> repositories) org.eclipse.aether.repository.LocalRepositorytoRepository(org.apache.maven.api.LocalRepository repository) org.eclipse.aether.repository.RemoteRepositorytoRepository(org.apache.maven.api.RemoteRepository repository) List<org.eclipse.aether.repository.RemoteRepository> toResolvingRepositories(List<org.apache.maven.api.RemoteRepository> repositories) Methods inherited from interface org.apache.maven.api.ProtoSession
getRootDirectory, getStartTime, getSystemProperties, getTopDirectory, getUserProperties, toBuilderMethods inherited from interface org.apache.maven.api.Session
collectDependencies, collectDependencies, collectDependencies, createArtifact, createArtifact, createArtifactCoordinates, createArtifactCoordinates, createArtifactCoordinates, createArtifactCoordinates, createDependencyCoordinates, createDependencyCoordinates, createLocalRepository, createProducedArtifact, createProducedArtifact, createRemoteRepository, createRemoteRepository, deployArtifact, flattenDependencies, getArtifactPath, getData, getDegreeOfConcurrency, getEffectiveProperties, getEffectiveProperties, getListeners, getLocalRepository, getMavenVersion, getPathForLocalArtifact, getPathForRemoteArtifact, getPluginContext, getProjects, getRemoteRepositories, getService, getSettings, getToolchains, installArtifacts, installArtifacts, isVersionSnapshot, parseVersion, parseVersionConstraint, parseVersionRange, registerListener, requireDependencyScope, requireLanguage, requirePackaging, requirePathScope, requireProjectScope, requireType, resolveArtifact, resolveArtifact, resolveArtifact, resolveArtifact, resolveArtifacts, resolveArtifacts, resolveArtifacts, resolveArtifacts, resolveDependencies, resolveDependencies, resolveDependencies, resolveDependencies, resolveDependencies, resolveHighestVersion, resolveVersion, resolveVersionRange, resolveVersionRange, setArtifactPath, unregisterListener, withLocalRepository, withRemoteRepositories
-
Method Details
-
from
-
from
-
associate
static void associate(org.eclipse.aether.RepositorySystemSession rsession, org.apache.maven.api.Session session) -
request
<REQ extends org.apache.maven.api.services.Request<?>, REP extends org.apache.maven.api.services.Result<REQ>> REP request(REQ req, Function<REQ, REP> supplier) Executes and optionally caches a request using the provided supplier function. If caching is enabled for this session, the result will be cached and subsequent identical requests will return the cached value without re-executing the supplier.- Type Parameters:
REQ- The request typeREP- The response type- Parameters:
req- The request object used as the cache keysupplier- The function to execute and cache the result- Returns:
- The result from the supplier (either fresh or cached)
- Throws:
RuntimeException- Any exception thrown by the supplier will be cached and re-thrown on subsequent calls
-
requests
-
getRemoteRepository
org.apache.maven.api.RemoteRepository getRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository) -
getLocalRepository
org.apache.maven.api.LocalRepository getLocalRepository(org.eclipse.aether.repository.LocalRepository repository) -
getWorkspaceRepository
org.apache.maven.api.WorkspaceRepository getWorkspaceRepository(org.eclipse.aether.repository.WorkspaceRepository repository) -
getRepository
org.apache.maven.api.Repository getRepository(org.eclipse.aether.repository.ArtifactRepository repository) -
getNode
org.apache.maven.api.Node getNode(org.eclipse.aether.graph.DependencyNode node) -
getNode
org.apache.maven.api.Node getNode(org.eclipse.aether.graph.DependencyNode node, boolean verbose) -
getArtifact
@Nonnull org.apache.maven.api.Artifact getArtifact(@Nonnull org.eclipse.aether.artifact.Artifact artifact) -
getArtifact
@Nonnull <T extends org.apache.maven.api.Artifact> T getArtifact(@Nonnull Class<T> clazz, @Nonnull org.eclipse.aether.artifact.Artifact artifact) -
getDependency
@Nonnull org.apache.maven.api.Dependency getDependency(@Nonnull org.eclipse.aether.graph.Dependency dependency) -
toRepositories
-
toResolvingRepositories
-
toRepository
org.eclipse.aether.repository.RemoteRepository toRepository(org.apache.maven.api.RemoteRepository repository) -
toRepository
org.eclipse.aether.repository.LocalRepository toRepository(org.apache.maven.api.LocalRepository repository) -
toDependencies
List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<org.apache.maven.api.DependencyCoordinates> dependencies, boolean managed) -
toDependency
org.eclipse.aether.graph.Dependency toDependency(org.apache.maven.api.DependencyCoordinates dependency, boolean managed) -
toArtifacts
List<org.eclipse.aether.artifact.Artifact> toArtifacts(Collection<? extends org.apache.maven.api.Artifact> artifacts) -
toArtifact
org.eclipse.aether.artifact.Artifact toArtifact(org.apache.maven.api.Artifact artifact) -
toArtifact
org.eclipse.aether.artifact.Artifact toArtifact(org.apache.maven.api.ArtifactCoordinates coords) -
getSession
org.eclipse.aether.RepositorySystemSession getSession() -
getRepositorySystem
org.eclipse.aether.RepositorySystem getRepositorySystem() -
setCurrentTrace
void setCurrentTrace(@Nullable org.apache.maven.api.services.RequestTrace trace) Sets the current request trace for the session. The request trace provides contextual information about the current operation being performed and can be used for debugging and monitoring purposes. The trace is stored in thread-local storage, allowing for concurrent operations with different traces.- Parameters:
trace- the trace to set as current, may be null to clear the trace- See Also:
-
getCurrentTrace
org.apache.maven.api.services.RequestTrace getCurrentTrace()Gets the current request trace for the session from thread-local storage. Each thread maintains its own trace context, ensuring thread-safety for concurrent operations.- Returns:
- the current request trace, or null if no trace is set
- See Also:
-
getAllServices
-