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/06/11 00:30:55 UTC

svn commit: r783556 - in /maven/components/trunk: maven-core/src/test/java/org/apache/maven/project/ maven-core/src/test/resources-project-builder/contributors-inheritance/ maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/...

Author: bentmann
Date: Wed Jun 10 22:30:55 2009
New Revision: 783556

URL: http://svn.apache.org/viewvc?rev=783556&view=rev
Log:
o Fixed inheritance of <developers>, <contributors>, <licenses> and <mailingLists>

Added:
    maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml   (with props)
    maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml   (with props)
Modified:
    maven/components/trunk/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java

Modified: maven/components/trunk/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=783556&r1=783555&r2=783556&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java (original)
+++ maven/components/trunk/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java Wed Jun 10 22:30:55 2009
@@ -1520,6 +1520,39 @@
         assertSame( null, pom.getValue( "prerequisites" ) );
     }    
 
+    public void testLicensesAreInheritedButNotAggregated()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "licenses-inheritance/child-2" );
+        assertEquals( 1, ( (List<?>) pom.getValue( "licenses" ) ).size() );
+        assertEquals( "child-license", pom.getValue( "licenses[1]/name" ) );
+        assertEquals( "http://child.url/license", pom.getValue( "licenses[1]/url" ) );
+    }    
+
+    public void testDevelopersAreInheritedButNotAggregated()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "developers-inheritance/child-2" );
+        assertEquals( 1, ( (List<?>) pom.getValue( "developers" ) ).size() );
+        assertEquals( "child-developer", pom.getValue( "developers[1]/name" ) );
+    }
+
+    public void testContributorsAreInheritedButNotAggregated()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "contributors-inheritance/child-2" );
+        assertEquals( 1, ( (List<?>) pom.getValue( "contributors" ) ).size() );
+        assertEquals( "child-contributor", pom.getValue( "contributors[1]/name" ) );
+    }    
+
+    public void testMailingListsAreInheritedButNotAggregated()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "mailing-lists-inheritance/child-2" );
+        assertEquals( 1, ( (List<?>) pom.getValue( "mailingLists" ) ).size() );
+        assertEquals( "child-mailing-list", pom.getValue( "mailingLists[1]/name" ) );
+    }    
+
     private void assertPathSuffixEquals( String expected, Object actual )
     {
         String a = actual.toString();

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,45 @@
+<?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>
+
+  <!--
+  While <contributors> are inherited, they are not aggregated, only the child elements are used.
+  -->
+
+  <parent>
+    <groupId>org.apache.maven.its.mng3843</groupId>
+    <artifactId>parent-1</artifactId>
+    <version>0.1</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng3843.child</groupId>
+  <artifactId>child-2</artifactId>
+  <version>0.2</version>
+  <packaging>jar</packaging>
+
+  <contributors>
+    <contributor>
+      <name>child-contributor</name>
+    </contributor>
+  </contributors>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,35 @@
+<?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.mng3843</groupId>
+  <artifactId>parent-1</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <contributors>
+    <contributor>
+      <name>parent-contributor</name>
+    </contributor>
+  </contributors>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/contributors-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,45 @@
+<?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>
+
+  <!--
+  While <developers> are inherited, they are not aggregated, only the child elements are used.
+  -->
+
+  <parent>
+    <groupId>org.apache.maven.its.mng3843</groupId>
+    <artifactId>parent-1</artifactId>
+    <version>0.1</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng3843.child</groupId>
+  <artifactId>child-2</artifactId>
+  <version>0.2</version>
+  <packaging>jar</packaging>
+
+  <developers>
+    <developer>
+      <name>child-developer</name>
+    </developer>
+  </developers>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,35 @@
+<?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.mng3843</groupId>
+  <artifactId>parent-1</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <developers>
+    <developer>
+      <name>parent-developer</name>
+    </developer>
+  </developers>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/developers-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,47 @@
+<?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>
+
+  <!--
+  While <licenses> are inherited, they are not aggregated, only the child licenses are used.
+  -->
+
+  <parent>
+    <groupId>org.apache.maven.its.mng3843</groupId>
+    <artifactId>parent-1</artifactId>
+    <version>0.1</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng3843.child</groupId>
+  <artifactId>child-2</artifactId>
+  <version>0.2</version>
+  <packaging>jar</packaging>
+
+  <licenses>
+    <license>
+      <name>child-license</name>
+      <url>http://child.url/license</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,37 @@
+<?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.mng3843</groupId>
+  <artifactId>parent-1</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <licenses>
+    <license>
+      <name>parent-license</name>
+      <url>http://parent.url/license</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/licenses-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,45 @@
+<?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>
+
+  <!--
+  While <mailingLists> are inherited, they are not aggregated, only the child elements are used.
+  -->
+
+  <parent>
+    <groupId>org.apache.maven.its.mng3843</groupId>
+    <artifactId>parent-1</artifactId>
+    <version>0.1</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng3843.child</groupId>
+  <artifactId>child-2</artifactId>
+  <version>0.2</version>
+  <packaging>jar</packaging>
+
+  <mailingLists>
+    <mailingList>
+      <name>child-mailing-list</name>
+    </mailingList>
+  </mailingLists>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/child-2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml?rev=783556&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml (added)
+++ maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml Wed Jun 10 22:30:55 2009
@@ -0,0 +1,35 @@
+<?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.mng3843</groupId>
+  <artifactId>parent-1</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <mailingLists>
+    <mailingList>
+      <name>parent-mailing-list</name>
+    </mailingList>
+  </mailingLists>
+</project>

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core/src/test/resources-project-builder/mailing-lists-inheritance/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=783556&r1=783555&r2=783556&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java (original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java Wed Jun 10 22:30:55 2009
@@ -31,11 +31,15 @@
 
 import org.apache.maven.model.BuildBase;
 import org.apache.maven.model.CiManagement;
+import org.apache.maven.model.Contributor;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DeploymentRepository;
+import org.apache.maven.model.Developer;
 import org.apache.maven.model.DistributionManagement;
 import org.apache.maven.model.Extension;
 import org.apache.maven.model.IssueManagement;
+import org.apache.maven.model.License;
+import org.apache.maven.model.MailingList;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.ModelBase;
 import org.apache.maven.model.Organization;
@@ -173,6 +177,45 @@
     }
 
     @Override
+    protected void mergeModel_Licenses( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
+    {
+        if ( target.getLicenses().isEmpty() )
+        {
+            target.setLicenses( new ArrayList<License>( source.getLicenses() ) );
+        }
+    }
+
+    @Override
+    protected void mergeModel_Developers( Model target, Model source, boolean sourceDominant,
+                                          Map<Object, Object> context )
+    {
+        if ( target.getDevelopers().isEmpty() )
+        {
+            target.setDevelopers( new ArrayList<Developer>( source.getDevelopers() ) );
+        }
+    }
+
+    @Override
+    protected void mergeModel_Contributors( Model target, Model source, boolean sourceDominant,
+                                            Map<Object, Object> context )
+    {
+        if ( target.getContributors().isEmpty() )
+        {
+            target.setContributors( new ArrayList<Contributor>( source.getContributors() ) );
+        }
+    }
+
+    @Override
+    protected void mergeModel_MailingLists( Model target, Model source, boolean sourceDominant,
+                                            Map<Object, Object> context )
+    {
+        if ( target.getMailingLists().isEmpty() )
+        {
+            target.setMailingLists( new ArrayList<MailingList>( source.getMailingLists() ) );
+        }
+    }
+
+    @Override
     protected void mergeModelBase_Modules( ModelBase target, ModelBase source, boolean sourceDominant,
                                            Map<Object, Object> context )
     {