mirror of https://github.com/apache/maven.git
[MNG-4116] [regression] Effective POM contains invalid URLs upon usage of percent-encoded characters
o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@759726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
19c414bee1
commit
5fc9b4ad35
|
@ -92,6 +92,7 @@ public class IntegrationTestSuite
|
||||||
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
|
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
|
||||||
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
|
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
|
||||||
|
|
||||||
|
suite.addTestSuite( MavenITmng4116UndecodedUrlsTest.class );
|
||||||
suite.addTestSuite( MavenITmng4107InterpolationUsesDominantProfileSourceTest.class );
|
suite.addTestSuite( MavenITmng4107InterpolationUsesDominantProfileSourceTest.class );
|
||||||
suite.addTestSuite( MavenITmng4106InterpolationUsesDominantProfileTest.class );
|
suite.addTestSuite( MavenITmng4106InterpolationUsesDominantProfileTest.class );
|
||||||
suite.addTestSuite( MavenITmng4102InheritedPropertyInterpolationTest.class );
|
suite.addTestSuite( MavenITmng4102InheritedPropertyInterpolationTest.class );
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
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 java.io.File;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.apache.maven.it.Verifier;
|
||||||
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4116">MNG-4116</a>.
|
||||||
|
*
|
||||||
|
* @author Benjamin Bentmann
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class MavenITmng4116UndecodedUrlsTest
|
||||||
|
extends AbstractMavenIntegrationTestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
public MavenITmng4116UndecodedUrlsTest()
|
||||||
|
{
|
||||||
|
super( ALL_MAVEN_VERSIONS );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that the project builder does not decode URLs (which must be done by the transport layer instead).
|
||||||
|
*/
|
||||||
|
public void testitMNG4116()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4116" );
|
||||||
|
|
||||||
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.executeGoal( "validate" );
|
||||||
|
verifier.verifyErrorFreeLog();
|
||||||
|
verifier.resetStreams();
|
||||||
|
|
||||||
|
Properties props = verifier.loadProperties( "target/pom.properties" );
|
||||||
|
|
||||||
|
assertEquals( "http://maven.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.url" ) );
|
||||||
|
|
||||||
|
assertEquals( "http://svn.apache.org/viewvc/spacy%20path",
|
||||||
|
props.getProperty( "project.scm.url" ) );
|
||||||
|
assertEquals( "scm:svn:svn+ssh://svn.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.scm.connection" ) );
|
||||||
|
assertEquals( "scm:svn:svn+ssh://svn.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.scm.developerConnection" ) );
|
||||||
|
|
||||||
|
assertEquals( "http://ci.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.ciManagement.url" ) );
|
||||||
|
|
||||||
|
assertEquals( "http://issues.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.issueManagement.url" ) );
|
||||||
|
|
||||||
|
assertEquals( "scm:svn:svn+ssh://dist.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.distributionManagement.repository.url" ) );
|
||||||
|
assertEquals( "scm:svn:svn+ssh://snap.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.distributionManagement.snapshotRepository.url" ) );
|
||||||
|
assertEquals( "scm:svn:svn+ssh://site.apache.org/spacy%20path",
|
||||||
|
props.getProperty( "project.distributionManagement.site.url" ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -26,7 +26,7 @@ under the License.
|
||||||
<active>false</active>
|
<active>false</active>
|
||||||
<protocol>http</protocol>
|
<protocol>http</protocol>
|
||||||
<host>localhost</host>
|
<host>localhost</host>
|
||||||
<!-- NOTE: We need to point at a reachable server here or Java simply fails back to a non-proxied connection -->
|
<!-- NOTE: We need to point at a reachable server here or Java simply falls back to a non-proxied connection -->
|
||||||
<port>@proxyPort@</port>
|
<port>@proxyPort@</port>
|
||||||
</proxy>
|
</proxy>
|
||||||
</proxies>
|
</proxies>
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?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.mng4116</groupId>
|
||||||
|
<artifactId>test</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: MNG-4116</name>
|
||||||
|
<description>
|
||||||
|
Test that the project builder does not decode URLs (which must be done by the transport layer instead).
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<!-- some URLs using percent-encoded characters -->
|
||||||
|
<url>http://maven.apache.org/spacy%20path</url>
|
||||||
|
<scm>
|
||||||
|
<connection>scm:svn:svn+ssh://svn.apache.org/spacy%20path</connection>
|
||||||
|
<developerConnection>scm:svn:svn+ssh://svn.apache.org/spacy%20path</developerConnection>
|
||||||
|
<url>http://svn.apache.org/viewvc/spacy%20path</url>
|
||||||
|
</scm>
|
||||||
|
<issueManagement>
|
||||||
|
<system>none</system>
|
||||||
|
<url>http://issues.apache.org/spacy%20path</url>
|
||||||
|
</issueManagement>
|
||||||
|
<ciManagement>
|
||||||
|
<system>none</system>
|
||||||
|
<url>http://ci.apache.org/spacy%20path</url>
|
||||||
|
</ciManagement>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>dist</id>
|
||||||
|
<url>scm:svn:svn+ssh://dist.apache.org/spacy%20path</url>
|
||||||
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>snap</id>
|
||||||
|
<url>scm:svn:svn+ssh://snap.apache.org/spacy%20path</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
<site>
|
||||||
|
<id>site</id>
|
||||||
|
<url>scm:svn:svn+ssh://site.apache.org/spacy%20path</url>
|
||||||
|
</site>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<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/url</expression>
|
||||||
|
<expression>project/scm</expression>
|
||||||
|
<expression>project/issueManagement</expression>
|
||||||
|
<expression>project/ciManagement</expression>
|
||||||
|
<expression>project/distributionManagement</expression>
|
||||||
|
</expressions>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
Loading…
Reference in New Issue