diff --git a/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-release/verify.groovy b/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-release/verify.groovy index 9035b087..e2c45db0 100644 --- a/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-release/verify.groovy +++ b/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-release/verify.groovy @@ -2,3 +2,6 @@ assert new File( basedir, '../../hosted-repo/org/mojohaus/mrm/hostedrepo/its/dep assert new File( basedir, '../../hosted-repo/org/mojohaus/mrm/hostedrepo/its/deploy/1.0.0/deploy-1.0.0.pom').exists() assert new File( basedir, '../../hosted-repo/org/mojohaus/mrm/hostedrepo/its/deploy/1.0.0/deploy-1.0.0.pom.md5').exists() assert new File( basedir, '../../hosted-repo/org/mojohaus/mrm/hostedrepo/its/deploy/1.0.0/deploy-1.0.0.pom.sha1').exists() + +def logs = new File( basedir, 'build.log').text; +assert !logs.contains('[WARNING] Failed to upload checksum') \ No newline at end of file diff --git a/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-snapshot/verify.groovy b/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-snapshot/verify.groovy index c92bee49..6b7f8f69 100644 --- a/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-snapshot/verify.groovy +++ b/mrm-maven-plugin/src/it/hostedrepo/src/it/deploy-snapshot/verify.groovy @@ -7,4 +7,7 @@ dir.eachFileMatch(~/deploy-1\.0\.0-\d{8}\.\d{6}-1\.pom/) { path = it.absolutePat assert path != null : "Could not locate pom based on regular expression" assert new File(path).exists() assert new File(path + '.md5').exists() -assert new File(path + '.sha1').exists() \ No newline at end of file +assert new File(path + '.sha1').exists() + +def logs = new File( basedir, 'build.log').text; +assert !logs.contains('[WARNING] Failed to upload checksum') \ No newline at end of file diff --git a/mrm-servlet/src/main/java/org/codehaus/mojo/mrm/impl/maven/ArtifactStoreFileSystem.java b/mrm-servlet/src/main/java/org/codehaus/mojo/mrm/impl/maven/ArtifactStoreFileSystem.java index 6acc4a4d..de9398c9 100644 --- a/mrm-servlet/src/main/java/org/codehaus/mojo/mrm/impl/maven/ArtifactStoreFileSystem.java +++ b/mrm-servlet/src/main/java/org/codehaus/mojo/mrm/impl/maven/ArtifactStoreFileSystem.java @@ -345,6 +345,14 @@ public FileEntry put(DirectoryEntry parent, String name, InputStream content) th return new MetadataFileEntry(this, parent, path, store); } + if (name.startsWith("maven-metadata.xml") && (name.endsWith(".sha1") || name.endsWith(".md5"))) { + // checksum for metadata ... ignore now + // return something != null + // TODO add support for storing checksum files + // https://github.com/mojohaus/mrm/issues/179 + return new MetadataFileEntry(this, parent, path, store); + } + Artifact artifact = getArtifact(parent, name); if (artifact == null) {