maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1055552 - in /maven/maven-3/trunk: maven-compat/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java pom.xml
Date Wed, 05 Jan 2011 17:45:07 GMT
Author: bentmann
Date: Wed Jan  5 17:45:07 2011
New Revision: 1055552

URL: http://svn.apache.org/viewvc?rev=1055552&view=rev
Log:
o Updated to aether:1.9

Modified:
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
    maven/maven-3/trunk/pom.xml

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java?rev=1055552&r1=1055551&r2=1055552&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java
Wed Jan  5 17:45:07 2011
@@ -36,6 +36,9 @@ import org.sonatype.aether.metadata.Meta
 import org.sonatype.aether.repository.LocalArtifactRegistration;
 import org.sonatype.aether.repository.LocalArtifactRequest;
 import org.sonatype.aether.repository.LocalArtifactResult;
+import org.sonatype.aether.repository.LocalMetadataRegistration;
+import org.sonatype.aether.repository.LocalMetadataRequest;
+import org.sonatype.aether.repository.LocalMetadataResult;
 import org.sonatype.aether.repository.LocalRepository;
 import org.sonatype.aether.repository.LocalRepositoryManager;
 import org.sonatype.aether.repository.RemoteRepository;
@@ -121,11 +124,41 @@ public class LegacyLocalRepositoryManage
         return result;
     }
 
+    public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest
request )
+    {
+        Metadata metadata = request.getMetadata();
+
+        String path;
+        if ( request.getRepository() == null )
+        {
+            path = getPathForLocalMetadata( metadata );
+        }
+        else
+        {
+            path = getPathForRemoteMetadata( metadata, request.getRepository(), request.getContext()
);
+        }
+
+        File file = new File( getRepository().getBasedir(), path );
+
+        LocalMetadataResult result = new LocalMetadataResult( request );
+        if ( file.isFile() )
+        {
+            result.setFile( file );
+        }
+
+        return result;
+    }
+
     public void add( RepositorySystemSession session, LocalArtifactRegistration request )
     {
         // noop
     }
 
+    public void add( RepositorySystemSession session, LocalMetadataRegistration request )
+    {
+        // noop
+    }
+
     static class ArtifactMetadataAdapter
         implements ArtifactMetadata
     {

Modified: maven/maven-3/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/pom.xml?rev=1055552&r1=1055551&r2=1055552&view=diff
==============================================================================
--- maven/maven-3/trunk/pom.xml (original)
+++ maven/maven-3/trunk/pom.xml Wed Jan  5 17:45:07 2011
@@ -50,7 +50,7 @@
     <cipherVersion>1.4</cipherVersion>
     <modelloVersion>1.4</modelloVersion>
     <jxpathVersion>1.3</jxpathVersion>
-    <aetherVersion>1.8</aetherVersion>
+    <aetherVersion>1.9</aetherVersion>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
   </properties>
 



Mime
View raw message