Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2013-06-14 14:54:56 -0400
committerIgor Fedorenko2013-06-15 15:54:11 -0400
commitd3d72dd5f8f7b003c6619d18cb1b98d7ea6df932 (patch)
treefbb58f5603d766e09c39b37421141389b17878d2
parentd402570a8b8dafd1270e32d893c506c60ef63281 (diff)
downloadm2e-core-d3d72dd5f8f7b003c6619d18cb1b98d7ea6df932.tar.gz
m2e-core-d3d72dd5f8f7b003c6619d18cb1b98d7ea6df932.tar.xz
m2e-core-d3d72dd5f8f7b003c6619d18cb1b98d7ea6df932.zip
fixed wrong maven execution context use in MavenProjectManager#execute
Reworked MavenProjectManager#execute to execute facade.getMavenProject inside expected maven execution context. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectManager.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectManager.java
index 0552da98..580e4e98 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/MavenProjectManager.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.apache.maven.execution.MavenExecutionRequest;
import org.eclipse.m2e.core.embedder.ICallable;
+import org.eclipse.m2e.core.embedder.IMavenExecutionContext;
import org.eclipse.m2e.core.internal.embedder.MavenExecutionContext;
import org.eclipse.m2e.core.project.IMavenProjectChangedListener;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -115,9 +116,13 @@ public class MavenProjectManager implements IMavenProjectRegistry {
return createExecutionRequest(project.getPom(), project.getResolverConfiguration(), monitor);
}
- public <V> V execute(IMavenProjectFacade facade, ICallable<V> callable, IProgressMonitor monitor)
+ public <V> V execute(final IMavenProjectFacade facade, final ICallable<V> callable, IProgressMonitor monitor)
throws CoreException {
MavenExecutionContext context = manager.createExecutionContext(facade.getPom(), facade.getResolverConfiguration());
- return context.execute(facade.getMavenProject(monitor), callable, monitor);
+ return context.execute(new ICallable<V>() {
+ public V call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException {
+ return context.execute(facade.getMavenProject(monitor), callable, monitor);
+ }
+ }, monitor);
}
}

Back to the top