Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.16 KB

sonatype_guide.adoc

File metadata and controls

33 lines (24 loc) · 1.16 KB

Sonatype Configuration Guide 📄

  1. Register an account on https://central.sonatype.com/ (if you don’t have one).

  2. Create a namespace on https://central.sonatype.com/publishing/namespaces. The purpose of this step is to prove that you own a domain name that can be published (which will eventually be the groupId of the published Maven repository). You can directly use GitHub’s domain name, like: io.github.your-username.

  3. Create a token on https://central.sonatype.com/account. This token will be used to authenticate the user when uploading the artifacts to the Maven Central Repository. You will get something like this:

<server>
  <username>username</username>
  <password>password</password>
</server>

Remember the username and password. For security reasons, we store this token in Gradle’s local configuration file (usually located at ~/.gradle/gradle.properties).

sonatypeUsername=username
sonatypePassword=password

Alternatively, provide an environment variable:

sonatypeUsername=username
sonatypePassword=password

💯 You have completed all the Sonatype configurations.