Skip to content

Releasing

Releasing Deployment from OSSRH to the Central Repository - Introduction⚓︎

Once released/published, you will not be able to remove/update/modify that artifact

We provide the option to publish artifacts using the -SNAPSHOT suffix in case that you need to do any test on your publishing process, but once it is released there is no possibility to change it. Please check the Can I change (modify, delete, update) a component on Central? FAQ for more details.

After a successful deployment to OSSRH your components are stored in a separate, temporary repository, that is private to your projects members. In order to get these components published you will have to 'release' them. If you find any issues upon examination in the repository, you can also Drop the staging repository. This allows you to re-run the deployments after fixing any issues found and avoids the publication of these components into the release repository and sub-sequentially into the Central Repository.

Typically, this process is done manually, but it is also possible to trigger the actions from the command line.

Login into OSSRH⚓︎

You need to log in to OSSRH available at https://s01.oss.sonatype.org/ in order to access and work with your staging repositories.

Note: As of February 2021, all new projects began being provisioned on https://s01.oss.sonatype.org/. If your project was provisioned before this date, please log in to the legacy host https://oss.sonatype.org/.

Locate and Examine Your Staging Repository⚓︎

Once you are logged in you will be able to access the Build Promotion menu in the left hand navigation and select the Staging Repositories item. The Staging Repositories tab with a long list of repositories will be displayed.

OSSRH with Build Promotion Menu

The staging repository you created during the deployment will have a name starting with the groupId for your projects with the dots removed appended with a dash and a 4-digit number. E.g. if your project groupId is com.example.applications, your staging profile name would start with comexampleapplications. The sequential numbers start at 1000 and are incremented per deployment, so you could e.g. have a staging repository name of comexampleapplication-1010.

Select the staging repository and the panel below the list will display further details about the repository. In addition, the buttons Close and Release will be activated.

Staging Repository

Close and Drop or Release Your Staging Repository⚓︎

After your deployment the repository will be in an Open status. You can evaluate the deployed components in the repository using the Contents tab. If you believe everything is correct you, can press the Close button above the list. This will trigger the evaluations of the components against the requirements.

Closing will fail if your components do not meet the requirements. If this happens, you can press Drop and the staging repository will be deleted. This allows you to correct any problems with the components and the deployment process and re-run the deployment. Details are available in the Activity tab below the list by selecting. Press on the individual steps for further details.

Once you have successfully closed the staging repository, you can release it by pressing the Release button. This will move the components into the release repository of OSSRH where it will be synced to the Central Repository.

Note that deploying with the Nexus Staging Maven plugin or Ant tasks will, by default, automatically attempt to close the staging repository upon deployment and can be used to release the staging repository from the command line as well. This allows you to avoid logging into the OSSRH user interface altogether. More details can be found in the Maven and Ant sections of this guide.