From 9e5a037b4bd705fe5a2c1dd6a73d31b4f14d7530 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Wed, 17 Jun 2009 12:05:06 +0000 Subject: [PATCH] [MNG-4206] Prefer RELEASE over LATEST when resolving plugin versions o Updated affected IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@785566 13f79535-47bb-0310-9956-ffa450edef68 --- ...venITmng0449PluginVersionResolutionTest.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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 fab6e14056..a28cfe1a0a 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 @@ -69,8 +69,8 @@ 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 directly from the command line. + * Verify that versions for plugins are automatically resolved if not given in the POM by checking LATEST and + * RELEASE in the repo metadata when the plugin is invoked directly from the command line. */ public void testitCliInvocation() throws Exception @@ -89,8 +89,17 @@ public class MavenITmng0449PluginVersionResolutionTest verifier.verifyErrorFreeLog(); verifier.resetStreams(); - verifier.assertFileNotPresent( "target/touch-release.txt" ); - verifier.assertFilePresent( "target/touch-snapshot.txt" ); + // Maven 3.x prefers RELEASE over LATEST (see MNG-4206) + if ( matchesVersionRange( "(,3.0-alpha-3)" ) ) + { + verifier.assertFileNotPresent( "target/touch-release.txt" ); + verifier.assertFilePresent( "target/touch-snapshot.txt" ); + } + else + { + verifier.assertFilePresent( "target/touch-release.txt" ); + verifier.assertFileNotPresent( "target/touch-snapshot.txt" ); + } } }