Author: bentmann Date: Sat Jan 8 14:45:29 2011 New Revision: 1056719 URL: http://svn.apache.org/viewvc?rev=1056719&view=rev Log: [MNG-4966] Preserve double slashes in the scm connection url - identifies absolute repository paths for mercurial
o Added IT Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml (with props) Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=1056719&r1=1056718&r2=1056719&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Sat Jan 8 14:45:29 2011 @@ -83,6 +83,7 @@ public class IntegrationTestSuite // ------------------------------------------------------------------------------------------------------------- // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng4966AbnormalUrlPreservationTest.class ); suite.addTestSuite( MavenITmng4955LocalVsRemoteSnapshotResolutionTest.class ); suite.addTestSuite( MavenITmng4952MetadataReleaseInfoUpdateTest.class ); suite.addTestSuite( MavenITmng4936EventSpyTest.class ); Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java?rev=1056719&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java Sat Jan 8 14:45:29 2011 @@ -0,0 +1,65 @@ +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-4966">MNG-4966</a>. + * + * @author Benjamin Bentmann + */ +public class MavenITmng4966AbnormalUrlPreservationTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4966AbnormalUrlPreservationTest() + { + super( "[2.0.3,3.0-alpha-1),[3.0.2,)" ); + } + + /** + * Verify that URLs in the effective model retain successive slashes which are significant in certain domains. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4966" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + Properties props = verifier.loadProperties( "target/pom.properties" ); + assertEquals( "file:////UNC/server/dir/", props.getProperty( "project.url" ) ); + assertEquals( "ssh://localhost//home/user/", props.getProperty( "project.scm.url" ) ); + assertEquals( "scm:hg:ssh://localhost//home/user/", props.getProperty( "project.scm.connection" ) ); + assertEquals( "[fetch=]http://server.org/[push=]ssh://server.org/", + props.getProperty( "project.scm.developerConnection" ) ); + } + +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4966AbnormalUrlPreservationTest.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml?rev=1056719&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml Sat Jan 8 14:45:29 2011 @@ -0,0 +1,66 @@ +<?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.mng4966</groupId> + <artifactId>test</artifactId> + <version>1.0</version> + + <name>Maven Integration Test :: MNG-4966</name> + <description> + Verify that URLs in the effective model retain successive slashes which are significant in certain domains. + </description> + + <url>file:////UNC/server/dir/</url> + <scm> + <url>ssh://localhost//home/user/</url> + <connection>scm:hg:ssh://localhost//home/user/</connection> + <developerConnection>[fetch=]http://server.org/[push=]ssh://server.org/</developerConnection> + </scm> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-expression</artifactId> + <version>2.1-SNAPSHOT</version> + <configuration> + <outputFile>target/pom.properties</outputFile> + <expressions> + <expression>project/url</expression> + <expression>project/scm</expression> + </expressions> + </configuration> + <executions> + <execution> + <id>test</id> + <phase>validate</phase> + <goals> + <goal>eval</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4966/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision