maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject [6/50] git commit: o Accounted for refactoring of aether-api
Date Mon, 18 Mar 2013 21:47:28 GMT
o Accounted for refactoring of aether-api


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/298403be
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/298403be
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/298403be

Branch: refs/heads/master
Commit: 298403bed3852e1ae9f632449f16a8ebf717453a
Parents: 8cf8d36
Author: Benjamin Bentmann <bentmann@apache.org>
Authored: Sun Jan 15 18:36:21 2012 +0100
Committer: Benjamin Bentmann <bentmann@apache.org>
Committed: Sun Jan 15 18:36:21 2012 +0100

----------------------------------------------------------------------
 .../maven/repository/internal/MavenMetadata.java   |   27 ++++++---------
 .../repository/metadata/MetadataBridge.java        |   16 +++++++++
 2 files changed, 27 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/298403be/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
----------------------------------------------------------------------
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
index 63f7bc4..329f99c 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
@@ -23,6 +23,8 @@ import java.io.File;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.Writer;
+import java.util.Collections;
+import java.util.Map;
 
 import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
@@ -32,12 +34,14 @@ import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.WriterFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.eclipse.aether.RepositoryException;
+import org.eclipse.aether.metadata.AbstractMetadata;
 import org.eclipse.aether.metadata.MergeableMetadata;
 
 /**
  * @author Benjamin Bentmann
  */
 abstract class MavenMetadata
+    extends AbstractMetadata
     implements MergeableMetadata
 {
 
@@ -130,24 +134,15 @@ abstract class MavenMetadata
         }
     }
 
+    public Map<String, String> getProperties()
+    {
+        return Collections.emptyMap();
+    }
+
     @Override
-    public String toString()
+    public org.eclipse.aether.metadata.Metadata setProperties( Map<String, String>
properties )
     {
-        StringBuilder buffer = new StringBuilder( 128 );
-        if ( getGroupId().length() > 0 )
-        {
-            buffer.append( getGroupId() );
-        }
-        if ( getArtifactId().length() > 0 )
-        {
-            buffer.append( ':' ).append( getArtifactId() );
-        }
-        if ( getVersion().length() > 0 )
-        {
-            buffer.append( ':' ).append( getVersion() );
-        }
-        buffer.append( '/' ).append( getType() );
-        return buffer.toString();
+        return this;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/298403be/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
index b3ae028..7d9935c 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
@@ -20,6 +20,8 @@ package org.apache.maven.artifact.repository.metadata;
  */
 
 import java.io.File;
+import java.util.Collections;
+import java.util.Map;
 
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -27,7 +29,9 @@ import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
 import org.codehaus.plexus.util.FileUtils;
 import org.eclipse.aether.RepositoryException;
+import org.eclipse.aether.metadata.AbstractMetadata;
 import org.eclipse.aether.metadata.MergeableMetadata;
+import org.eclipse.aether.metadata.Metadata;
 
 /**
  * <strong>Warning:</strong> This is an internal utility class that is only public
for technical reasons, it is not part
@@ -36,6 +40,7 @@ import org.eclipse.aether.metadata.MergeableMetadata;
  * @author Benjamin Bentmann
  */
 public final class MetadataBridge
+    extends AbstractMetadata
     implements MergeableMetadata
 {
 
@@ -127,6 +132,17 @@ public final class MetadataBridge
         }
     }
 
+    public Map<String, String> getProperties()
+    {
+        return Collections.emptyMap();
+    }
+
+    @Override
+    public Metadata setProperties( Map<String, String> properties )
+    {
+        return this;
+    }
+
     @SuppressWarnings( "deprecation" )
     static class MetadataRepository
         extends DefaultArtifactRepository


Mime
View raw message