From c9b6909ec62d9538b8ba9649234d0567b44af7d9 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Fri, 14 Mar 2008 02:21:45 +0000 Subject: [PATCH] [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 --- .../maven/archiva/web/action/UploadAction.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java index 045a3203f..8df8f8e2e 100644 --- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java @@ -20,6 +20,7 @@ package org.apache.maven.archiva.web.action; */ 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.VersionUtil; import org.apache.maven.archiva.configuration.ArchivaConfiguration; @@ -145,6 +146,11 @@ public class UploadAction * @plexus.requirement role-hint="model400" */ private ProjectModelWriter pomWriter; + + /** + * @plexus.requirement + */ + private Checksums checksums; public void setUpload( File file ) { @@ -405,10 +411,6 @@ public class UploadAction { 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 { @@ -427,8 +429,10 @@ public class UploadAction } RepositoryMetadataWriter.write( metadata, metadataFile ); + + checksums.update( metadataFile ); } - + public void validate() { try -- 2.39.5