Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven publishing abandons staging repositories for existing package versions #874

Open
vinayak-kukreja opened this issue Sep 12, 2023 · 1 comment

Comments

@vinayak-kukreja
Copy link

Maven publishing is creating staging repositories even if the package version being released already exists in Maven. If there are a lot of such concurrent requests, this leads to Maven blocking publishing credentials since this impacts their cleanup process and also customers since it becomes a noisy neighbor issue.

We need to fix our publishing script to check for existing version before starting the publishing process.

Related issue with Maven: https://issues.sonatype.org/browse/OSSRH-94655

@mrgrain
Copy link
Contributor

mrgrain commented Sep 18, 2023

This command will check if a version exists and respond with the correct shell exit code:

curl --fail -ILs https://oss.sonatype.org/content/repositories/releases/io/github/cdklabs/projen/0.73.9/ > /dev/null

The URL is build as:

${MAVEN_ENDPOINT}/content/repositories/releases/${PACKAGE_URL}/${VERSION}

PACKAGE_URL is the package name as a url, which is any . replaced by /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants