@@ -121,7 +121,7 @@ private fun publishGav(
121121 val newName = newArtifact.fileName()
122122 renamedFiles.add(FileWithPath (it.file, " $gavPath /${newName} " ))
123123
124- if (newArtifact.extension.substringAfterLast(' .' ) !in checksums ) {
124+ if (newArtifact.extension.substringAfterLast(' .' ) !in setOf ( " md5 " , " sha1 " , " sha256 " , " sha512 " ) ) {
125125 snapshotVersions.add(
126126 VersionMetadata .SnapshotVersion (
127127 classifier = newArtifact.classifier,
@@ -130,6 +130,8 @@ private fun publishGav(
130130 updated = lastUpdated.asTimestamp(false ),
131131 ),
132132 )
133+ } else {
134+ // Ignore the checksums in the list of files
133135 }
134136 }
135137
@@ -220,9 +222,6 @@ private fun publishGav(
220222
221223 val bytes = encodeToXml(newArtifactMetadata).toByteArray()
222224 transport.put(artifactMetadataPath, bytes)
223- checksums.forEach {
224- transport.put(" $artifactMetadataPath .$it " , bytes.digest(it.uppercase()))
225- }
226225}
227226
228227
@@ -247,8 +246,6 @@ internal fun Instant.asTimestamp(withDot: Boolean): String {
247246 )
248247}
249248
250- internal val checksums = setOf (" md5" , " sha1" , " sha256" , " sha512" )
251-
252249internal inline fun <reified T > encodeToXml (t : T ): String {
253250 return xml.encodeToString(t)
254251}
0 commit comments