aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-base/archiva-repository-layer
diff options
context:
space:
mode:
authorNicolas De Loof <nicolas@apache.org>2008-01-10 10:54:32 +0000
committerNicolas De Loof <nicolas@apache.org>2008-01-10 10:54:32 +0000
commit75a2efd2dd80edfa249a49e031f428f437357707 (patch)
treebdf694827c03dd833991db13e110820f7778eafe /archiva-base/archiva-repository-layer
parent17c281888ddbd23f5c5b58da7b1c2189946b8a36 (diff)
downloadarchiva-75a2efd2dd80edfa249a49e031f428f437357707.tar.gz
archiva-75a2efd2dd80edfa249a49e031f428f437357707.zip
remove dependency between archiva-configuration and archiva-model
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@610753 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-repository-layer')
-rw-r--r--archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/LegacyPathParser.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/LegacyPathParser.java b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/LegacyPathParser.java
index aceef26c1..8861b892e 100644
--- a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/LegacyPathParser.java
+++ b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/LegacyPathParser.java
@@ -56,19 +56,24 @@ public class LegacyPathParser
public ArtifactReference toArtifactReference( String path )
throws LayoutException
{
+ ArtifactReference artifact = new ArtifactReference();
+
// First, look if a custom resolution rule has been set for this artifact
Collection legacy = configuration.getConfiguration().getLegacyArtifactPaths();
for ( Iterator iterator = legacy.iterator(); iterator.hasNext(); )
{
LegacyArtifactPath legacyPath = (LegacyArtifactPath) iterator.next();
if ( legacyPath.match( path ) )
- {
- return legacyPath.getArtifactReference();
+ {
+ artifact.setGroupId( legacyPath.getGroupId() );
+ artifact.setArtifactId( legacyPath.getArtifactId() );
+ artifact.setClassifier( legacyPath.getClassifier() );
+ artifact.setVersion( legacyPath.getVersion() );
+ artifact.setType( legacyPath.getType() );
+ return artifact;
}
}
- ArtifactReference artifact = new ArtifactReference();
-
String normalizedPath = StringUtils.replace( path, "\\", "/" );
String pathParts[] = StringUtils.split( normalizedPath, '/' );