Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
index 6d53f5a0..b143101a 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
@@ -168,6 +168,7 @@ public class MavenExecutionContext implements IMavenExecutionContext {
.createArtifactTransferListener(monitor));
final MavenProject origProject = mavenSession.getCurrentProject();
final List<MavenProject> origProjects = mavenSession.getProjects();
+ final ClassLoader origTCCL = Thread.currentThread().getContextClassLoader();
try {
if(project != null) {
mavenSession.setCurrentProject(project);
@@ -175,6 +176,7 @@ public class MavenExecutionContext implements IMavenExecutionContext {
}
return callable.call(this, monitor);
} finally {
+ Thread.currentThread().setContextClassLoader(origTCCL);
repositorySession.setTransferListener(origTransferListener);
if(project != null) {
mavenSession.setCurrentProject(origProject);

Back to the top