Quickly releasing multiple SDKs to Maven Central fails
Environment
Ran a release of Maven and Gradle plugin.
Steps to Reproduce
- Release Gradle plugin
- Release Maven plugin right after Gradle plugin release succeeded
Expected Result
Both releases work
Actual Result
Second release fails with:
Error: There are more than 1 active repositories. Please close unwanted deployments.
Which seems to be coming from https://github.com/getsentry/craft/blob/1f5cca9e598bd33ed45704c2f7f1f7131401481b/src/targets/maven.ts#L694-L698
Maybe we could check the status of those open repositories as in the Sonatype UI it shows the staging repository with status "Released" including a note that it can safely be dropped.
As a workaround you can log into the "Sonatype Nexus OSS" UI and drop the staging repo manually after the first release.
Also it seems running more than one release targeting Maven Central in parallel causes all of them to fail. Not sure there's anything we can do about that though.
Maybe there's a way to have one repository per SDK / maven artifact to lower the chance of conflicts.