diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index 7d558711ea..f7a06ff4c0 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -700,7 +700,6 @@ public class IntegrationTestSuite suite.addTestSuite( MavenIT0010DependencyClosureResolutionTest.class ); suite.addTestSuite( MavenIT0009GoalConfigurationTest.class ); suite.addTestSuite( MavenIT0008SimplePluginTest.class ); - suite.addTestSuite( MavenITmng6209MultipleBuildExtensions.class ); suite.addTestSuite( MavenITmng6210CoreExtensionsCustomScopesTest.class ); /* diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6209MultipleBuildExtensions.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6209MultipleBuildExtensions.java deleted file mode 100644 index 08f6313a90..0000000000 --- a/its/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/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/pom.xml b/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/pom.xml deleted file mode 100644 index 48a4709c51..0000000000 --- a/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-a/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - 4.0.0 - - mng-6209-multiple-build-extensions - mng-6209-multiple-build-extensions-plugin-a - 0.1 - maven-plugin - - - 3.2.1 - 1.5 - 1.5 - - - - - org.apache.maven - maven-plugin-api - ${maven-version} - provided - - - org.apache.maven - maven-model - ${maven-version} - provided - - - org.apache.maven - maven-core - ${maven-version} - provided - - - - - - - org.sonatype.plugins - sisu-maven-plugin - 1.1 - - - - main-index - test-index - - - - - - - diff --git a/its/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/its/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 93350dd358..0000000000 --- a/its/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 executions = new TreeSet(); - - @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/its/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/its/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 73f5553e62..0000000000 --- a/its/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/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/pom.xml b/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/pom.xml deleted file mode 100644 index 2b97aceff9..0000000000 --- a/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/plugin-b/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - 4.0.0 - - mng-6209-multiple-build-extensions - mng-6209-multiple-build-extensions-plugin-b - 0.1 - maven-plugin - - - 3.2.1 - 1.5 - 1.5 - - - - - org.apache.maven - maven-plugin-api - ${maven-version} - provided - - - org.apache.maven - maven-model - ${maven-version} - provided - - - org.apache.maven - maven-core - ${maven-version} - provided - - - - - - - org.sonatype.plugins - sisu-maven-plugin - 1.1 - - - - main-index - test-index - - - - - - - diff --git a/its/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/its/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 b57ad5ae64..0000000000 --- a/its/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/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/project/pom.xml b/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/project/pom.xml deleted file mode 100644 index 313116f996..0000000000 --- a/its/core-it-suite/src/test/resources/mng-6209-multiple-build-extensions/project/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - 4.0.0 - - mng-6209-multiple-build-extensions - mng-6209-multiple-build-extensions-project - 0.1 - - - - - mng-6209-multiple-build-extensions - mng-6209-multiple-build-extensions-plugin-a - 0.1 - true - - - test - - test - - validate - - - - - mng-6209-multiple-build-extensions - mng-6209-multiple-build-extensions-plugin-b - 0.1 - true - - - test - - test - - validate - - - - - -