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

Sample configuration for singing and publishing to maven central #710

Merged
merged 1 commit into from
May 6, 2024

Conversation

alpar-t
Copy link
Contributor

@alpar-t alpar-t commented Nov 21, 2023

This is a sample configuration to implement signing and publishing to maven central using a buildkite pipeline.

Note: The script will only work in buildkite. It will work as-it is without any changes there.
It's recomended to change use the https://github.com/elastic/vault-secrets-buildkite-plugin in the pipeline instead of the vault cli in the script.

I tested the signing locally and it works, the publishing fails with:

* What went wrong:
Execution failed for task ':java-client-serverless:publishMavenPublicationToMavenCentralSnapshotRepository'.
> Failed to publish publication 'maven' to repository 'MavenCentralSnapshot'
   > Could not PUT 'https://s01.oss.sonatype.org/content/repositories/snapshots/co/elastic/clients/elasticsearch-java-serverless/1.0.0-20231031-SNAPSHOT/maven-metadata.xml'. Received status code 401 from server: Unauthorized

But I tested that the credentials are passed correctly.
It most likeley fails because not all requirements are ment, see: https://central.sonatype.org/publish/requirements/
You can compare the example pom with yours and lookg at the other requirements. At least the javadoc and source jars are missing.

@alpar-t alpar-t requested a review from swallez November 21, 2023 15:26
@swallez swallez merged commit af747b2 into elastic:main May 6, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants