From ebaed8593c32016337085246e1544d8ff5fb10a0 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 30 Oct 2012 14:46:23 +0000 Subject: [PATCH] add spring aliases to prevent hackish code git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1403724 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/archiva/webdav/ArchivaDavResourceFactory.java | 7 +------ .../src/main/resources/META-INF/spring-context.xml | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java index 9cdd2aaa5..d1792b33b 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java @@ -729,12 +729,7 @@ public class ArchivaDavResourceFactory if ( artifact != null ) { String repositoryLayout = managedRepository.getRepository().getLayout(); - // FIXME we could prevent that with renaming bean repositoryStorage#maven2 to repositoryStorage#default - if ( StringUtils.equalsIgnoreCase( "default", repositoryLayout ) || StringUtils.equalsIgnoreCase( - "legacy", repositoryLayout ) ) - { - repositoryLayout = "maven2"; - } + RepositoryStorage repositoryStorage = this.applicationContext.getBean( "repositoryStorage#" + repositoryLayout, RepositoryStorage.class ); repositoryStorage.applyServerSideRelocation( managedRepository, artifact ); diff --git a/archiva-modules/plugins/maven2-repository/src/main/resources/META-INF/spring-context.xml b/archiva-modules/plugins/maven2-repository/src/main/resources/META-INF/spring-context.xml index 1bdfede32..22de8be2a 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/plugins/maven2-repository/src/main/resources/META-INF/spring-context.xml @@ -38,4 +38,7 @@ + + + \ No newline at end of file -- 2.39.5