You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by og...@apache.org on 2009/04/09 05:55:48 UTC

svn commit: r763506 - /maven/mercury/trunk/mercury-repo/mercury-repo-local-m2/src/main/java/org/apache/maven/mercury/repository/local/m2/LocalRepositoryReaderM2.java

Author: ogusakov
Date: Thu Apr  9 03:55:48 2009
New Revision: 763506

URL: http://svn.apache.org/viewvc?rev=763506&view=rev
Log:
[MERCURY-115] added "always SNAPSHOT" flag to the local M2 repo

Modified:
    maven/mercury/trunk/mercury-repo/mercury-repo-local-m2/src/main/java/org/apache/maven/mercury/repository/local/m2/LocalRepositoryReaderM2.java

Modified: maven/mercury/trunk/mercury-repo/mercury-repo-local-m2/src/main/java/org/apache/maven/mercury/repository/local/m2/LocalRepositoryReaderM2.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-repo/mercury-repo-local-m2/src/main/java/org/apache/maven/mercury/repository/local/m2/LocalRepositoryReaderM2.java?rev=763506&r1=763505&r2=763506&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-repo/mercury-repo-local-m2/src/main/java/org/apache/maven/mercury/repository/local/m2/LocalRepositoryReaderM2.java (original)
+++ maven/mercury/trunk/mercury-repo/mercury-repo-local-m2/src/main/java/org/apache/maven/mercury/repository/local/m2/LocalRepositoryReaderM2.java Thu Apr  9 03:55:48 2009
@@ -430,6 +430,9 @@
         // TS exists - return it
         if ( ! virtualRequested )
             return snapshotFile.exists();
+
+        if( virtualExists &&  _snapshotAlwaysWins )
+            return true;
         
         // no real SNAPSHOT file, let's try to find one
         File gavDir = new File( loc.getAbsGavPath() );
@@ -457,9 +460,6 @@
                                             return true;
                                         }
                                         
-                                        if( _snapshotAlwaysWins )
-                                            return false;
-                                        
                                         // otherwise - only add it if older'n the SNAPSHOT
                                         long fLM = new File( dir, name ).lastModified();