I have problems when publishing to maven central. Occasionally I see that two (or more) repositories...
e
I have problems when publishing to maven central. Occasionally I see that two (or more) repositories are created. I thought I had worked around it by setting the number of Gradle workers to 1.
😶 2
so the main module jar is in
openrndr-1023
while the rest is in
openrndr-1022
. This makes the publication useless because the repositories fail the tests that are run on close.
ah. I just learned that this is a common problem that should be fixed by using https://github.com/gradle-nexus/publish-plugin. Just begs the question why this broken functionality is in stock Gradle without any warning.
âž• 2
v
Because it is not a problem of Gradle, but of Nexus in combination with the host you are building on. If Nexus receives uploads from different IPs, it puts them into different repositories, as it assumes the uploads come from different machines. Some CI services use different outgoing IPs, partly even for each request. The gradle-nexus/publish-plugin works around this by a dedicated Nexus integration, first opening a staging repository explicitly and then configuring the uploads to be targeted specifically to that one repository.
z
this has nothing to do with Kotlin, please take it elsewhere
e
@Vampire it is an upload from a single IP though
v
I've only seen it with upload from different IPs. But anyway using that plugin is a good idea for uploading to a Nexus instance. And Zac is right of course, this is not Kotlin related, so if you want to discuss further, maybe open a thread in the Gradle slack.
k
Do you have
org.gradle.parallel=true
anywhere in your scripts?
e
I have, it also makes the difference between 20 minutes or 3 minutes to publish. I am glad it is all solved by switching to publish-plugin
v
org.gradle.parallel
should not make a difference regarding that problem, as it is just about running tasks from different projects in parallel
e
it should not, unless nexus has problems dealing with near simultaneous uploads?
k
It absolutely makes a difference for me. Every time I publish a new release of Radiance, I have to turn it to
false
to prevent it from publishing modules in parallel and making multiple repos in Nexus.
v
Interesting. But without the nexus publish plugin I guess.