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 21865cafa..65aeae274 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 @@ -586,8 +586,11 @@ public class ArchivaDavResourceFactory DavResource resource = null; if ( isAuthorized( request, managedRepositoryContent.getId() ) ) { + boolean readMethod = WebdavMethodUtil.isReadMethod( request.getMethod() ); // Maven Centric part ask evaluation if -SNAPSHOT - String path = evaluatePathWithVersion( archivaLocator, managedRepositoryContent, request.getContextPath() ); + String path = readMethod ? + evaluatePathWithVersion( archivaLocator, managedRepositoryContent, request.getContextPath() ) + : getLogicalResource( archivaLocator, managedRepository, false ); if ( path.startsWith( "/" ) ) { path = path.substring( 1 ); diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java index 6db2b79ab..f1027f255 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java @@ -102,12 +102,12 @@ import java.util.Map; * Maven 2 repository format storage implementation. This class currently takes parameters to indicate the repository to * deal with rather than being instantiated per-repository. * FIXME: instantiate one per repository and allocate permanently from a factory (which can be obtained within the session). - *
+ *
* The session is passed in as an argument to obtain any necessary resources, rather than the class being instantiated * within the session in the context of a single managed repository's resolution needs. - *+ *
*/ -@Service( "repositoryStorage#maven2" ) +@Service("repositoryStorage#maven2") public class Maven2RepositoryStorage implements RepositoryStorage { @@ -129,7 +129,7 @@ public class Maven2RepositoryStorage private NetworkProxyAdmin networkProxyAdmin; @Inject - @Named( "repositoryPathTranslator#maven2" ) + @Named("repositoryPathTranslator#maven2") private RepositoryPathTranslator pathTranslator; @Inject @@ -139,7 +139,7 @@ public class Maven2RepositoryStorage private ApplicationContext applicationContext; @Inject - @Named( "pathParser#default" ) + @Named("pathParser#default") private PathParser pathParser; private static final String METADATA_FILENAME_START = "maven-metadata"; @@ -402,8 +402,7 @@ public class Maven2RepositoryStorage private List