diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4279WagonProviderFailoverTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4279WagonProviderFailoverTest.java index ec9fed9f64..1f0553f609 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4279WagonProviderFailoverTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4279WagonProviderFailoverTest.java @@ -37,20 +37,26 @@ public class MavenITmng4279WagonProviderFailoverTest super( "[2.2.1,3.0-alpha-1)" ); } + /** + * Test that wagon provider selection fails gracefully and uses protocol for roleHint if protocol-provider roleHint + * isn't available. + */ public void testit() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4279" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); verifier.getCliOptions().add( "-s" ); verifier.getCliOptions().add( "settings.xml" ); - - verifier.executeGoal( "deploy" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + + verifier.assertFilePresent( "target/wagon.properties" ); } } diff --git a/its/core-it-suite/src/test/resources/mng-4279/pom.xml b/its/core-it-suite/src/test/resources/mng-4279/pom.xml index d1806f8628..c3762e5c19 100644 --- a/its/core-it-suite/src/test/resources/mng-4279/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-4279/pom.xml @@ -1,20 +1,37 @@ - + + + + + 4.0.0 - org.apache.maven.it.mng4279 - mng-4279 + + org.apache.maven.its.mng4279 + test jar 1 - mng-4279 - - - junit - junit - 3.8.1 - test - - + Maven Integration Test :: MNG-4279 + + Test that wagon provider selection fails gracefully and uses protocol for roleHint if protocol-provider roleHint + isn't available. + @@ -31,5 +48,26 @@ 2.1-SNAPSHOT + + + org.apache.maven.its.plugins + maven-it-plugin-artifact + 2.1-SNAPSHOT + + pom.xml + + + + test + validate + + set + install + deploy + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4279/settings.xml b/its/core-it-suite/src/test/resources/mng-4279/settings.xml index b80bd01504..a9ff20fac6 100644 --- a/its/core-it-suite/src/test/resources/mng-4279/settings.xml +++ b/its/core-it-suite/src/test/resources/mng-4279/settings.xml @@ -1,3 +1,24 @@ + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4279/src/main/java/org/apache/maven/it/mng4279/App.java b/its/core-it-suite/src/test/resources/mng-4279/src/main/java/org/apache/maven/it/mng4279/App.java deleted file mode 100644 index 00062dd932..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4279/src/main/java/org/apache/maven/it/mng4279/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.maven.it.mng4279; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/its/core-it-suite/src/test/resources/mng-4279/src/test/java/org/apache/maven/it/mng4279/AppTest.java b/its/core-it-suite/src/test/resources/mng-4279/src/test/java/org/apache/maven/it/mng4279/AppTest.java deleted file mode 100644 index 6ee8641ef4..0000000000 --- a/its/core-it-suite/src/test/resources/mng-4279/src/test/java/org/apache/maven/it/mng4279/AppTest.java +++ /dev/null @@ -1,38 +0,0 @@ -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 ); - } -}