From e0566ec1c16ce752410bc04e1d3905b95c41a913 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Mon, 14 Jul 2008 09:23:33 +0000 Subject: [PATCH] [MRM-872] -write the merged metadata into maven-metadata-${repoGroupId}.xml instead of merged-maven-metadata.xml git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@676526 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/archiva/webdav/ArchivaDavResourceFactory.java | 8 +++----- .../webdav/RepositoryServletRepositoryGroupTest.java | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java index 679c3daf3..39e21c38f 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java @@ -175,8 +175,6 @@ public class ArchivaDavResourceFactory */ private Digester digestMd5; - private static final String mergedMetadataFilename = "/merged-maven-metadata.xml"; - public DavResource createResource( final DavResourceLocator locator, final DavServletRequest request, final DavServletResponse response ) throws DavException @@ -303,9 +301,9 @@ public class ArchivaDavResourceFactory artifactId = StringUtils.substringAfterLast( artifactId, "/" ); ArchivaDavResource res = ( ArchivaDavResource ) availableResources.get( 0 ); - String filePath = StringUtils.substringBeforeLast( res.getLocalResource().getAbsolutePath().replace( '\\', '/' ), "/" ); - filePath = filePath + mergedMetadataFilename; - + String filePath = StringUtils.substringBeforeLast( res.getLocalResource().getAbsolutePath().replace( '\\', '/' ), "/" ); + filePath = filePath + "/maven-metadata-" + repoGroupConfig.getId() + ".xml"; + // for MRM-872 handle checksums of the merged metadata files if( repositoryRequest.isSupportFile( requestedResource ) ) { diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletRepositoryGroupTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletRepositoryGroupTest.java index e3c3303bd..26ff32ee1 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletRepositoryGroupTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletRepositoryGroupTest.java @@ -276,7 +276,7 @@ public class RepositoryServletRepositoryGroupTest response = sc.getResource( request ); assertResponseOK( response ); - assertEquals( "d2321a573e0488bca571b624f891104009408dd8 merged-maven-metadata.xml", response.getText() ); + assertEquals( "d2321a573e0488bca571b624f891104009408dd8 maven-metadata-group-with-valid-repos.xml", response.getText() ); // request the md5 checksum of the metadata request = @@ -285,7 +285,7 @@ public class RepositoryServletRepositoryGroupTest response = sc.getResource( request ); assertResponseOK( response ); - assertEquals( "79d271fbe8bd1d17b23273937750d407 merged-maven-metadata.xml", response.getText().trim() ); + assertEquals( "79d271fbe8bd1d17b23273937750d407 maven-metadata-group-with-valid-repos.xml", response.getText().trim() ); } protected void assertResponseMethodNotAllowed( WebResponse response ) -- 2.39.5