A question about publishing to Maven Central. I ha...
# multiplatform
a
A question about publishing to Maven Central. I have a library on GitHub and a publication setup via GitHub Actions. There are 5 jobs that publish different targets in parallel. The issue is that it creates multiple staging repositories in Nexus Repository Manager. So I have some questions: 1. Is it a problem at all? Maybe I should just close/release all the created repositories? 2. How people usually approach publications of MPP libs to Maven Central, specially if there are targets that must be built on different hosts (macOS/Windows/etc)
👀 1
a
Thanks @Big Chungus, this article is indeed useful, but it does not cover this particular topic, unless I'm missing something.
b
Have a read through that entire slack thread. Might be something directly useful for you there.
j
The easier way is just configure as normal and close the repos (one per machine), but you can take a look to @mbonnin GitHub, he has an action to just use one repo
m
The action creates a staging repo and forwards the repositoryId to different jobs
Closing individual repos works 'most of the times'. I've seen cases of split staging repos even when publishing from a single vm
j
Yeah, in these cases, I just drop them because they usually are corrupted
The nexus-gradle plugin or your approach should fix this problem I think
m
j
Yeah
👍 1
a
Thanks, I will check!
@Javier could explain in more detail how this plugin can fix the problem? The publication is executed separately from different hosts.
j
That plugin doesn't fix that problem at this moment. It fixes a problem where you get a random number of repos. For example, having only one machine, you should only get one repo, but sometimes, you get like 3 or 4 repos with the artifacts mixed randomly. That plugin ensures you get 1 repo per machine.
a
That makes sense, thanks. I will try the GitHub action trick.
Thanks @mbonnin, the Action works like a charm!
👍 1