mirror of
https://github.com/apache/maven.git
synced 2025-03-09 11:26:28 +00:00
[MNG-4279] Test graceful failure of wagon provider selection
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@800543 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7e40b232ba
commit
9a7643eab8
@ -86,6 +86,7 @@ public static Test suite()
|
||||
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
|
||||
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
|
||||
|
||||
suite.addTestSuite( MavenITmng4279WagonProviderFailoverTest.class );
|
||||
suite.addTestSuite( MavenITmng4276WrongTransitivePlexusUtilsTest.class );
|
||||
suite.addTestSuite( MavenITmng4274PluginRealmArtifactsTest.class );
|
||||
suite.addTestSuite( MavenITmng4273RestrictedCoreRealmAccessForPluginTest.class );
|
||||
|
@ -0,0 +1,55 @@
|
||||
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.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4279">MNG-4279</a>.
|
||||
*
|
||||
* @author John Casey
|
||||
*/
|
||||
public class MavenITmng4279WagonProviderFailoverTest
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
|
||||
public MavenITmng4279WagonProviderFailoverTest()
|
||||
{
|
||||
super( "(2.2.0,2.99.99]" );
|
||||
}
|
||||
|
||||
public void testit()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4279" );
|
||||
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
|
||||
verifier.getCliOptions().add( "-s" );
|
||||
verifier.getCliOptions().add( "settings.xml" );
|
||||
verifier.executeGoal( "deploy" );
|
||||
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
}
|
||||
|
||||
}
|
25
its/core-it-suite/src/test/resources/mng-4279/pom.xml
Normal file
25
its/core-it-suite/src/test/resources/mng-4279/pom.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.it.mng4279</groupId>
|
||||
<artifactId>mng-4279</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1</version>
|
||||
<name>mng-4279</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<url>file:///${java.io.tmpdir}/${project.artifactId}</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
10
its/core-it-suite/src/test/resources/mng-4279/settings.xml
Normal file
10
its/core-it-suite/src/test/resources/mng-4279/settings.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<settings>
|
||||
<servers>
|
||||
<server>
|
||||
<id>central</id>
|
||||
<configuration>
|
||||
<wagonProvider>lightweight</wagonProvider>
|
||||
</configuration>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
@ -0,0 +1,13 @@
|
||||
package org.apache.maven.it.mng4279;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package org.apache.maven.it.mng4279;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user