From 3e30408e3775b3a2aa134ce405ad5b7eac328482 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Wed, 25 Mar 2009 21:09:53 +0000 Subject: [PATCH] [MNG-2591] Plugins are merged incorrectly o Extended IT to exhibit negative side-effects of profile injection git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@758437 13f79535-47bb-0310-9956-ffa450edef68 --- ...mng2591MergeInheritedPluginConfigTest.java | 24 ++++- .../mng-2591/{ => no-profile}/pom.xml | 0 .../{ => no-profile}/subproject/pom.xml | 0 .../resources/mng-2591/with-profile/pom.xml | 90 +++++++++++++++++++ .../mng-2591/with-profile/subproject/pom.xml | 80 +++++++++++++++++ 5 files changed, 190 insertions(+), 4 deletions(-) rename its/core-it-suite/src/test/resources/mng-2591/{ => no-profile}/pom.xml (100%) rename its/core-it-suite/src/test/resources/mng-2591/{ => no-profile}/subproject/pom.xml (100%) create mode 100644 its/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-2591/with-profile/subproject/pom.xml diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java index 859d8a1a24..e7979009a2 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java @@ -41,13 +41,29 @@ public class MavenITmng2591MergeInheritedPluginConfigTest } /** - * Test aggregation of list configuration items for build plugins when using - * 'combine.children=append' attribute. + * Test aggregation of list configuration items for build plugins when using 'combine.children=append' attribute. + * This variation of the test does not employ profiles. */ - public void testitMNG2591() + public void testitNoProfile() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2591" ); + testit( "no-profile" ); + } + + /** + * Test aggregation of list configuration items for build plugins when using 'combine.children=append' attribute. + * This variation of the test employs active profiles which however are empty and should not change the result. + */ + public void testitWithProfile() + throws Exception + { + testit( "with-profile" ); + } + + private void testit( String project ) + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2591/" + project ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); verifier.setAutoclean( false ); verifier.deleteDirectory( "subproject/target" ); diff --git a/its/core-it-suite/src/test/resources/mng-2591/pom.xml b/its/core-it-suite/src/test/resources/mng-2591/no-profile/pom.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-2591/pom.xml rename to its/core-it-suite/src/test/resources/mng-2591/no-profile/pom.xml diff --git a/its/core-it-suite/src/test/resources/mng-2591/subproject/pom.xml b/its/core-it-suite/src/test/resources/mng-2591/no-profile/subproject/pom.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-2591/subproject/pom.xml rename to its/core-it-suite/src/test/resources/mng-2591/no-profile/subproject/pom.xml diff --git a/its/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml b/its/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml new file mode 100644 index 0000000000..48a8d393ba --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-2591/with-profile/pom.xml @@ -0,0 +1,90 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng2591 + parent + 1.0 + pom + + Maven Integration Test :: MNG-2591 + + Test aggregation of list configuration items for build plugins when using + 'combine.children=append' attribute. + + + + subproject + + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-configuration + 2.1-SNAPSHOT + true + + + + PARENT-1 + PARENT-3 + PARENT-2 + PARENT-4 + + + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-configuration + 2.1-SNAPSHOT + true + + + + PARENT-1 + PARENT-3 + PARENT-2 + PARENT-4 + + + + + + + + + + parent + + true + + + + diff --git a/its/core-it-suite/src/test/resources/mng-2591/with-profile/subproject/pom.xml b/its/core-it-suite/src/test/resources/mng-2591/with-profile/subproject/pom.xml new file mode 100644 index 0000000000..7023503089 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-2591/with-profile/subproject/pom.xml @@ -0,0 +1,80 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.mng2591 + parent + 1.0 + + + subproject + 1.0 + jar + + + + + org.apache.maven.its.plugins + maven-it-plugin-configuration + 2.1-SNAPSHOT + + target/config.properties + + + CHILD-1 + CHILD-3 + CHILD-2 + CHILD-4 + + + + CHILD-1 + CHILD-3 + CHILD-2 + CHILD-4 + + + + + test + validate + + config + + + + + + + + + + + child + + true + + + +