Revert "MNG-6209 better executeMojo thread context classloader"

This reverts commit 4a0ba2b0bdf1cbe92c9f66eb334ffc31de77f4bb.
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 7d55871..f7a06ff 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -700,7 +700,6 @@
         suite.addTestSuite( MavenIT0010DependencyClosureResolutionTest.class );
         suite.addTestSuite( MavenIT0009GoalConfigurationTest.class );
         suite.addTestSuite( MavenIT0008SimplePluginTest.class );
-        suite.addTestSuite( MavenITmng6209MultipleBuildExtensions.class );
         suite.addTestSuite( MavenITmng6210CoreExtensionsCustomScopesTest.class );
 
         /*
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6209MultipleBuildExtensions.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6209MultipleBuildExtensions.java
deleted file mode 100644
index 08f6313..0000000
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6209MultipleBuildExtensions.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.it;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-import java.io.File;
-
-import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.shared.utils.io.FileUtils;
-
-public class MavenITmng6209MultipleBuildExtensions extends AbstractMavenIntegrationTestCase {
-
-  public MavenITmng6209MultipleBuildExtensions() {
-    super("(3.5.0,)");
-  }
-
-  public void testBuildExtensionClassloader() throws Exception {
-    File testDir =
-        ResourceExtractor.simpleExtractResources(getClass(), "/mng-6209-multiple-build-extensions");
-    File pluginADir = new File(testDir, "plugin-a");
-    File pluginBDir = new File(testDir, "plugin-b");
-    File projectDir = new File(testDir, "project");
-
-    Verifier verifier;
-
-    // install the test plugins
-    verifier = newVerifier(pluginADir.getAbsolutePath(), "remote");
-    verifier.executeGoal("install");
-    verifier.resetStreams();
-    verifier.verifyErrorFreeLog();
-    //
-    verifier = newVerifier(pluginBDir.getAbsolutePath(), "remote");
-    verifier.executeGoal("install");
-    verifier.resetStreams();
-    verifier.verifyErrorFreeLog();
-
-    // build the test project
-    verifier = newVerifier(projectDir.getAbsolutePath(), "remote");
-    verifier.executeGoal("validate");
-    verifier.resetStreams();
-    verifier.verifyErrorFreeLog();
-    verifier.assertFilePresent("target/executions.txt");
-
-    String[] executions = FileUtils.fileReadArray(new File(projectDir, "target/executions.txt"));
-    assertEquals(2, executions.length);
-    assertEquals(
-        "mng-6209-multiple-build-extensions:mng-6209-multiple-build-extensions-plugin-a:0.1:test {execution: test}",
-        executions[0]);
-    assertEquals(
-        "mng-6209-multiple-build-extensions:mng-6209-multiple-build-extensions-plugin-b:0.1:test {execution: test}",
-        executions[1]);
-  }
-}
diff --git a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/pom.xml b/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/pom.xml
deleted file mode 100644
index 48a4709..0000000
--- a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>mng-6209-multiple-build-extensions</groupId>
-  <artifactId>mng-6209-multiple-build-extensions-plugin-a</artifactId>
-  <version>0.1</version>
-  <packaging>maven-plugin</packaging>
-
-  <properties>
-    <maven-version>3.2.1</maven-version>
-    <maven.compiler.source>1.5</maven.compiler.source>
-    <maven.compiler.target>1.5</maven.compiler.target>    
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>${maven-version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-model</artifactId>
-      <version>${maven-version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-core</artifactId>
-      <version>${maven-version}</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.sonatype.plugins</groupId>
-        <artifactId>sisu-maven-plugin</artifactId>
-        <version>1.1</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>main-index</goal>
-              <goal>test-index</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/plugina/BuildExtensionAComponent.java b/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/plugina/BuildExtensionAComponent.java
deleted file mode 100644
index 93350dd..0000000
--- a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/plugina/BuildExtensionAComponent.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.apache.maven.its.mng6209.multiple.build.extensions.plugina;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.Set;
-import java.util.TreeSet;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.apache.maven.AbstractMavenLifecycleParticipant;
-import org.apache.maven.MavenExecutionException;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.execution.MojoExecutionEvent;
-import org.apache.maven.execution.MojoExecutionListener;
-import org.apache.maven.plugin.MojoExecutionException;
-
-@Named
-@Singleton
-public class BuildExtensionAComponent
-    extends AbstractMavenLifecycleParticipant
-    implements MojoExecutionListener
-{
-    public static final String FILE_PATH = "target/executions.txt";
-
-    private final Set<String> executions = new TreeSet<String>();
-
-    @Override
-    public void afterSessionEnd( MavenSession session )
-        throws MavenExecutionException
-    {
-        try
-        {
-            File file = new File( session.getTopLevelProject().getBasedir(), FILE_PATH );
-            file.getParentFile().mkdirs();
-            Writer w = new OutputStreamWriter( new FileOutputStream( file, false ), "UTF-8" );
-            try
-            {
-                for (String execution : executions)
-                {
-                    w.write( execution + "\n" );
-                }
-            }
-            finally
-            {
-                w.close();
-            }
-        }
-        catch ( IOException e )
-        {
-            throw new RuntimeException( e.getMessage(), e );
-        }
-
-    }
-
-    public void beforeMojoExecution( MojoExecutionEvent event )
-        throws MojoExecutionException
-    {
-        executions.add( event.getExecution().toString() );
-    }
-
-    public void afterMojoExecutionSuccess( MojoExecutionEvent event )
-        throws MojoExecutionException
-    {
-    }
-
-    public void afterExecutionFailure( MojoExecutionEvent event )
-    {
-    }
-}
diff --git a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/plugina/BuildExtensionAMojo.java b/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/plugina/BuildExtensionAMojo.java
deleted file mode 100644
index 73f5553..0000000
--- a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/plugina/BuildExtensionAMojo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.apache.maven.its.mng6209.multiple.build.extensions.plugina;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * @goal test
- */
-public class BuildExtensionAMojo
-    extends AbstractMojo
-{
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-    }
-}
diff --git a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/pom.xml b/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/pom.xml
deleted file mode 100644
index 2b97ace..0000000
--- a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>mng-6209-multiple-build-extensions</groupId>
-  <artifactId>mng-6209-multiple-build-extensions-plugin-b</artifactId>
-  <version>0.1</version>
-  <packaging>maven-plugin</packaging>
-
-  <properties>
-    <maven-version>3.2.1</maven-version>
-    <maven.compiler.source>1.5</maven.compiler.source>
-    <maven.compiler.target>1.5</maven.compiler.target>    
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>${maven-version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-model</artifactId>
-      <version>${maven-version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-core</artifactId>
-      <version>${maven-version}</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.sonatype.plugins</groupId>
-        <artifactId>sisu-maven-plugin</artifactId>
-        <version>1.1</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>main-index</goal>
-              <goal>test-index</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/pluginb/BuildExtensionBMojo.java b/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/pluginb/BuildExtensionBMojo.java
deleted file mode 100644
index b57ad5a..0000000
--- a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/src/main/java/org/apache/maven/its/mng6209/multiple/build/extensions/pluginb/BuildExtensionBMojo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.apache.maven.its.mng6209.multiple.build.extensions.pluginb;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * @goal test
- */
-public class BuildExtensionBMojo
-    extends AbstractMojo
-{
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-    }
-}
diff --git a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/project/pom.xml b/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/project/pom.xml
deleted file mode 100644
index 313116f..0000000
--- a/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/project/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>mng-6209-multiple-build-extensions</groupId>
-  <artifactId>mng-6209-multiple-build-extensions-project</artifactId>
-  <version>0.1</version>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>mng-6209-multiple-build-extensions</groupId>
-        <artifactId>mng-6209-multiple-build-extensions-plugin-a</artifactId>
-        <version>0.1</version>
-        <extensions>true</extensions>
-        <executions>
-          <execution>
-            <id>test</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <phase>validate</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>mng-6209-multiple-build-extensions</groupId>
-        <artifactId>mng-6209-multiple-build-extensions-plugin-b</artifactId>
-        <version>0.1</version>
-        <extensions>true</extensions>
-        <executions>
-          <execution>
-            <id>test</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <phase>validate</phase>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>