Index: maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
===================================================================
--- maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java	(revision 782867)
+++ maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java	(working copy)
@@ -182,12 +182,12 @@
     // Test artifact generation for unit tests
     // ----------------------------------------------------------------------
 
-    protected Artifact createLocalArtifact( String artifactId, String version )
+    protected Artifact createLocalArtifact( String artifactId, String version, String content )
         throws Exception
     {
         Artifact artifact = createArtifact( artifactId, version );
 
-        createArtifact( artifact, localRepository() );
+        createArtifact( artifact, localRepository(), content );
 
         return artifact;
     }
@@ -197,7 +197,7 @@
     {
         Artifact artifact = createArtifact( artifactId, version );
 
-        createArtifact( artifact, remoteRepository() );
+        createArtifact( artifact, remoteRepository(), null );
 
         return artifact;
     }
@@ -205,16 +205,16 @@
     protected void createLocalArtifact( Artifact artifact )
         throws Exception
     {
-        createArtifact( artifact, localRepository() );
+        createArtifact( artifact, localRepository(), null );
     }
 
     protected void createRemoteArtifact( Artifact artifact )
         throws Exception
     {
-        createArtifact( artifact, remoteRepository() );
+        createArtifact( artifact, remoteRepository(), null );
     }
 
-    protected void createArtifact( Artifact artifact, ArtifactRepository repository )
+    protected void createArtifact( Artifact artifact, ArtifactRepository repository, String content )
         throws Exception
     {
         String path = repository.pathOf( artifact );
@@ -228,9 +228,20 @@
 
         Writer writer = new FileWriter( artifactFile );
 
-        writer.write( artifact.getId() );
+        if( content == null )
+        {
+            writer.write( artifact.getId() );
+        }
+        else
+        {
+            writer.write( content );
+        }
 
         writer.close();
+        
+        artifactFile = new File( repository.getBasedir(), path );
+        
+        artifact.setFile( artifactFile );
     }
 
     protected Artifact createArtifact( String artifactId, String version )
Index: maven-artifact-manager/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java
===================================================================
--- maven-artifact-manager/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java	(revision 782867)
+++ maven-artifact-manager/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java	(working copy)
@@ -86,7 +86,7 @@
 
         artifactResolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE );
 
-        projectArtifact = createLocalArtifact( "project", "3.0" );
+        projectArtifact = createLocalArtifact( "project", "3.0", null );
     }
 
     protected String component()
@@ -97,7 +97,7 @@
     public void testResolutionOfASingleArtifactWhereTheArtifactIsPresentInTheLocalRepository()
         throws Exception
     {
-        Artifact a = createLocalArtifact( "a", "1.0" );
+        Artifact a = createLocalArtifact( "a", "1.0", null );
 
         artifactResolver.resolve( a, remoteRepositories(), localRepository() );
 
@@ -125,9 +125,9 @@
     public void testTransitiveResolutionWhereAllArtifactsArePresentInTheLocalRepository()
         throws Exception
     {
-        Artifact g = createLocalArtifact( "g", "1.0" );
+        Artifact g = createLocalArtifact( "g", "1.0", null );
 
-        Artifact h = createLocalArtifact( "h", "1.0" );
+        Artifact h = createLocalArtifact( "h", "1.0", null );
 
         ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation()
         {
@@ -416,5 +416,49 @@
 
         control.verify();
     }
+    
+    public void testResolveOlderSpecificSnapshotVersionWhenNewerVersionAlreadyExistsAndBothAreInLocalRepository()
+        throws Exception
+    {
+        Artifact g1 = createLocalArtifact( "g", "1.0-20090608.090416-1", "Write something to make file length longer" );
+        
+        long expectedFileLength = g1.getFile().length();
+        
+        Artifact g3 = createLocalArtifact( "g", "1.0-SNAPSHOT", null );
+        
+        long incorrectFileLength = g3.getFile().length();
+        
+        ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation()
+        {
+            public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
+                                             List remoteRepositories )
+                throws ArtifactMetadataRetrievalException
+            {
+                Set dependencies = new LinkedHashSet();
+
+                return new ResolutionGroup( artifact, dependencies, remoteRepositories );
+            }
+        };
+
+        ArtifactResolutionResult result = artifactResolver.resolveTransitively( Collections.singleton( g1 ),
+                                                                                projectArtifact, remoteRepositories(),
+                                                                                localRepository(), mds );
+
+        assertEquals( 1, result.getArtifacts().size() );
+        
+        assertTrue( result.getArtifacts().contains( g1 ) );
+
+        assertFalse( result.getArtifacts().contains( g3 ) );
+
+        Artifact artifact = ( (Artifact) result.getArtifacts().iterator().next() );
+        
+        assertEquals( expectedFileLength, artifact.getFile().length() );
+        
+        assertFalse( "Incorrect artifact file resolved", incorrectFileLength == artifact.getFile().length() );
+                
+        assertLocalArtifactPresent( g1 );
+        
+        assertLocalArtifactPresent( g3 );
+    }
 }
 
Index: maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
===================================================================
--- maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java	(revision 782867)
+++ maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java	(working copy)
@@ -239,7 +239,8 @@
             else if ( destination.exists() )
             {
                 // locally resolved...no need to hit the remote repo.
-                artifact.setResolved( true );
+                artifact.setResolved( true );                
+                resolved = true;
             }
 
             if ( artifact.isSnapshot() && !artifact.getBaseVersion().equals( artifact.getVersion() ) )

