From: Brett Porter Date: Thu, 23 Aug 2007 12:33:42 +0000 (+0000) Subject: [MRM-462] support both types of file URL in old configuration X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=00c82f8bfbd8c2eede92dac42336c788174a76f6;p=archiva.git [MRM-462] support both types of file URL in old configuration git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@568957 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/MRM-462/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java b/MRM-462/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java index 345a1dfea..2eed899b6 100644 --- a/MRM-462/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java +++ b/MRM-462/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java @@ -129,6 +129,11 @@ public class DefaultArchivaConfiguration r.setLocation( r.getUrl().substring( 7 ) ); config.addManagedRepository( r ); } + else if ( r.getUrl().startsWith( "file:" ) ) + { + r.setLocation( r.getUrl().substring( 5 ) ); + config.addManagedRepository( r ); + } else { RemoteRepositoryConfiguration repo = new RemoteRepositoryConfiguration(); diff --git a/MRM-462/archiva-base/archiva-configuration/src/test/conf/autodetect-v1.xml b/MRM-462/archiva-base/archiva-configuration/src/test/conf/autodetect-v1.xml index 5f35f5d37..430972208 100644 --- a/MRM-462/archiva-base/archiva-configuration/src/test/conf/autodetect-v1.xml +++ b/MRM-462/archiva-base/archiva-configuration/src/test/conf/autodetect-v1.xml @@ -33,7 +33,7 @@ snapshots Archiva Managed Snapshot Repository - file://${appserver.base}/repositories/internal + file:${appserver.base}/repositories/snapshots default false true