mirror of
https://github.com/apache/maven.git
synced 2025-02-21 09:28:30 +00:00
[MNG-3846] Inherited URLs are not automatically extended with the child's artifactId
o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@714272 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a9dc16e26
commit
eb7375411f
@ -88,6 +88,7 @@ public static Test suite()
|
||||
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
|
||||
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
|
||||
|
||||
suite.addTestSuite( MavenITmng3846PomInheritanceUrlAdjustmentTest.class );
|
||||
suite.addTestSuite( MavenITmng3845LimitedPomInheritanceTest.class );
|
||||
suite.addTestSuite( MavenITmng3843PomInheritanceTest.class );
|
||||
suite.addTestSuite( MavenITmng3839PomParsingCoalesceTextTest.class );
|
||||
|
@ -0,0 +1,72 @@
|
||||
package org.apache.maven.it;
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-3846">MNG-3846</a>.
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MavenITmng3846PomInheritanceUrlAdjustmentTest
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
|
||||
public MavenITmng3846PomInheritanceUrlAdjustmentTest()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that inheritance of certain URLs automatically appends the child's artifact id.
|
||||
*/
|
||||
public void testitMNG3846()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3846" );
|
||||
|
||||
Verifier verifier = new Verifier( new File( testDir, "child" ).getAbsolutePath() );
|
||||
verifier.setAutoclean( false );
|
||||
verifier.deleteDirectory( "target" );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
Properties props = verifier.loadProperties( "target/pom.properties" );
|
||||
assertEquals( "http://parent.url/child", props.getProperty( "project.url" ) );
|
||||
assertEquals( "http://parent.url/org/", props.getProperty( "project.organization.url" ) );
|
||||
assertEquals( "http://parent.url/license.txt", props.getProperty( "project.licenses.0.url" ) );
|
||||
assertEquals( "http://parent.url/viewvc/child", props.getProperty( "project.scm.url" ) );
|
||||
assertEquals( "http://parent.url/scm/child", props.getProperty( "project.scm.connection" ) );
|
||||
assertEquals( "https://parent.url/scm/child", props.getProperty( "project.scm.developerConnection" ) );
|
||||
assertEquals( "http://parent.url/issues", props.getProperty( "project.issueManagement.url" ) );
|
||||
assertEquals( "http://parent.url/ci", props.getProperty( "project.ciManagement.url" ) );
|
||||
assertEquals( "http://parent.url/dist", props.getProperty( "project.distributionManagement.repository.url" ) );
|
||||
assertEquals( "http://parent.url/snaps", props.getProperty( "project.distributionManagement.snapshotRepository.url" ) );
|
||||
assertEquals( "http://parent.url/site/child", props.getProperty( "project.distributionManagement.site.url" ) );
|
||||
assertEquals( "http://parent.url/download", props.getProperty( "project.distributionManagement.downloadUrl" ) );
|
||||
}
|
||||
|
||||
}
|
74
its/core-it-suite/src/test/resources/mng-3846/pom.xml
Normal file
74
its/core-it-suite/src/test/resources/mng-3846/pom.xml
Normal file
@ -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>
|
59
its/core-it-suite/src/test/resources/mng-3846/sub/pom.xml
Normal file
59
its/core-it-suite/src/test/resources/mng-3846/sub/pom.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?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>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-expression</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>eval</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputFile>target/pom.properties</outputFile>
|
||||
<expressions>
|
||||
<expression>project</expression>
|
||||
</expressions>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user