diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index 5d77b31a77..7a828fa519 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -92,6 +92,7 @@ public class IntegrationTestSuite // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class ); // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng4116UndecodedUrlsTest.class ); suite.addTestSuite( MavenITmng4107InterpolationUsesDominantProfileSourceTest.class ); suite.addTestSuite( MavenITmng4106InterpolationUsesDominantProfileTest.class ); suite.addTestSuite( MavenITmng4102InheritedPropertyInterpolationTest.class ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4116UndecodedUrlsTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4116UndecodedUrlsTest.java new file mode 100644 index 0000000000..2574a21c13 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4116UndecodedUrlsTest.java @@ -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 MNG-4116. + * + * @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" ) ); + } + +} diff --git a/its/core-it-suite/src/test/resources/mng-2387/settings-template.xml b/its/core-it-suite/src/test/resources/mng-2387/settings-template.xml index eefd5f3b57..fc51ee991e 100644 --- a/its/core-it-suite/src/test/resources/mng-2387/settings-template.xml +++ b/its/core-it-suite/src/test/resources/mng-2387/settings-template.xml @@ -26,7 +26,7 @@ under the License. false http localhost - + @proxyPort@ diff --git a/its/core-it-suite/src/test/resources/mng-4116/pom.xml b/its/core-it-suite/src/test/resources/mng-4116/pom.xml new file mode 100644 index 0000000000..aced5b3bd0 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4116/pom.xml @@ -0,0 +1,92 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4116 + test + 1.0-SNAPSHOT + jar + + Maven Integration Test :: MNG-4116 + + Test that the project builder does not decode URLs (which must be done by the transport layer instead). + + + + http://maven.apache.org/spacy%20path + + scm:svn:svn+ssh://svn.apache.org/spacy%20path + scm:svn:svn+ssh://svn.apache.org/spacy%20path + http://svn.apache.org/viewvc/spacy%20path + + + none + http://issues.apache.org/spacy%20path + + + none + http://ci.apache.org/spacy%20path + + + + dist + scm:svn:svn+ssh://dist.apache.org/spacy%20path + + + snap + scm:svn:svn+ssh://snap.apache.org/spacy%20path + + + site + scm:svn:svn+ssh://site.apache.org/spacy%20path + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-expression + 2.1-SNAPSHOT + + + validate + + eval + + + target/pom.properties + + project/url + project/scm + project/issueManagement + project/ciManagement + project/distributionManagement + + + + + + + +