From 1b80f29418397a66f41db59029b1f88e06f5e46b Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 16 Jun 2009 21:22:42 +0000 Subject: [PATCH] o Added some more delegates to real local repo to prevents plugins from NPEs or unexpected data git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@785410 13f79535-47bb-0310-9956-ffa450edef68 --- .../DelegatingLocalArtifactRepository.java | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/maven-repository/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java b/maven-repository/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java index 782514b003..2f53b15d06 100644 --- a/maven-repository/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java +++ b/maven-repository/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java @@ -3,7 +3,9 @@ package org.apache.maven.repository; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; import org.apache.maven.artifact.repository.DefaultArtifactRepository; +import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; /** * Delegating local artifact repository chains the reactor, IDE workspace @@ -66,7 +68,7 @@ public class DelegatingLocalArtifactRepository public String getId() { - return "local"; + return userLocalArtifactRepository.getId(); } @Override @@ -80,4 +82,35 @@ public class DelegatingLocalArtifactRepository { return userLocalArtifactRepository.getBasedir(); } + + @Override + public ArtifactRepositoryLayout getLayout() + { + return userLocalArtifactRepository.getLayout(); + } + + @Override + public ArtifactRepositoryPolicy getReleases() + { + return userLocalArtifactRepository.getReleases(); + } + + @Override + public ArtifactRepositoryPolicy getSnapshots() + { + return userLocalArtifactRepository.getSnapshots(); + } + + @Override + public String getKey() + { + return userLocalArtifactRepository.getKey(); + } + + @Override + public String getUrl() + { + return userLocalArtifactRepository.getUrl(); + } + }