1 package org.apache.archiva.webdav;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import junit.framework.TestCase;
23 import org.apache.archiva.admin.model.RepositoryAdminException;
24 import org.apache.archiva.admin.model.beans.ManagedRepository;
25 import org.apache.archiva.admin.model.beans.RepositoryGroup;
26 import org.apache.archiva.admin.repository.DefaultRepositoryCommonValidator;
27 import org.apache.archiva.admin.repository.group.DefaultRepositoryGroupAdmin;
28 import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin;
29 import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
30 import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
31 import org.apache.archiva.configuration.ArchivaConfiguration;
32 import org.apache.archiva.configuration.Configuration;
33 import org.apache.archiva.configuration.RepositoryGroupConfiguration;
34 import org.apache.archiva.proxy.DefaultRepositoryProxyConnectors;
35 import org.apache.archiva.repository.ManagedRepositoryContent;
36 import org.apache.archiva.repository.RepositoryContentFactory;
37 import org.apache.archiva.repository.content.LegacyPathParser;
38 import org.apache.archiva.repository.content.ManagedDefaultRepositoryContent;
39 import org.apache.archiva.repository.content.RepositoryRequest;
40 import org.apache.commons.io.FileUtils;
41 import org.apache.jackrabbit.webdav.DavException;
42 import org.apache.jackrabbit.webdav.DavResourceLocator;
43 import org.apache.jackrabbit.webdav.DavServletRequest;
44 import org.apache.jackrabbit.webdav.DavServletResponse;
45 import org.easymock.MockControl;
46 import org.easymock.classextension.MockClassControl;
47 import org.junit.After;
48 import org.junit.Before;
49 import org.junit.Test;
50 import org.junit.runner.RunWith;
51 import org.springframework.context.ApplicationContext;
52 import org.springframework.test.context.ContextConfiguration;
54 import javax.inject.Inject;
56 import java.io.IOException;
57 import java.util.ArrayList;
58 import java.util.List;
59 import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
62 * ArchivaDavResourceFactoryTest
64 @RunWith( ArchivaSpringJUnit4ClassRunner.class )
65 @ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } )
66 public class ArchivaDavResourceFactoryTest
69 private static final String RELEASES_REPO = "releases";
71 private static final String INTERNAL_REPO = "internal";
73 private static final String LOCAL_MIRROR_REPO = "local-mirror";
75 private static final String LEGACY_REPO = "legacy-repo";
77 private static final String LOCAL_REPO_GROUP = "local";
79 private OverridingArchivaDavResourceFactory resourceFactory;
81 private MockControl requestControl;
83 private DavServletRequest request;
85 private MockControl repoRequestControl;
87 private RepositoryRequest repoRequest;
89 private MockControl responseControl;
91 private DavServletResponse response;
93 private MockControl archivaConfigurationControl;
95 private ArchivaConfiguration archivaConfiguration;
97 private Configuration config;
99 private MockControl repoContentFactoryControl;
101 private RepositoryContentFactory repoFactory;
104 ApplicationContext applicationContext;
107 PlexusSisuBridge plexusSisuBridge;
110 DefaultManagedRepositoryAdmin defaultManagedRepositoryAdmin;
113 DefaultRepositoryGroupAdmin defaultRepositoryGroupAdmin;
122 requestControl = MockControl.createControl( DavServletRequest.class );
123 request = (DavServletRequest) requestControl.getMock();
125 responseControl = MockControl.createControl( DavServletResponse.class );
126 response = (DavServletResponse) responseControl.getMock();
127 responseControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
129 archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
130 archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
132 config = new Configuration();
133 archivaConfiguration.getConfiguration();
134 archivaConfigurationControl.setReturnValue( config, 5, 20 );
135 archivaConfiguration.save( config );
136 archivaConfigurationControl.setVoidCallable( 1, 4 );
137 archivaConfigurationControl.replay();
139 defaultManagedRepositoryAdmin.setArchivaConfiguration( archivaConfiguration );
140 ( (DefaultRepositoryCommonValidator) defaultManagedRepositoryAdmin.getRepositoryCommonValidator() ).setArchivaConfiguration(
141 archivaConfiguration );
142 if ( defaultManagedRepositoryAdmin.getManagedRepository( RELEASES_REPO ) == null )
144 defaultManagedRepositoryAdmin.addManagedRepository(
145 createManagedRepository( RELEASES_REPO, new File( "target/test-classes/" + RELEASES_REPO ).getPath(),
146 "default" ), false, null );
148 if ( defaultManagedRepositoryAdmin.getManagedRepository( INTERNAL_REPO ) == null )
150 defaultManagedRepositoryAdmin.addManagedRepository(
151 createManagedRepository( INTERNAL_REPO, new File( "target/test-classes/" + INTERNAL_REPO ).getPath(),
152 "default" ), false, null );
154 RepositoryGroup repoGroupConfig = new RepositoryGroup();
155 repoGroupConfig.setId( LOCAL_REPO_GROUP );
156 repoGroupConfig.addRepository( RELEASES_REPO );
157 repoGroupConfig.addRepository( INTERNAL_REPO );
159 defaultRepositoryGroupAdmin.setArchivaConfiguration( archivaConfiguration );
160 if ( defaultManagedRepositoryAdmin.getManagedRepository( LOCAL_REPO_GROUP ) == null )
162 defaultRepositoryGroupAdmin.addRepositoryGroup( repoGroupConfig, null );
165 repoContentFactoryControl = MockClassControl.createControl( RepositoryContentFactory.class );
166 repoFactory = (RepositoryContentFactory) repoContentFactoryControl.getMock();
168 repoRequestControl = MockClassControl.createControl( RepositoryRequest.class );
169 repoRequest = (RepositoryRequest) repoRequestControl.getMock();
172 new OverridingArchivaDavResourceFactory( applicationContext, plexusSisuBridge, archivaConfiguration );
173 resourceFactory.setArchivaConfiguration( archivaConfiguration );
174 resourceFactory.setRepositoryFactory( repoFactory );
175 resourceFactory.setRepositoryRequest( repoRequest );
176 resourceFactory.setConnectors( new OverridingRepositoryProxyConnectors() );
179 private ManagedRepository createManagedRepository( String id, String location, String layout )
181 ManagedRepository repoConfig = new ManagedRepository();
182 repoConfig.setId( id );
183 repoConfig.setName( id );
184 repoConfig.setLocation( location );
185 repoConfig.setLayout( layout );
190 private ManagedRepositoryContent createManagedRepositoryContent( String repoId )
191 throws RepositoryAdminException
193 ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent();
194 repoContent.setRepository( defaultManagedRepositoryAdmin.getManagedRepository( repoId ) );
200 public void tearDown()
206 // MRM-1232 - Unable to get artifacts from repositories which requires Repository Manager role using repository group
208 public void testRepositoryGroupFirstRepositoryRequiresAuthentication()
211 DavResourceLocator locator = new ArchivaDavResourceLocator( "", "/repository/" + LOCAL_REPO_GROUP
212 + "/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar", LOCAL_REPO_GROUP,
213 new ArchivaDavLocatorFactory() );
215 ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
216 ManagedRepositoryContent releasesRepo = createManagedRepositoryContent( RELEASES_REPO );
220 archivaConfigurationControl.reset();
221 archivaConfigurationControl.expectAndReturn( archivaConfiguration.getConfiguration(), config );
222 requestControl.expectAndReturn( request.getMethod(), "GET", 2 );
223 requestControl.expectAndReturn( request.getPathInfo(), "org/apache/archiva", 0, 2 );
224 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( RELEASES_REPO ),
226 requestControl.expectAndReturn( request.getRemoteAddr(), "http://localhost:8080", 2 );
227 requestControl.expectAndReturn( request.getDavSession(), new ArchivaDavSession(), 2 );
229 repoRequestControl.expectAndReturn(
230 repoRequest.isSupportFile( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
232 repoRequestControl.expectAndReturn(
233 repoRequest.isDefault( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ), false );
234 repoRequestControl.expectAndReturn(
235 repoRequest.toArtifactReference( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
237 repoRequestControl.expectAndReturn(
238 repoRequest.toNativePath( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar",
240 new File( config.findManagedRepositoryById( INTERNAL_REPO ).getLocation(),
241 "target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
242 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( INTERNAL_REPO ),
245 archivaConfigurationControl.replay();
246 requestControl.replay();
247 repoContentFactoryControl.replay();
248 repoRequestControl.replay();
250 resourceFactory.createResource( locator, request, response );
252 archivaConfigurationControl.verify();
253 requestControl.verify();
254 repoContentFactoryControl.verify();
255 repoRequestControl.verify();
257 fail( "A DavException with 401 error code should have been thrown." );
259 catch ( DavException e )
261 assertEquals( 401, e.getErrorCode() );
266 public void testRepositoryGroupLastRepositoryRequiresAuthentication()
269 DavResourceLocator locator = new ArchivaDavResourceLocator( "", "/repository/" + LOCAL_REPO_GROUP
270 + "/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar", LOCAL_REPO_GROUP,
271 new ArchivaDavLocatorFactory() );
273 List<RepositoryGroupConfiguration> repoGroups = new ArrayList<RepositoryGroupConfiguration>();
274 RepositoryGroupConfiguration repoGroup = new RepositoryGroupConfiguration();
275 repoGroup.setId( LOCAL_REPO_GROUP );
276 repoGroup.addRepository( INTERNAL_REPO );
277 repoGroup.addRepository( RELEASES_REPO );
279 repoGroups.add( repoGroup );
281 config.setRepositoryGroups( repoGroups );
283 ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
285 ManagedRepositoryContent releasesRepo = createManagedRepositoryContent( RELEASES_REPO );
289 archivaConfigurationControl.reset();
290 archivaConfigurationControl.expectAndReturn( archivaConfiguration.getConfiguration(), config );
291 requestControl.expectAndReturn( request.getMethod(), "GET", 2 );
292 requestControl.expectAndReturn( request.getPathInfo(), "org/apache/archiva", 0, 2 );
293 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( INTERNAL_REPO ),
295 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( RELEASES_REPO ),
297 requestControl.expectAndReturn( request.getRemoteAddr(), "http://localhost:8080", 2 );
298 requestControl.expectAndReturn( request.getDavSession(), new ArchivaDavSession(), 2 );
299 repoRequestControl.expectAndReturn(
300 repoRequest.isSupportFile( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
302 repoRequestControl.expectAndReturn(
303 repoRequest.isDefault( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ), false );
304 repoRequestControl.expectAndReturn(
305 repoRequest.toArtifactReference( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
307 repoRequestControl.expectAndReturn(
308 repoRequest.toNativePath( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar",
310 new File( config.findManagedRepositoryById( INTERNAL_REPO ).getLocation(),
311 "target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
313 archivaConfigurationControl.replay();
314 requestControl.replay();
315 repoContentFactoryControl.replay();
316 repoRequestControl.replay();
318 resourceFactory.createResource( locator, request, response );
320 archivaConfigurationControl.verify();
321 requestControl.verify();
322 repoContentFactoryControl.verify();
323 repoRequestControl.verify();
325 fail( "A DavException with 401 error code should have been thrown." );
327 catch ( DavException e )
329 assertEquals( 401, e.getErrorCode() );
334 public void testRepositoryGroupArtifactDoesNotExistInAnyOfTheReposAuthenticationDisabled()
337 DavResourceLocator locator = new ArchivaDavResourceLocator( "", "/repository/" + LOCAL_REPO_GROUP
338 + "/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar", LOCAL_REPO_GROUP,
339 new ArchivaDavLocatorFactory() );
341 defaultManagedRepositoryAdmin.addManagedRepository(
342 createManagedRepository( LOCAL_MIRROR_REPO, new File( "target/test-classes/local-mirror" ).getPath(),
343 "default" ), false, null );
345 List<RepositoryGroupConfiguration> repoGroups = new ArrayList<RepositoryGroupConfiguration>();
346 RepositoryGroupConfiguration repoGroup = new RepositoryGroupConfiguration();
347 repoGroup.setId( LOCAL_REPO_GROUP );
348 repoGroup.addRepository( INTERNAL_REPO );
349 repoGroup.addRepository( LOCAL_MIRROR_REPO );
351 repoGroups.add( repoGroup );
353 config.setRepositoryGroups( repoGroups );
355 ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
356 ManagedRepositoryContent localMirrorRepo = createManagedRepositoryContent( LOCAL_MIRROR_REPO );
360 archivaConfigurationControl.reset();
361 archivaConfigurationControl.expectAndReturn( archivaConfiguration.getConfiguration(), config );
362 requestControl.expectAndReturn( request.getMethod(), "GET", 4 );
363 requestControl.expectAndReturn( request.getPathInfo(), "org/apache/archiva", 0, 2 );
364 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( INTERNAL_REPO ),
366 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( LOCAL_MIRROR_REPO ),
368 requestControl.expectAndReturn( request.getRemoteAddr(), "http://localhost:8080", 4 );
369 requestControl.expectAndReturn( request.getDavSession(), new ArchivaDavSession(), 4 );
370 repoRequestControl.expectAndReturn(
371 repoRequest.isSupportFile( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ), false,
373 repoRequestControl.expectAndReturn(
374 repoRequest.isDefault( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ), false, 2 );
375 repoRequestControl.expectAndReturn(
376 repoRequest.toArtifactReference( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
378 repoRequestControl.expectAndReturn(
379 repoRequest.toNativePath( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar",
381 new File( config.findManagedRepositoryById( INTERNAL_REPO ).getLocation(),
382 "target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
384 repoRequestControl.expectAndReturn(
385 repoRequest.toNativePath( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar",
387 new File( config.findManagedRepositoryById( LOCAL_MIRROR_REPO ).getLocation(),
388 "target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
390 archivaConfigurationControl.replay();
391 requestControl.replay();
392 repoContentFactoryControl.replay();
393 repoRequestControl.replay();
395 resourceFactory.createResource( locator, request, response );
397 archivaConfigurationControl.verify();
398 requestControl.verify();
399 repoContentFactoryControl.verify();
400 repoRequestControl.verify();
402 fail( "A DavException with 404 error code should have been thrown." );
404 catch ( DavException e )
406 assertEquals( 404, e.getErrorCode() );
412 public void testRequestArtifactMetadataThreePartsRepoHasDefaultLayout()
415 // should fetch metadata
416 DavResourceLocator locator =
417 new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/jdtcore/maven-metadata.xml",
418 INTERNAL_REPO, new ArchivaDavLocatorFactory() );
420 ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
422 // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
423 RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
424 resourceFactory.setRepositoryRequest( repoRequest );
428 archivaConfigurationControl.reset();
429 archivaConfigurationControl.expectAndReturn( archivaConfiguration.getConfiguration(), config );
430 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( INTERNAL_REPO ),
432 requestControl.expectAndReturn( request.getMethod(), "GET", 3 );
433 requestControl.expectAndReturn( request.getRemoteAddr(), "http://localhost:8080", 3 );
434 requestControl.expectAndReturn( request.getDavSession(), new ArchivaDavSession(), 2 );
435 requestControl.expectAndReturn( request.getRequestURI(),
436 "http://localhost:8080/archiva/repository/" + INTERNAL_REPO
437 + "/eclipse/jdtcore/maven-metadata.xml" );
438 response.setHeader( "Pragma", "no-cache" );
439 responseControl.setVoidCallable();
441 response.setHeader( "Cache-Control", "no-cache" );
442 responseControl.setVoidCallable();
444 long date = 2039842134;
445 response.setDateHeader( "last-modified", date );
446 responseControl.setVoidCallable();
448 archivaConfigurationControl.replay();
449 repoContentFactoryControl.replay();
450 requestControl.replay();
451 responseControl.replay();
453 resourceFactory.createResource( locator, request, response );
455 archivaConfigurationControl.verify();
456 repoContentFactoryControl.verify();
457 requestControl.verify();
458 responseControl.verify();
460 catch ( DavException e )
462 fail( "A DavException should not have been thrown!" );
467 public void testRequestArtifactMetadataTwoPartsRepoHasDefaultLayout()
470 // should not fetch metadata
471 DavResourceLocator locator =
472 new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/maven-metadata.xml",
473 INTERNAL_REPO, new ArchivaDavLocatorFactory() );
475 ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
477 // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
478 RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
479 resourceFactory.setRepositoryRequest( repoRequest );
483 archivaConfigurationControl.reset();
484 archivaConfigurationControl.expectAndReturn( archivaConfiguration.getConfiguration(), config );
485 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( INTERNAL_REPO ),
487 requestControl.expectAndReturn( request.getMethod(), "GET", 2 );
488 requestControl.expectAndReturn( request.getRemoteAddr(), "http://localhost:8080", 2 );
489 requestControl.expectAndReturn( request.getDavSession(), new ArchivaDavSession(), 2 );
491 archivaConfigurationControl.replay();
492 repoContentFactoryControl.replay();
493 requestControl.replay();
495 resourceFactory.createResource( locator, request, response );
497 archivaConfigurationControl.verify();
498 repoContentFactoryControl.verify();
499 requestControl.verify();
501 fail( "A 404 error should have been thrown!" );
503 catch ( DavException e )
505 assertEquals( 404, e.getErrorCode() );
510 public void testRequestMetadataRepoIsLegacy()
513 defaultManagedRepositoryAdmin.addManagedRepository(
514 createManagedRepository( LEGACY_REPO, new File( "target/test-classes/" + LEGACY_REPO ).getPath(),
515 "legacy" ), false, null );
516 DavResourceLocator locator =
517 new ArchivaDavResourceLocator( "", "/repository/" + LEGACY_REPO + "/eclipse/maven-metadata.xml",
518 LEGACY_REPO, new ArchivaDavLocatorFactory() );
520 ManagedRepositoryContent legacyRepo = createManagedRepositoryContent( LEGACY_REPO );
522 // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
523 RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
524 resourceFactory.setRepositoryRequest( repoRequest );
528 archivaConfigurationControl.reset();
529 archivaConfigurationControl.expectAndReturn( archivaConfiguration.getConfiguration(), config );
530 repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( LEGACY_REPO ),
532 requestControl.expectAndReturn( request.getMethod(), "GET", 2 );
533 requestControl.expectAndReturn( request.getRemoteAddr(), "http://localhost:8080", 2 );
534 requestControl.expectAndReturn( request.getDavSession(), new ArchivaDavSession(), 2 );
536 archivaConfigurationControl.replay();
537 repoContentFactoryControl.replay();
538 requestControl.replay();
540 resourceFactory.createResource( locator, request, response );
542 archivaConfigurationControl.verify();
543 repoContentFactoryControl.verify();
544 requestControl.verify();
546 fail( "A 404 error should have been thrown!" );
548 catch ( DavException e )
550 assertEquals( 404, e.getErrorCode() );
554 class OverridingArchivaDavResourceFactory
555 extends ArchivaDavResourceFactory
558 OverridingArchivaDavResourceFactory( ApplicationContext applicationContext, PlexusSisuBridge plexusSisuBridge,
559 ArchivaConfiguration archivaConfiguration )
560 throws PlexusSisuBridgeException
562 super( applicationContext, plexusSisuBridge, archivaConfiguration );
565 protected boolean isAuthorized( DavServletRequest request, String repositoryId )
568 if ( RELEASES_REPO.equals( repositoryId ) )
570 throw new UnauthorizedDavException( repositoryId,
571 "You are not authenticated and authorized to access any repository." );
579 protected String getActivePrincipal( DavServletRequest request )
585 class OverridingRepositoryProxyConnectors
586 extends DefaultRepositoryProxyConnectors
588 public File fetchMetatadaFromProxies( ManagedRepositoryContent repository, String logicalPath )
590 File target = new File( repository.getRepoRoot(), logicalPath );
593 FileUtils.copyFile( new File( "target/test-classes/maven-metadata.xml" ), target );
595 catch ( IOException e )