[MRM-216]

-generate/update checksums of metadata files


git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@636957 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2008-03-14 02:21:45 +00:00
parent f40410bae7
commit c9b6909ec6
1 changed files with 9 additions and 5 deletions

View File

@ -20,6 +20,7 @@ package org.apache.maven.archiva.web.action;
*/ */
import org.codehaus.plexus.xwork.action.PlexusActionSupport; import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import org.apache.maven.archiva.common.utils.Checksums;
import org.apache.maven.archiva.common.utils.VersionComparator; import org.apache.maven.archiva.common.utils.VersionComparator;
import org.apache.maven.archiva.common.utils.VersionUtil; import org.apache.maven.archiva.common.utils.VersionUtil;
import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.ArchivaConfiguration;
@ -146,6 +147,11 @@ public class UploadAction
*/ */
private ProjectModelWriter pomWriter; private ProjectModelWriter pomWriter;
/**
* @plexus.requirement
*/
private Checksums checksums;
public void setUpload( File file ) public void setUpload( File file )
{ {
this.file = file; this.file = file;
@ -405,10 +411,6 @@ public class UploadAction
{ {
metadata.setReleasedVersion( latestVersion ); metadata.setReleasedVersion( latestVersion );
} }
// TODO:
// what about the metadata checksums? re-calculate or
// just leave it to the consumers to fix it? or just delete it
// and let the consumers create a new checksum file?
} }
else else
{ {
@ -427,6 +429,8 @@ public class UploadAction
} }
RepositoryMetadataWriter.write( metadata, metadataFile ); RepositoryMetadataWriter.write( metadata, metadataFile );
checksums.update( metadataFile );
} }
public void validate() public void validate()