mirror of https://github.com/apache/maven.git
o Created UT from MNG-3846
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@729504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cf3b5d2089
commit
3dd7dcecbc
|
@ -302,6 +302,24 @@ public class PomConstructionTest
|
||||||
new File( (String) pom.getValue( "properties/dir2" ) ) );
|
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 )
|
private PomArtifactResolver artifactResolver( String basedir )
|
||||||
{
|
{
|
||||||
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
|
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
|
||||||
|
|
|
@ -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>
|
|
@ -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>
|
Loading…
Reference in New Issue