[MNG-3927] [regression] Configuration of custom plugin execution using default id pollutes configuration of default plugin executions introduced by packaging

o Added IT

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@728129 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-12-19 20:15:12 +00:00
parent d30546c1ee
commit 90c8c3249c
3 changed files with 120 additions and 0 deletions

View File

@ -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 );

View File

@ -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 <a href="http://jira.codehaus.org/browse/MNG-3927">MNG-3927</a>.
*
* @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" );
}
}

View File

@ -0,0 +1,58 @@
<?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>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng3927</groupId>
<artifactId>test</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<name>Maven Integration Test :: MNG-3927</name>
<description>
Test that the configuration for a plugin execution without an identifier does not pollute the configuration
of default plugin executions introduced by the packaging.
</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<executions>
<execution>
<!-- NOTE: <id> element deliberatly omitted to trigger issue. -->
<phase>verify</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<!-- This should not apply to the execution of resources:resources in the process-resources phase -->
<pathname>target/failed.txt</pathname>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>