Maven Gradle将RPM发布到Nexus Yum Repo在sha1文件上失败
我正试图通过Gradle将我们项目中的RPM工件发布到Nexus上的Yum Repo中:Maven Gradle将RPM发布到Nexus Yum Repo在sha1文件上失败,maven,gradle,rpm,maven-publish,Maven,Gradle,Rpm,Maven Publish,我正试图通过Gradle将我们项目中的RPM工件发布到Nexus上的Yum Repo中: publishing { repositories { ivy { url 'http://myrepo:8081/repository/myproject' credentials { username "aaa" password "xxx" }
publishing {
repositories {
ivy {
url 'http://myrepo:8081/repository/myproject'
credentials {
username "aaa"
password "xxx"
}
layout "pattern", {
artifact "${buildRpm.outputs.getFiles().getSingleFile().getName()}"
}
}
publications {
rpm(IvyPublication) {
artifact buildRpm.outputs.getFiles().getSingleFile()
}
}
}
}
当我运行/gradlew publish
时,这个任务会被接收并开始上传90MB的主.rpm工件。之后,它将失败,并出现以下错误:
> Task :search:publishRpmPublicationToIvyRepository FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':search:publishRpmPublicationToIvyRepository'.
> Failed to publish publication 'rpm' to repository 'ivy'
> Could not write to resource 'http://myrepo/repository/myproject/myproject-1.23.4.noarch.rpm.sha1'.
> Could not PUT 'http://myrepo/repository/myproject/myproject-1.23.4.noarch.rpm.sha1'. Received status code 400 from server: Invalid path for a Yum repository
如何防止上载.sha1文件?我只想上传RPM(这显然是本回购协议中唯一允许的事情)
我还尝试使用maven publish
而不是ivy publish
,但两者给出了类似的问题maven publish
尝试上载.pom,但出现类似失败
我可以使用curl手动上传RPM fine,但我更愿意使用Gradle插件和标准