]> source.dussan.org Git - archiva.git/commitdiff
add spring aliases to prevent hackish code
authorOlivier Lamy <olamy@apache.org>
Tue, 30 Oct 2012 14:46:23 +0000 (14:46 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 30 Oct 2012 14:46:23 +0000 (14:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1403724 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
archiva-modules/plugins/maven2-repository/src/main/resources/META-INF/spring-context.xml

index 9cdd2aaa55291600360233f8fb9a89e6f6dddd97..d1792b33bc56298de52b58fb2b5f44c945d62e01 100644 (file)
@@ -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 );
index 1bdfede32bcb7249c967c9f5eaac85fe1d34985f..22de8be2a7198e5a125ba7904dc7a61b71b46099 100644 (file)
@@ -38,4 +38,7 @@
     </constructor-arg>
   </bean>
 
+  <alias name="repositoryStorage#maven2" alias="repositoryStorage#default"/>
+  <alias name="repositoryStorage#maven2" alias="repositoryStorage#legacy"/>
+
 </beans>
\ No newline at end of file