aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2008-07-14 09:23:33 +0000
committerMaria Odea B. Ching <oching@apache.org>2008-07-14 09:23:33 +0000
commite0566ec1c16ce752410bc04e1d3905b95c41a913 (patch)
treebab49658a3c5652b3d7a74d3e6abd92ed3a38536
parent7f83fefd8d94efea0faff0b02fe483da7f778bef (diff)
downloadarchiva-e0566ec1c16ce752410bc04e1d3905b95c41a913.tar.gz
archiva-e0566ec1c16ce752410bc04e1d3905b95c41a913.zip
[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
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java8
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletRepositoryGroupTest.java4
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 )