Author: bentmann Date: Fri Dec 26 08:11:47 2008 New Revision: 729504 URL: http://svn.apache.org/viewvc?rev=729504&view=rev Log: o Created UT from MNG-3846
Added: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/ (with props) maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml (with props) maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/ (with props) maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/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=729504&r1=729503&r2=729504&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:11:47 2008 @@ -302,6 +302,24 @@ new File( (String) pom.getValue( "properties/dir2" ) ) ); } + public void testAppendArtifactIdOfChildToInheritedUrls() + throws Exception + { + PomTestWrapper pom = buildPom( "url-inheritance/sub" ); + assertEquals( "http://parent.url/child", pom.getValue( "url" ) ); + assertEquals( "http://parent.url/org/", pom.getValue( "organization/url" ) ); + assertEquals( "http://parent.url/license.txt", pom.getValue( "licenses[1]/url" ) ); + assertEquals( "http://parent.url/viewvc/child", pom.getValue( "scm/url" ) ); + assertEquals( "http://parent.url/scm/child", pom.getValue( "scm/connection" ) ); + assertEquals( "https://parent.url/scm/child", pom.getValue( "scm/developerConnection" ) ); + assertEquals( "http://parent.url/issues", pom.getValue( "issueManagement/url" ) ); + assertEquals( "http://parent.url/ci", pom.getValue( "ciManagement/url" ) ); + assertEquals( "http://parent.url/dist", pom.getValue( "distributionManagement/repository/url" ) ); + assertEquals( "http://parent.url/snaps", pom.getValue( "distributionManagement/snapshotRepository/url" ) ); + assertEquals( "http://parent.url/site/child", pom.getValue( "distributionManagement/site/url" ) ); + assertEquals( "http://parent.url/download", pom.getValue( "distributionManagement/downloadUrl" ) ); + } + 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/url-inheritance/ ------------------------------------------------------------------------------ bugtraq:label = Enter issue ID: Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/ ------------------------------------------------------------------------------ bugtraq:message = Issue id: %BUGID% Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/ ------------------------------------------------------------------------------ bugtraq:number = false Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/ ------------------------------------------------------------------------------ bugtraq:url = http://jira.codehaus.org/browse/%BUGID% Added: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml?rev=729504&view=auto ============================================================================== --- maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml (added) +++ maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml Fri Dec 26 08:11:47 2008 @@ -0,0 +1,74 @@ +<?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.mng3846</groupId> + <artifactId>parent</artifactId> + <version>0.1</version> + <packaging>pom</packaging> + + <name>Maven Integration Test :: MNG-3846</name> + <description> + Test that inheritance of certain URLs automatically appends the child's artifact id. + </description> + + <url>http://parent.url/</url> + <organization> + <name>parent-org</name> + <url>http://parent.url/org/</url> + </organization> + <licenses> + <license> + <name>parent-license</name> + <url>http://parent.url/license.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + + <scm> + <url>http://parent.url/viewvc</url> + <connection>http://parent.url/scm</connection> + <developerConnection>https://parent.url/scm</developerConnection> + </scm> + <issueManagement> + <url>http://parent.url/issues</url> + </issueManagement> + <ciManagement> + <url>http://parent.url/ci</url> + </ciManagement> + <distributionManagement> + <repository> + <url>http://parent.url/dist</url> + <id>parent.distros</id> + </repository> + <snapshotRepository> + <url>http://parent.url/snaps</url> + <id>parent.snaps</id> + </snapshotRepository> + <site> + <url>http://parent.url/site</url> + <id>parent.site</id> + </site> + <downloadUrl>http://parent.url/download</downloadUrl> + </distributionManagement> +</project> Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/ ------------------------------------------------------------------------------ bugtraq:label = Enter issue ID: Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/ ------------------------------------------------------------------------------ bugtraq:message = Issue id: %BUGID% Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/ ------------------------------------------------------------------------------ bugtraq:number = false Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/ ------------------------------------------------------------------------------ bugtraq:url = http://jira.codehaus.org/browse/%BUGID% Added: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/pom.xml URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/pom.xml?rev=729504&view=auto ============================================================================== --- maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/pom.xml (added) +++ maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/pom.xml Fri Dec 26 08:11:47 2008 @@ -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> + + <!-- NOTE: The base directory name of this project deliberately does not match its artifact id! --> + + <parent> + <groupId>org.apache.maven.its.mng3846</groupId> + <artifactId>parent</artifactId> + <version>0.1</version> + </parent> + + <artifactId>child</artifactId> + <name>Child Project</name> +</project> Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/url-inheritance/sub/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision