Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2016-06-21 12:26:23 -0400
committerIgor Fedorenko2016-06-21 12:26:23 -0400
commit8f632accfd5376bf2ab32ddd4cbcabf4015faa36 (patch)
tree53b9b90b6706154fadb4138dbc31736154223d07 /org.eclipse.m2e.core
parentc9e38071f13d784dcf36f32f90b0e017752aa40e (diff)
downloadm2e-core-8f632accfd5376bf2ab32ddd4cbcabf4015faa36.tar.gz
m2e-core-8f632accfd5376bf2ab32ddd4cbcabf4015faa36.tar.xz
m2e-core-8f632accfd5376bf2ab32ddd4cbcabf4015faa36.zip
496492 fixed MavenExecutionContext#executeBare does not reset thread context classloader
Change-Id: I5ea0fc9aebc1e2329214785123153db49f0cdaa1 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
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