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

Replace defunct JCenter with Maven Central #22

Merged

Conversation

bannmann
Copy link
Contributor

Following up on #12 and #14, this PR should complete the work of publishing RR as a reusable library.

As JCenter was turned into a read-only archive in 2021, RR needs a new distribution repository. Using Maven Central has the added benefit that developers will not have to configure anything to consume the artifact, but just add a dependency to their project. The standard way to do this is to use Sonatype OSSRH (OSS Repository Hosting).

With this PR, the build should set all fields required by the OSSRH guidelines. The approach taken is based on this article.

Before merging this, do the following:

  1. Set up an OSSRH account and repository following the official guide.
  2. OSSRH may tell you to use a different server. If that's the case you need to adapt releaseRepo and snapshotRepo in the Gradle file accordingly.
  3. Put your credentials for GPG (signing.keyId, signing.password and signing.secretKeyRingFile) and OSSRH (ossrhUsername and ossrhPassword) into ~/.gradle/gradle.properties.
  4. Perform a publish with a snapshot version. Log in to OSSRH to verify the artifacts were uploaded.
    • Note: while snapshots can be consumed by developers (via the special OSSRH snapshots repository), unlike releases they do not get pushed to Maven Central.

After merging this, you should be able to publish a master build (non-snapshot versions) to OSSRH's Nexus. There, you can log in, find the staging repository for your build and trigger the release process which includes automated requirements validation. If successful, the build will be propagated to Maven Central in a matter of hours.

Let me know if you need any assistance with this.

@GuntherRademacher GuntherRademacher merged commit 6cab221 into GuntherRademacher:master Jan 19, 2023
@GuntherRademacher
Copy link
Owner

Great stuff. Thank you very much for your guidance, it worked exactly as you described it. The only thing that I had to add was signing the webapp.

@bannmann bannmann deleted the publish-rr-to-central branch January 20, 2023 06:42
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.

None yet

2 participants