diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java index a55f60bb54..e329beaed2 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java @@ -36,7 +36,7 @@ public class MavenITmng0761MissingSnapshotDistRepoTest public MavenITmng0761MissingSnapshotDistRepoTest() { - super( "(2.0.2,)" ); + super(); } /** @@ -47,14 +47,16 @@ public class MavenITmng0761MissingSnapshotDistRepoTest throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0761" ); + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - verifier.deleteArtifact( "org.apache.maven", "maven-it-it0062-SNAPSHOT", "1.0", "jar" ); - verifier.executeGoal( "deploy" ); - verifier.assertFilePresent( "target/classes/org/apache/maven/it0062/Person.class" ); - verifier.assertFilePresent( "target/maven-it-it0062-1.0-SNAPSHOT.jar" ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.deleteArtifacts( "org.apache.maven.its.mng0761" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + verifier.assertFilePresent( "target/repo/org/apache/maven/its/mng0761/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar" ); } -} +} diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java index ce5ac60e45..23a5b7b999 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java @@ -47,6 +47,8 @@ public class MavenITmng0768OfflineModeTest { // phase 1: run build in online mode to fill local repo Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); verifier.deleteArtifacts( "org.apache.maven.its.it0069" ); verifier.setLogFileName( "log1.txt" ); verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" ); @@ -58,6 +60,8 @@ public class MavenITmng0768OfflineModeTest { // phase 2: run build in offline mode to check it still passes (after deleting test repo, to be sure) Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); verifier.deleteDirectory( "repo" ); List cliOptions = new ArrayList(); cliOptions.add( "-o" ); @@ -72,6 +76,8 @@ public class MavenITmng0768OfflineModeTest { // phase 3: delete test artifact and run build in offline mode to check it fails now Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); verifier.deleteArtifacts( "org.apache.maven.its.it0069" ); List cliOptions = new ArrayList(); cliOptions.add( "-o" ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java index b5e7cf6f92..002822f932 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java @@ -37,22 +37,22 @@ public class MavenITmng0773SettingsProfileReactorPollutionTest { /** - * Verify that profiles from settings.xml do not pollute module lists - * across projects in a reactorized build. + * Verify that profiles from settings.xml do not pollute module lists across projects in a reactorized build. */ public void testitMNG773() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0773" ); + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); List cliOptions = new ArrayList(); - cliOptions.add( "--settings settings.xml" ); + cliOptions.add( "--settings" ); + cliOptions.add( "settings.xml" ); verifier.setCliOptions( cliOptions ); - verifier.executeGoal( "package" ); - verifier.assertFilePresent( "subproject/target/subproject-1.0.jar" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); - } -} +} diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java index c03137e649..add2e0d0b1 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java @@ -42,12 +42,16 @@ public class MavenITmng0781PluginConfigVsExecConfigTest throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0781" ); + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); verifier.executeGoal( "process-resources" ); - verifier.assertFilePresent( "target/exec-level.txt" ); - verifier.assertFilePresent( "target/resources-resources.txt" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + + verifier.assertFilePresent( "target/exec-level.txt" ); + verifier.assertFilePresent( "target/resources-resources.txt" ); } } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java index 9f7d222491..2f89c595e9 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java @@ -23,8 +23,7 @@ import org.apache.maven.it.Verifier; import org.apache.maven.it.util.ResourceExtractor; import java.io.File; -import java.util.ArrayList; -import java.util.List; +import java.util.Properties; /** * This is a test set for MNG-814. @@ -43,16 +42,18 @@ public class MavenITmng0814ExplicitProfileActivationTest throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0814" ); + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0", "jar" ); - List cliOptions = new ArrayList(); - cliOptions.add( "-P test-profile" ); - verifier.setCliOptions( cliOptions ); - verifier.executeGoal( "compile" ); - verifier.assertFilePresent( "target/classes/org/apache/maven/it0067/Person.class" ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.getCliOptions().add( "-P" ); + verifier.getCliOptions().add( "test-profile" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + Properties props = verifier.loadProperties( "target/profile.properties" ); + assertEquals( "PASSED", props.getProperty( "project.properties.testProp" ) ); } -} +} diff --git a/its/core-it-suite/src/test/resources/mng-0761/main.jar b/its/core-it-suite/src/test/resources/mng-0761/main.jar new file mode 100644 index 0000000000..737e078fc4 Binary files /dev/null and b/its/core-it-suite/src/test/resources/mng-0761/main.jar differ diff --git a/its/core-it-suite/src/test/resources/mng-0761/pom.xml b/its/core-it-suite/src/test/resources/mng-0761/pom.xml index d1d61e118b..969cebfb2f 100644 --- a/its/core-it-suite/src/test/resources/mng-0761/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-0761/pom.xml @@ -1,15 +1,66 @@ + + + + 4.0.0 - Maven Integration Test :: it0062 - org.apache.maven.its.it0062 - maven-it-it0062 - Test that a deployment of a snapshot falls back to a non-snapshot repository if no snapshot repository is - specified. + + org.apache.maven.its.mng0761 + test 1.0-SNAPSHOT + + Maven Integration Test :: MNG-761 + + Test that a deployment of a snapshot falls back to a non-snapshot repository if no snapshot repository is + specified. + + repo - file://localhost/${project.basedir}/target/test-repo + file://localhost/${project.basedir}/target/repo + false + + + + + org.apache.maven.its.plugins + maven-it-plugin-artifact + 2.1-SNAPSHOT + + main.jar + + + + test + validate + + set + install + deploy + + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-0761/src/main/java/org/apache/maven/it0062/Person.java b/its/core-it-suite/src/test/resources/mng-0761/src/main/java/org/apache/maven/it0062/Person.java deleted file mode 100644 index d34f37e5b8..0000000000 --- a/its/core-it-suite/src/test/resources/mng-0761/src/main/java/org/apache/maven/it0062/Person.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.apache.maven.it0062; - -public class Person -{ - private String name; - - public void setName( String name ) - { - this.name = name; - } - - public String getName() - { - return name; - } -} diff --git a/its/core-it-suite/src/test/resources/mng-0768/pom.xml b/its/core-it-suite/src/test/resources/mng-0768/pom.xml index 8ca49f572e..5585982f49 100644 --- a/its/core-it-suite/src/test/resources/mng-0768/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-0768/pom.xml @@ -22,11 +22,11 @@ under the License. 4.0.0 - org.apache.maven.its.it0069 - maven-it-it0069 + org.apache.maven.its.mng0768 + test 1.0-SNAPSHOT - Maven Integration Test :: it0069 + Maven Integration Test :: MNG-768 Test offline mode. @@ -45,7 +45,7 @@ under the License. ignore - ignore + false diff --git a/its/core-it-suite/src/test/resources/mng-0773/pom.xml b/its/core-it-suite/src/test/resources/mng-0773/pom.xml index 4d38c96599..b2908ad4b8 100644 --- a/its/core-it-suite/src/test/resources/mng-0773/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-0773/pom.xml @@ -1,12 +1,36 @@ + + + + 4.0.0 - Maven Integration Test :: it0058 - org.apache.maven.its.it0058 - maven-it-it0058 - Verify that profiles from settings.xml do not pollute module lists - across projects in a reactorized build. - pom + + org.apache.maven.its.mng0773 + parent 1.0 + pom + + Maven Integration Test :: MNG-773 + + Verify that profiles from settings.xml do not pollute module lists across projects in a reactorized build. + subproject diff --git a/its/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml b/its/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml index 1b86badc6d..07c18e8f72 100644 --- a/its/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml @@ -1,18 +1,11 @@ 4.0.0 + - org.apache.maven.its.it0058 - maven-it-it0058 + org.apache.maven.its.mng0773 + parent 1.0 + subproject - - - junit - junit - 3.8.1 - jar - test - - diff --git a/its/core-it-suite/src/test/resources/mng-0773/subproject/src/main/java/org/apache/maven/it0058/Person.java b/its/core-it-suite/src/test/resources/mng-0773/subproject/src/main/java/org/apache/maven/it0058/Person.java deleted file mode 100644 index 0ec4671521..0000000000 --- a/its/core-it-suite/src/test/resources/mng-0773/subproject/src/main/java/org/apache/maven/it0058/Person.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.apache.maven.it0058; - -public class Person -{ - private String name; - - public void setName( String name ) - { - this.name = name; - } - - public String getName() - { - return name; - } -} diff --git a/its/core-it-suite/src/test/resources/mng-0773/subproject/src/main/resources/it0058.properties b/its/core-it-suite/src/test/resources/mng-0773/subproject/src/main/resources/it0058.properties deleted file mode 100644 index f54f8ab106..0000000000 --- a/its/core-it-suite/src/test/resources/mng-0773/subproject/src/main/resources/it0058.properties +++ /dev/null @@ -1 +0,0 @@ -name = jason diff --git a/its/core-it-suite/src/test/resources/mng-0773/subproject/src/test/java/org/apache/maven/it0058/PersonTest.java b/its/core-it-suite/src/test/resources/mng-0773/subproject/src/test/java/org/apache/maven/it0058/PersonTest.java deleted file mode 100644 index c1c7b69e52..0000000000 --- a/its/core-it-suite/src/test/resources/mng-0773/subproject/src/test/java/org/apache/maven/it0058/PersonTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.apache.maven.it0058; - -import junit.framework.TestCase; - -public class PersonTest - extends TestCase -{ - public void testPerson() - { - Person person = new Person(); - - person.setName( "foo" ); - - assertEquals( "foo", person.getName() ); - } -} diff --git a/its/core-it-suite/src/test/resources/mng-0814/pom.xml b/its/core-it-suite/src/test/resources/mng-0814/pom.xml index 5cfb717b60..96c2f0e5ad 100644 --- a/its/core-it-suite/src/test/resources/mng-0814/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-0814/pom.xml @@ -1,22 +1,63 @@ + + + + 4.0.0 - Maven Integration Test :: it0067 - org.apache.maven.its.it0067 - maven-it-it0067 - Test activation of a profile from the command line. + + org.apache.maven.its.mng0814 + test 1.0-SNAPSHOT + + Maven Integration Test :: MNG-814 + Test activation of a profile from the command line. test-profile - - - - junit - junit - 3.8.1 - - + + PASSED + + + + + org.apache.maven.its.plugins + maven-it-plugin-expression + 2.1-SNAPSHOT + + + validate + + eval + + + target/profile.properties + + project/properties + + + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-0814/src/main/java/org/apache/maven/it0067/Person.java b/its/core-it-suite/src/test/resources/mng-0814/src/main/java/org/apache/maven/it0067/Person.java deleted file mode 100644 index 91a0420c56..0000000000 --- a/its/core-it-suite/src/test/resources/mng-0814/src/main/java/org/apache/maven/it0067/Person.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.apache.maven.it0067; - -import junit.framework.TestCase; - -public class Person -{ - private String name; - - public void setName( String name ) - { - this.name = name; - } - - public String getName() - { - return name; - } -}