You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/06/17 14:05:06 UTC

svn commit: r785566 - /maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java

Author: bentmann
Date: Wed Jun 17 12:05:06 2009
New Revision: 785566

URL: http://svn.apache.org/viewvc?rev=785566&view=rev
Log:
[MNG-4206] Prefer RELEASE over LATEST when resolving plugin versions

o Updated affected IT

Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java?rev=785566&r1=785565&r2=785566&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0449PluginVersionResolutionTest.java Wed Jun 17 12:05:06 2009
@@ -69,8 +69,8 @@
     }
 
     /**
-     * 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 @@
         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" );
+        }
     }
 
 }