我正在尝试将图书馆部署到Maven Central(我之前做过很多次),但是在这种情况下,它包含许多不同平台的出版物。 maven-publish
插件上传的上传插件有效,但我最终在sonatype中有多个存储库,每个存储库中包含文件的子集:
结果,我无法关闭存储库是因为某些文件总是缺少的(只有所有存储库都包含通过Sonatype验证所需的所有文件)。
Sonatype文档说:
为用户ID,IP地址和用户代理的每个组合创建一个单独的登台存储库。
( https://help.sonatype.com/repomanager2/repomanager2/staging-releases/管理舞台重新构件)
所有三个参数对于创建的存储库都是相同的,因此应该创建一个单个参数。
这是在本地发布以及从GitHub动作中发布时发生的。
在这里: https://github.com/1gravity/kotlin-bloc
回购 发布脚本:
任何帮助都非常感谢!
I'm trying to deploy a library to Maven Central (which I have done many times before) but in this case it contains many different publications for different platforms. The upload by the maven-publish
plugin works but I end up with multiple repositories in Sonatype with each repository containing a subset of the files:

As a result, I cannot close the repositories because some files are always missing (only all repositories together contain all files needed to pass Sonatype's validation).
The Sonatype documentation says:
A separate staging repository is created for every combination of User ID, IP Address, and User Agent.
(https://help.sonatype.com/repomanager2/staging-releases/managing-staging-repositories)
All three parameters are identical for the created repositories though so it should create a single one.
This happens when publishing locally and also when publishing from a Github action.
The repo is here: https://github.com/1gravity/Kotlin-Bloc
This is the publish script: https://github.com/1gravity/Kotlin-Bloc/blob/master/buildSrc/src/main/kotlin/bloc-publish.gradle.kts
Any help is highly appreciated!
发布评论
评论(1)
在您的
gradle.properties
中,您有org.gradle.parallel = true
。我遇到了同样的问题,并通过将其设置为
false
来解决。您可以在命令行上使用
./ gradlew publish -dorg.gradle.parallel = false
显然,Sonatype与Gradle Parallel builds的效果不佳。
In your
gradle.properties
, you haveorg.gradle.parallel=true
.I had the same issue and resolved it by setting it to
false
for publishing.You can do so on the command line by publishing with
./gradlew publish -Dorg.gradle.parallel=false
Apparently, sonatype does not play well with gradle parallel builds.