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
This commit is contained in:
Benjamin Bentmann 2009-03-28 16:38:58 +00:00
parent ce6577b748
commit 8b9e34ff93
3 changed files with 25 additions and 21 deletions

View File

@ -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" );

View File

@ -28,32 +28,17 @@ under the License.
<name>Maven Integration Test :: MNG-2387</name>
<description>
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.
</description>
<dependencies>
<dependency>
<!-- Provided by repo maven-core-it-a and only this repo -->
<groupId>org.apache.maven.its.mng2387</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<url>http://@host@:@port@/</url>
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>

View File

@ -22,10 +22,31 @@ under the License.
<settings>
<proxies>
<proxy>
<!-- NOTE: Set as inactive so should not be used, even if the one and only proxy configured -->
<active>false</active>
<protocol>http</protocol>
<host>localhost</host>
<port>0</port>
</proxy>
</proxies>
<profiles>
<profile>
<id>maven-core-it</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>central</id>
<url>http://@host@:@port@/</url>
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>