You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/01/23 17:44:15 UTC

svn commit: r737078 - in /maven/components/trunk/maven-project/src/test: java/org/apache/maven/project/builder/ resources-project-builder/plugin-config-append/ resources-project-builder/plugin-config-append/subproject/

Author: bentmann
Date: Fri Jan 23 08:44:14 2009
New Revision: 737078

URL: http://svn.apache.org/viewvc?rev=737078&view=rev
Log:
o Created UT for MNG-2591

Added:
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml   (with props)
Modified:
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java

Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java?rev=737078&r1=737077&r2=737078&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java Fri Jan 23 08:44:14 2009
@@ -537,6 +537,31 @@
     }
     //*/
 
+    /* FIXME: cf. MNG-2591
+    public void testAppendOfInheritedPluginConfiguration()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "plugin-config-append/subproject" );
+        String prefix = "build/plugins[1]/configuration/";
+        assertEquals( "PARENT-1", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
+        assertEquals( "PARENT-3", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
+        assertEquals( "PARENT-2", pom.getValue( prefix + "stringParams/stringParam[3]" ) );
+        assertEquals( "PARENT-4", pom.getValue( prefix + "stringParams/stringParam[4]" ) );
+        assertEquals( "CHILD-1", pom.getValue( prefix + "stringParams/stringParam[5]" ) );
+        assertEquals( "CHILD-3", pom.getValue( prefix + "stringParams/stringParam[6]" ) );
+        assertEquals( "CHILD-2", pom.getValue( prefix + "stringParams/stringParam[7]" ) );
+        assertEquals( "CHILD-4", pom.getValue( prefix + "stringParams/stringParam[8]" ) );
+        assertEquals( "PARENT-1", pom.getValue( prefix + "listParam/listParam[1]" ) );
+        assertEquals( "PARENT-3", pom.getValue( prefix + "listParam/listParam[2]" ) );
+        assertEquals( "PARENT-2", pom.getValue( prefix + "listParam/listParam[3]" ) );
+        assertEquals( "PARENT-4", pom.getValue( prefix + "listParam/listParam[4]" ) );
+        assertEquals( "CHILD-1", pom.getValue( prefix + "listParam/listParam[5]" ) );
+        assertEquals( "CHILD-3", pom.getValue( prefix + "listParam/listParam[6]" ) );
+        assertEquals( "CHILD-2", pom.getValue( prefix + "listParam/listParam[7]" ) );
+        assertEquals( "CHILD-4", pom.getValue( prefix + "listParam/listParam[8]" ) );
+    }
+    //*/
+
     private PomArtifactResolver artifactResolver( String basedir )
     {
         return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml?rev=737078&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml Fri Jan 23 08:44:14 2009
@@ -0,0 +1,80 @@
+<?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.mng2591</groupId>
+  <artifactId>parent</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-2591</name> 
+  <description>
+    Test aggregation of list configuration items for build plugins when using
+    'combine.children=append' attribute.
+  </description>
+
+  <modules>
+    <module>subproject</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <!-- inherit via <pluginManagement> -->
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-configuration</artifactId>
+          <version>2.1-SNAPSHOT</version>
+          <inherited>true</inherited>
+          <configuration>
+            <listParam>
+              <!-- NOTE: These values are deliberately not in alpha order! -->
+              <listParam>PARENT-1</listParam>
+              <listParam>PARENT-3</listParam>
+              <listParam>PARENT-2</listParam>
+              <listParam>PARENT-4</listParam>
+            </listParam>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <!-- inherit not via <pluginManagement> -->
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <inherited>true</inherited>
+        <configuration>
+          <stringParams>
+            <!-- NOTE: These values are deliberately not in alpha order! -->
+            <stringParam>PARENT-1</stringParam>
+            <stringParam>PARENT-3</stringParam>
+            <stringParam>PARENT-2</stringParam>
+            <stringParam>PARENT-4</stringParam>
+          </stringParams>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml?rev=737078&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml Fri Jan 23 08:44:14 2009
@@ -0,0 +1,70 @@
+<?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.mng2591</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <propertiesFile>target/config.properties</propertiesFile>
+          <stringParams combine.children="append">
+            <!-- NOTE: These values are deliberately not in alpha order! -->
+            <stringParam>CHILD-1</stringParam>
+            <stringParam>CHILD-3</stringParam>
+            <stringParam>CHILD-2</stringParam>
+            <stringParam>CHILD-4</stringParam>
+          </stringParams>
+          <listParam combine.children="append">
+            <!-- NOTE: These values are deliberately not in alpha order! -->
+            <listParam>CHILD-1</listParam>
+            <listParam>CHILD-3</listParam>
+            <listParam>CHILD-2</listParam>
+            <listParam>CHILD-4</listParam>
+          </listParam>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>config</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-config-append/subproject/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision