]> source.dussan.org Git - archiva.git/commitdiff
[MRM-872]
authorMaria Odea B. Ching <oching@apache.org>
Mon, 14 Jul 2008 09:23:33 +0000 (09:23 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Mon, 14 Jul 2008 09:23:33 +0000 (09:23 +0000)
-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

archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java
archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletRepositoryGroupTest.java

index 679c3daf3e559816aa0026001aa0e7eb4660ec5d..39e21c38f6e051bbe5136398cf06c2236ff435ff 100644 (file)
@@ -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 ) )
                 {
index e3c3303bdbefdb625114291441f27712ff1d6d5a..26ff32ee107f4f28559f1ace84e0b0e4bf7704d6 100644 (file)
@@ -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 )