近日在发布lib
包到maven
仓库时,出现了以下错误(但是还是可以发布成功):
> Task :xxxxLib:publishMavenPublicationToMavenRepository
Cannot upload checksum for snapshot-maven-metadata.xml. Remote repository doesn't support sha-256. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha256'. Received status code 400 from server: Invalid path for a Maven 2 repository
Cannot upload checksum for snapshot-maven-metadata.xml. Remote repository doesn't support sha-512. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha512'. Received status code 400 from server: Invalid path for a Maven 2 repository
Cannot upload checksum for module-maven-metadata.xml. Remote repository doesn't support sha-256. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha256'. Received status code 400 from server: Invalid path for a Maven 2 repository
Cannot upload checksum for module-maven-metadata.xml. Remote repository doesn't support sha-512. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha512'. Received status code 400 from server: Invalid path for a Maven 2 repository
解决方式如下:
在gradle.properties
文件中增加配置,不检查sha-256
和``sha-512文件:
systemProp.org.gradle.internal.publish.checksums.insecure=true
网友评论