public class MavenExecutionContext extends Object implements IMavenExecutionContext
Constructor and Description |
---|
MavenExecutionContext(MavenImpl maven) |
Modifier and Type | Method and Description |
---|---|
<V> V |
execute(ICallable<V> callable,
org.eclipse.core.runtime.IProgressMonitor monitor) |
<V> V |
execute(org.apache.maven.project.MavenProject project,
ICallable<V> callable,
org.eclipse.core.runtime.IProgressMonitor monitor) |
org.apache.maven.execution.MavenExecutionRequest |
getExecutionRequest()
Can be called outside of
IMavenExecutionContext.execute(ICallable, IProgressMonitor) to configure Maven session parameters. |
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository() |
org.eclipse.m2e.core.internal.embedder.FilterRepositorySystemSession |
getRepositorySession() |
org.apache.maven.execution.MavenSession |
getSession() |
static MavenExecutionContext |
getThreadContext() |
static MavenExecutionContext |
getThreadContext(boolean innermost) |
<T> T |
getValue(String key) |
protected org.apache.maven.execution.MavenExecutionRequest |
newExecutionRequest() |
org.apache.maven.project.ProjectBuildingRequest |
newProjectBuildingRequest() |
static void |
populateSystemProperties(org.apache.maven.execution.MavenExecutionRequest request) |
static void |
resume(Deque<MavenExecutionContext> queue)
Resumes Maven execution context suspended with
suspend() . |
<T> void |
setValue(String key,
T value) |
static Deque<MavenExecutionContext> |
suspend()
Suspends current Maven execution context, if any.
|
public MavenExecutionContext(MavenImpl maven)
public org.apache.maven.execution.MavenExecutionRequest getExecutionRequest() throws org.eclipse.core.runtime.CoreException
IMavenExecutionContext
IMavenExecutionContext.execute(ICallable, IProgressMonitor)
to configure Maven session parameters. For
nested contexts, invocation of this method triggers creation of new nested session. When called during
IMavenExecutionContext.execute(MavenProject, ICallable, IProgressMonitor)
, only getter request methods are allowed and all
request setter or modifier will through IllegalStateException
.getExecutionRequest
in interface IMavenExecutionContext
org.eclipse.core.runtime.CoreException
protected org.apache.maven.execution.MavenExecutionRequest newExecutionRequest() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public <V> V execute(ICallable<V> callable, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
execute
in interface IMavenExecutionContext
org.eclipse.core.runtime.CoreException
public <V> V execute(org.apache.maven.project.MavenProject project, ICallable<V> callable, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
execute
in interface IMavenExecutionContext
org.eclipse.core.runtime.CoreException
public org.apache.maven.execution.MavenSession getSession()
getSession
in interface IMavenExecutionContext
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
getLocalRepository
in interface IMavenExecutionContext
public org.eclipse.m2e.core.internal.embedder.FilterRepositorySystemSession getRepositorySession()
getRepositorySession
in interface IMavenExecutionContext
public static MavenExecutionContext getThreadContext()
public static MavenExecutionContext getThreadContext(boolean innermost)
public static void populateSystemProperties(org.apache.maven.execution.MavenExecutionRequest request)
public org.apache.maven.project.ProjectBuildingRequest newProjectBuildingRequest()
newProjectBuildingRequest
in interface IMavenExecutionContext
public static Deque<MavenExecutionContext> suspend()
null
if there was no context
associated with the current thread.resume(Deque)
public static void resume(Deque<MavenExecutionContext> queue)
suspend()
.resume(Deque)
public <T> T getValue(String key)
public <T> void setValue(String key, T value)
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.