Publishing to Maven Central

Maven Central is the defacto artifact repository for JVM based projects. Anyone can publish artifacts to it as long as they follow the rules. Follow this guide to register an account. You also must comply with all requirements otherwise deployment will fail. Fortunately JReleaser can verify many of those requirements before any artifacts are deployed.

Before continuing make sure that all artifacts to be deployed have been staged.

Maven Central requires artifacts to be signed with PGP. The Nexus2 deployer automatically enables applyMavenCentralRules when the publication url contains This setting performs the following tasks:

  • verify POMs comply with publication rules (using PomChecker).

  • assert that matching -sources.jar and -javadoc.jar artifacts have been staged (when applicable).

  • calculate md5, sha1, sha256, and sha512 checksums for all staged artifacts.

  • sign all staged artifacts.

You have the option to close and release the staged repository automatically right after deployment, or keep the staged repository open and perform close and release operations using the UI. You must login into Sonatype OSSRH using your Sonatype account to do so.

As described here, Sonatype projects created before February 2021 may need to use "" instead of "". Using incorrect url may cause 'Could not find a staging profile matching …​' error.
  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

  active: ALWAYS
  armored: true

        active: ALWAYS
        closeRepository: true
        releaseRepository: true
          - target/staging-deploy
  active = "ALWAYS"
  armored = true

  active = "ALWAYS"
  url = ""
  closeRepository = true
  releaseRepository = true
  stagingRepositories = ["target/staging-deploy"]
  "jreleaser": {
    "signing": {
      "active": "ALWAYS",
      "armored": true
    "deploy": {
      "maven": {
        "nexus2": {
          "maven-central": {
            "active": "ALWAYS",
            "url": "",
            "closeRepository": true,
            "releaseRepository": true,
            "stagingRepositories": [
jreleaser {
  signing {
    active = 'ALWAYS'
    armored = true
  deploy {
    maven {
      nexus2 {
        maven-central {
          active = 'ALWAYS'
          url = ''
          closeRepository = true
          releaseRepository = true

The following secrets must be configured either using environment variables or the secrets configuration file:






Publication of snapshots is not allowed.