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 f94313ef13..8216c7f1c9 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 @@ -90,6 +90,7 @@ public class IntegrationTestSuite // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class ); // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng3927PluginDefaultExecutionConfigTest.class ); suite.addTestSuite( MavenITmng3925MergedPluginExecutionOrderTest.class ); suite.addTestSuite( MavenITmng3916PluginExecutionInheritanceTest.class ); suite.addTestSuite( MavenITmng3906MergedPluginClassPathOrderingTest.class ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3927PluginDefaultExecutionConfigTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3927PluginDefaultExecutionConfigTest.java new file mode 100644 index 0000000000..1f266c7e5a --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3927PluginDefaultExecutionConfigTest.java @@ -0,0 +1,61 @@ +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 org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +import java.io.File; + +/** + * This is a test set for MNG-3927. + * + * @author Benjamin Bentmann + * @version $Id$ + */ +public class MavenITmng3927PluginDefaultExecutionConfigTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng3927PluginDefaultExecutionConfigTest() + { + } + + /** + * Test that the configuration for a plugin execution without an identifier does not pollute the configuration + * of default plugin executions introduced by the packaging. + */ + public void testitMNG3927() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3927" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.executeGoal( "process-resources" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier.assertFileNotPresent( "target/failed.txt" ); + verifier.assertFilePresent( "target/resources-resources.txt" ); + } + +} diff --git a/its/core-it-suite/src/test/resources/mng-3927/pom.xml b/its/core-it-suite/src/test/resources/mng-3927/pom.xml new file mode 100644 index 0000000000..9e96467704 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-3927/pom.xml @@ -0,0 +1,58 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng3927 + test + 0.1 + jar + + Maven Integration Test :: MNG-3927 + + Test that the configuration for a plugin execution without an identifier does not pollute the configuration + of default plugin executions introduced by the packaging. + + + + + + org.apache.maven.plugins + maven-resources-plugin + 0.1-stub-SNAPSHOT + + + + verify + + resources + + + + target/failed.txt + + + + + + +