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 2008/12/26 17:24:21 UTC
svn commit: r729505 - in /maven/components/trunk/maven-project/src/test:
java/org/apache/maven/project/builder/
resources-project-builder/limited-inheritance/
resources-project-builder/limited-inheritance/child/
Author: bentmann
Date: Fri Dec 26 08:24:20 2008
New Revision: 729505
URL: http://svn.apache.org/viewvc?rev=729505&view=rev
Log:
o Created UT from MNG-3845
Added:
maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/ (with props)
maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/ (with props)
maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml (with props)
maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/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=729505&r1=729504&r2=729505&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 Dec 26 08:24:20 2008
@@ -320,6 +320,22 @@
assertEquals( "http://parent.url/download", pom.getValue( "distributionManagement/downloadUrl" ) );
}
+ public void testNonInheritedElementsInSubtreesOverriddenByChild()
+ throws Exception
+ {
+ PomTestWrapper pom = buildPom( "limited-inheritance/child" );
+ assertEquals( null, pom.getValue( "organization/url" ) );
+ assertEquals( null, pom.getValue( "issueManagement/system" ) );
+ assertEquals( 0, ( (List<?>) pom.getValue( "ciManagement/notifiers" ) ).size() );
+ assertEquals( null, pom.getValue( "distributionManagement/repository/name" ) );
+ assertEquals( true, pom.getValue( "distributionManagement/repository/uniqueVersion" ) );
+ assertEquals( "default", pom.getValue( "distributionManagement/repository/layout" ) );
+ assertEquals( null, pom.getValue( "distributionManagement/snapshotRepository/name" ) );
+ assertEquals( true, pom.getValue( "distributionManagement/snapshotRepository/uniqueVersion" ) );
+ assertEquals( "default", pom.getValue( "distributionManagement/snapshotRepository/layout" ) );
+ assertEquals( null, pom.getValue( "distributionManagement/site/name" ) );
+ }
+
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/limited-inheritance/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml?rev=729505&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml Fri Dec 26 08:24:20 2008
@@ -0,0 +1,61 @@
+<?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.mng3845</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ </parent>
+
+ <artifactId>child</artifactId>
+
+ <organization>
+ <name>child-org</name>
+ </organization>
+
+ <scm>
+ <developerConnection>https://child.url/scm</developerConnection>
+ </scm>
+ <issueManagement>
+ <url>http://child.url/issues</url>
+ </issueManagement>
+ <ciManagement>
+ <system>child-ci</system>
+ <url>http://child.url/ci</url>
+ </ciManagement>
+ <distributionManagement>
+ <repository>
+ <id>child-distros</id>
+ <url>ssh://child.url/distros</url>
+ </repository>
+ <snapshotRepository>
+ <id>child-snaps</id>
+ <url>ssh://child.url/snaps</url>
+ </snapshotRepository>
+ <site>
+ <id>child-site</id>
+ <url>scp://child.url/site</url>
+ </site>
+ </distributionManagement>
+</project>
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/child/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/pom.xml?rev=729505&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/pom.xml Fri Dec 26 08:24:20 2008
@@ -0,0 +1,87 @@
+<?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.mng3845</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-3845</name>
+ <description>
+ Test that inheritance is all-or-nothing for certain sub-trees of the POM.
+ </description>
+
+ <organization>
+ <name>parent-org</name>
+ <url>http://parent.url/org</url>
+ </organization>
+
+ <scm>
+ <url>http://parent.url/viewvc</url>
+ <connection>http://parent.url/scm</connection>
+ <developerConnection>https://parent.url/scm</developerConnection>
+ <tag>parent-tag</tag>
+ </scm>
+ <issueManagement>
+ <system>parent-issues</system>
+ <url>http://parent.url/issues</url>
+ </issueManagement>
+ <ciManagement>
+ <system>parent-ci</system>
+ <url>http://parent.url/ci</url>
+ <notifiers>
+ <notifier>
+ <type>irc</type>
+ <sendOnError>true</sendOnError>
+ <sendOnFailure>true</sendOnFailure>
+ <sendOnSuccess>false</sendOnSuccess>
+ <sendOnWarning>false</sendOnWarning>
+ <configuration>
+ <address>irc://parent.url/#ci</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <distributionManagement>
+ <repository>
+ <id>parent-distros</id>
+ <name>parent-distros</name>
+ <url>ssh://parent.url/distros</url>
+ <uniqueVersion>false</uniqueVersion>
+ <layout>legacy</layout>
+ </repository>
+ <snapshotRepository>
+ <id>parent-snaps</id>
+ <name>parent-snaps</name>
+ <url>ssh://parent.url/snaps</url>
+ <uniqueVersion>false</uniqueVersion>
+ <layout>legacy</layout>
+ </snapshotRepository>
+ <site>
+ <id>parent-site</id>
+ <name>parent-site</name>
+ <url>scp://parent.url/site</url>
+ </site>
+ </distributionManagement>
+</project>
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/limited-inheritance/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision