maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r713506 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-3836/ resources/mng-3836/child/
Date Wed, 12 Nov 2008 20:49:59 GMT
Author: bentmann
Date: Wed Nov 12 12:49:59 2008
New Revision: 713506

URL: http://svn.apache.org/viewvc?rev=713506&view=rev
Log:
[MNG-3836] Inherited plugin configuration is merged with configuration from child whereas
child config should completely override

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml
  (with props)
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3819PluginDepPlexusUtilsTest.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=713506&r1=713505&r2=713506&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
Wed Nov 12 12:49:59 2008
@@ -88,6 +88,7 @@
         // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng3836PluginConfigInheritanceTest.class );
         suite.addTestSuite( MavenITmng3833PomInterpolationDataFlowChainTest.class );
         suite.addTestSuite( MavenITmng3831PomInterpolationTest.class );
         suite.addTestSuite( MavenITmng3827PluginConfigTest.class );

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3819PluginDepPlexusUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3819PluginDepPlexusUtilsTest.java?rev=713506&r1=713505&r2=713506&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3819PluginDepPlexusUtilsTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3819PluginDepPlexusUtilsTest.java
Wed Nov 12 12:49:59 2008
@@ -40,7 +40,7 @@
      * plugin POM for backward-compat with Maven 2.0.5- (due to MNG-2892, plexus-utils is
no longer part of the core
      * class realm in Maven 2.0.6+).
      */
-    public void testitMNG3818()
+    public void testitMNG3819()
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3819"
);

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java?rev=713506&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java
Wed Nov 12 12:49:59 2008
@@ -0,0 +1,78 @@
+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;
+import java.util.Properties;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-3836">MNG-3836</a>.
+ * 
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class MavenITmng3836PluginConfigInheritanceTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng3836PluginConfigInheritanceTest()
+    {
+    }
+
+    /**
+     * Verify that sub modules can *override* inherited plugin configuration.
+     */
+    public void testitMNG3836()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3836"
);
+
+        Verifier verifier = new Verifier( new File( testDir, "child" ).getAbsolutePath()
);
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        Properties props = verifier.loadProperties( "target/plugin-config.properties" );
+
+        assertEquals( "4", props.getProperty( "stringParams" ) );
+        assertEquals( "PASSED-1", props.getProperty( "stringParams.0" ) );
+        assertEquals( "PASSED-3", props.getProperty( "stringParams.1" ) );
+        assertEquals( "PASSED-2", props.getProperty( "stringParams.2" ) );
+        assertEquals( "PASSED-4", props.getProperty( "stringParams.3" ) );
+
+        assertEquals( "4", props.getProperty( "listParam" ) );
+        assertEquals( "PASSED-1", props.getProperty( "listParam.0" ) );
+        assertEquals( "PASSED-3", props.getProperty( "listParam.1" ) );
+        assertEquals( "PASSED-2", props.getProperty( "listParam.2" ) );
+        assertEquals( "PASSED-4", props.getProperty( "listParam.3" ) );
+
+        assertEquals( "4", props.getProperty( "domParam.children" ) );
+        assertEquals( "PASSED-1", props.getProperty( "domParam.children.echo.0.value" ) );
+        assertEquals( "PASSED-3", props.getProperty( "domParam.children.echo.1.value" ) );
+        assertEquals( "PASSED-2", props.getProperty( "domParam.children.echo.2.value" ) );
+        assertEquals( "PASSED-4", props.getProperty( "domParam.children.echo.3.value" ) );
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3836PluginConfigInheritanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml?rev=713506&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml
Wed Nov 12 12:49:59 2008
@@ -0,0 +1,82 @@
+<?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>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng3836</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng3836</groupId>
+  <artifactId>child</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Maven Integration Test :: MNG-3836</name> 
+  <description>
+    Verify that children can *override* inherited plugin configuration.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <!--
+          All of these values should override the ones inherited from the parent. In particular,
collections should not
+          be merged with the values given by the parent POM.
+          -->
+          <propertiesFile>target/plugin-config.properties</propertiesFile>
+          <stringParams>
+            <stringParam>PASSED-1</stringParam>
+            <stringParam>PASSED-3</stringParam>
+            <stringParam>PASSED-2</stringParam>
+            <stringParam>PASSED-4</stringParam>
+          </stringParams>
+          <listParam>
+            <listParam>PASSED-1</listParam>
+            <listParam>PASSED-3</listParam>
+            <listParam>PASSED-2</listParam>
+            <listParam>PASSED-4</listParam>
+          </listParam>
+          <domParam>
+            <echo>PASSED-1</echo>
+            <echo>PASSED-3</echo>
+            <echo>PASSED-2</echo>
+            <echo>PASSED-4</echo>
+          </domParam>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>validate</phase>
+            <goals>
+              <goal>config</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/child/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml?rev=713506&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml
Wed Nov 12 12:49:59 2008
@@ -0,0 +1,77 @@
+<?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.mng3836</groupId>
+  <artifactId>parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-3836</name> 
+  <description>
+    Verify that children can *override* inherited plugin configuration.
+  </description>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-configuration</artifactId>
+          <version>2.1-SNAPSHOT</version>
+          <configuration>
+            <propertiesFile>target/failed.properties</propertiesFile>
+            <stringParams>
+              <stringParam>FAILED-1</stringParam>
+              <stringParam>FAILED-3</stringParam>
+              <stringParam>FAILED-2</stringParam>
+              <stringParam>FAILED-4</stringParam>
+            </stringParams>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <propertiesFile>target/failed.properties</propertiesFile>
+          <listParam>
+            <listParam>FAILED-1</listParam>
+            <listParam>FAILED-3</listParam>
+            <listParam>FAILED-2</listParam>
+            <listParam>FAILED-4</listParam>
+          </listParam>
+          <domParam>
+            <echo>FAILED-1</echo>
+            <echo>FAILED-3</echo>
+            <echo>FAILED-2</echo>
+            <echo>FAILED-4</echo>
+          </domParam>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3836/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message