From 8b9e34ff931f15b87823711753eb0710271ece6a Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sat, 28 Mar 2009 16:38:58 +0000 Subject: [PATCH] o Moved repository declarations to settings git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@759505 13f79535-47bb-0310-9956-ffa450edef68 --- .../it/MavenITmng2387InactiveProxyTest.java | 8 +++---- .../mng-2387/{pom-unfiltered.xml => pom.xml} | 17 +-------------- .../{settings.xml => settings-template.xml} | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 21 deletions(-) rename its/core-it-suite/src/test/resources/mng-2387/{pom-unfiltered.xml => pom.xml} (76%) rename its/core-it-suite/src/test/resources/mng-2387/{settings.xml => settings-template.xml} (61%) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java index 89fcf835b0..102440dd4b 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2387InactiveProxyTest.java @@ -47,7 +47,6 @@ public class MavenITmng2387InactiveProxyTest public MavenITmng2387InactiveProxyTest() { - // TODO: re-instate feature in 3.0 super( "[2.0.11,2.1.0-M1),[2.1.0,)" ); // 2.0.11+, 2.1.0+ } @@ -78,10 +77,9 @@ public class MavenITmng2387InactiveProxyTest } /** - * Test that mirror definitions are properly evaluated. In particular, the first matching mirror definition - * from the settings should win, i.e. ordering of mirror definitions matters. + * Test that no proxy is used if none of the configured proxies is actually set as active. */ - public void testitFirstMatchWins() + public void testit() throws Exception { Verifier verifier = new Verifier( testDir.getAbsolutePath() ); @@ -89,7 +87,7 @@ public class MavenITmng2387InactiveProxyTest Properties properties = verifier.newDefaultFilterProperties(); properties.setProperty( "@host@", InetAddress.getLocalHost().getCanonicalHostName() ); properties.setProperty( "@port@", Integer.toString( port ) ); - verifier.filterFile( "pom-unfiltered.xml", "pom.xml", "UTF-8", properties ); + verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", properties ); verifier.setAutoclean( false ); verifier.deleteArtifacts( "org.apache.maven.its.mng2387" ); diff --git a/its/core-it-suite/src/test/resources/mng-2387/pom-unfiltered.xml b/its/core-it-suite/src/test/resources/mng-2387/pom.xml similarity index 76% rename from its/core-it-suite/src/test/resources/mng-2387/pom-unfiltered.xml rename to its/core-it-suite/src/test/resources/mng-2387/pom.xml index 103cce9d1c..e69d1b42be 100644 --- a/its/core-it-suite/src/test/resources/mng-2387/pom-unfiltered.xml +++ b/its/core-it-suite/src/test/resources/mng-2387/pom.xml @@ -28,32 +28,17 @@ under the License. Maven Integration Test :: MNG-2387 - Test that mirror definitions are properly evaluated. In particular, the first matching mirror definition - from the settings should win, i.e. ordering of mirror definitions matters. + Test that no proxy is used if none of the configured proxies is actually set as active. - org.apache.maven.its.mng2387 a 0.1 - - - central - http://@host@:@port@/ - - ignore - - - false - - - - diff --git a/its/core-it-suite/src/test/resources/mng-2387/settings.xml b/its/core-it-suite/src/test/resources/mng-2387/settings-template.xml similarity index 61% rename from its/core-it-suite/src/test/resources/mng-2387/settings.xml rename to its/core-it-suite/src/test/resources/mng-2387/settings-template.xml index 192cbf133b..f8258f6bdc 100644 --- a/its/core-it-suite/src/test/resources/mng-2387/settings.xml +++ b/its/core-it-suite/src/test/resources/mng-2387/settings-template.xml @@ -22,10 +22,31 @@ under the License. + false http localhost 0 + + + maven-core-it + + true + + + + central + http://@host@:@port@/ + + ignore + + + false + + + + +