maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r754746 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4087/
Date Sun, 15 Mar 2009 20:34:58 GMT
Author: bentmann
Date: Sun Mar 15 20:34:57 2009
New Revision: 754746

URL: http://svn.apache.org/viewvc?rev=754746&view=rev
Log:
[MNG-4087] Percent encoded characters in file URLs are not decoded upon deployment

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.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=754746&r1=754745&r2=754746&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
Sun Mar 15 20:34:57 2009
@@ -92,6 +92,7 @@
         // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng4087PercentEncodedFileUrlTest.class );
         suite.addTestSuite( MavenITmng4086ExplicitPluginMetaversionTest.class );
         suite.addTestSuite( MavenITmng4072InactiveProfileReposTest.class );
         suite.addTestSuite( MavenITmng4070WhitespaceTrimmingTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java?rev=754746&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java
Sun Mar 15 20:34:57 2009
@@ -0,0 +1,64 @@
+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.Collections;
+import java.util.List;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4087">MNG-4087</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4087PercentEncodedFileUrlTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4087PercentEncodedFileUrlTest()
+    {
+        super( "[2.1.0,)" );
+    }
+
+    /**
+     * Test that deployment to a file:// repository decodes percent-encoded characters.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4087"
);
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4087" );
+        verifier.filterFile( "pom-template.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties()
);
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier.assertFileNotPresent( "target/%72%65%70%6F" );
+        verifier.assertFilePresent( "target/repo" );
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4087PercentEncodedFileUrlTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.xml?rev=754746&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.xml
Sun Mar 15 20:34:57 2009
@@ -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.mng4087</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-4087</name> 
+  <description>
+    Test that deployment to a file:// repository decodes percent-encoded characters.
+  </description>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <!-- NOTE: The last URL part is intentionally percent-encoded and should be decoded
to "repo" -->
+      <url>@baseurl@/target/%72%65%70%6F</url>
+    </repository>
+  </distributionManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-artifact</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <mainFile>pom.xml</mainFile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>set</goal>
+              <goal>install</goal>
+              <goal>deploy</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4087/pom-template.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message