diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java index 40892942ec..cddf68092f 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java @@ -47,6 +47,7 @@ public class MavenITmng0449PluginVersionResolutionTest throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0449" ); + testDir = new File( testDir, "lifecycle" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); verifier.setAutoclean( false ); @@ -54,8 +55,7 @@ public class MavenITmng0449PluginVersionResolutionTest verifier.deleteArtifacts( "org.apache.maven.its.mng0449" ); verifier.getCliOptions().add( "--settings" ); verifier.getCliOptions().add( "settings.xml" ); - verifier.filterFile( "settings.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); - verifier.setLogFileName( "log-lifecycle.txt" ); + verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); @@ -67,12 +67,13 @@ public class MavenITmng0449PluginVersionResolutionTest /** * Verify that versions for plugins are automatically resolved if not given in the POM by checking first LATEST and - * then RELEASE in the repo metadata when the plugin is invoked from the command line. + * then RELEASE in the repo metadata when the plugin is invoked directly from the command line. */ public void testitCliInvocation() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0449" ); + testDir = new File( testDir, "direct" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); verifier.setAutoclean( false ); @@ -80,8 +81,7 @@ public class MavenITmng0449PluginVersionResolutionTest verifier.deleteArtifacts( "org.apache.maven.its.mng0449" ); verifier.getCliOptions().add( "--settings" ); verifier.getCliOptions().add( "settings.xml" ); - verifier.filterFile( "settings.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); - verifier.setLogFileName( "log-cli.txt" ); + verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); verifier.executeGoal( "org.apache.maven.its.mng0449:maven-it-plugin-a:touch" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); diff --git a/its/core-it-suite/src/test/resources/mng-0449/direct/pom.xml b/its/core-it-suite/src/test/resources/mng-0449/direct/pom.xml new file mode 100644 index 0000000000..a02a847fa1 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-0449/direct/pom.xml @@ -0,0 +1,35 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng0449 + parent + 1.0-SNAPSHOT + pom + + Maven Integration Test :: MNG-449 + + Verify that versions for plugins are automatically resolved if not given in the POM by checking first LATEST and + then RELEASE in the repo metadata. + + diff --git a/its/core-it-suite/src/test/resources/mng-0449/pom.xml b/its/core-it-suite/src/test/resources/mng-0449/lifecycle/pom.xml similarity index 100% rename from its/core-it-suite/src/test/resources/mng-0449/pom.xml rename to its/core-it-suite/src/test/resources/mng-0449/lifecycle/pom.xml diff --git a/its/core-it-suite/src/test/resources/mng-0449/settings.xml b/its/core-it-suite/src/test/resources/mng-0449/settings-template.xml similarity index 95% rename from its/core-it-suite/src/test/resources/mng-0449/settings.xml rename to its/core-it-suite/src/test/resources/mng-0449/settings-template.xml index 4ebb5a46d5..5aaf92bbc1 100644 --- a/its/core-it-suite/src/test/resources/mng-0449/settings.xml +++ b/its/core-it-suite/src/test/resources/mng-0449/settings-template.xml @@ -34,7 +34,7 @@ under the License. maven-core-it - @baseurl@/repo + @baseurl@/../repo ignore @@ -46,7 +46,7 @@ under the License. maven-core-it - @baseurl@/repo + @baseurl@/../repo ignore