The following is a guide on how to publish your SDK (referred to as an
artifact) to Maven Central.
Step 1: Decide what your Maven
groupId will be .
We recommend using a reverse domain name, as it's a common convention and it's easy to remember.
sdkto avoid a conflict with an existing groupId)
Alternatively, you can use your GitHub org name. For example,
here.Step 2: Create an account on Sonatype Jira. Create an account
Sonatype is a company that runs the Maven Central Repository, which is where we will be uploading our artifacts to.
Step 3: Create a new issue by hitting the Create button.
Step 4: Fill out the form.
Community Support - Open Source Project Repository Hosting (OSSRH)for Project.
New Projectfor Issue Type.
Step 5: Prove ownership in the ticket.
Before granting you the
groupId you requested, Sonatype will ask you to prove ownership of either the GitHub org or domain name that you based your
In the case of a domain name, you will be asked to add a DNS TXT to your domain. Example ticket here.
In the case of GitHub org, you will be asked to create a repo and the bot will check that the repo has been created. Example ticket here.
Step 6: You're ready to publish to your Maven repository!
Maven usernameis the username of your Sonatype account.
Maven passwordis the password of your Sonatype account.
Step 7: Choose your artifact name.
artifactId is a personal preference. Here are examples for inspiration:
stripe-java[this is our recommended approach]
Going forward, when referencing the artifact you'll use the
artifactId together. For example: