logo Nexus Staging Maven Plugin

Provides support to access staging functionality in a remote Nexus Professional server.

homepage:
fresh index:
last release: 3 years ago, first release: 9 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
nexus-staging:rc-release

Releases a single closed Nexus staging repository into a permanent Nexus repository for general consumption.

nexus-staging:close

Closes a Nexus staging repository.

nexus-staging:deploy (phase: deploy)

Alternative deploy mojo, that will select proper {@link DeployStrategy} to perform deploys. Hence, this mojo might function in same was as maven-deploy-plugin's deploy mojo, but also might do deferred deploy or staging.

nexus-staging:promote

Promotes a closed Nexus staging repository into a Nexus Build Promotion Profile.

nexus-staging:deploy-staged

Deploys the (previously) locally staged artifacts from nexus-staging repository, that were staged using {@link DeployMojo} and having the {@link DeployMojo#skipRemoteStaging} flag set to {@code true}.

nexus-staging:rc-drop

Drops a Nexus staging repository that is either open or closed.

nexus-staging:rc-open

Opens a new Nexus staging repository.

nexus-staging:rc-promote

Promotes a closed Nexus staging repository into a Nexus Build Promotion Profile.

nexus-staging:help

Display help information on nexus-staging-maven-plugin. Call mvn nexus-staging:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

nexus-staging:drop

Drops a Nexus staging repository that is either open or closed.

nexus-staging:deploy-staged-repository

Deploys the (previously) staged artifacts from some local repository, that were staged using {@code maven-deploy-plugin} together with switch {@code altDeploymentRepository} for cases when POM modifications are not possible for some reason. In contrast to {@link DeployMojo} and {@link DeployStagedMojo} mojos, this mojo takes an "image" of the previously deployed (to local FS) in some previous build, and uploads the whole directory (with all files and subdirectories) "as-is" to a staging repository on Nexus. Naturally, this will would work only for a build of a released project (like a tag checkout). Since POM is not editable -- otherwise you would not be using this but the {@link DeployMojo} --, the intent with this Mojo is to be called directly, fully parameterized. At least, you have to set {@code nexusUrl}, {@code serverId}, {@code stagingProfileId} (also {@code stagingRepositoryId} if needed) and {@code repositoryDirectory} parameters on CLI.

nexus-staging:release

Releases a single closed Nexus staging repository into a permanent Nexus repository for general consumption.

nexus-staging:rc-list

Lists staging repositories accessible by current user available on Nexus.

nexus-staging:rc-list-profiles

Lists staging profiles accessible by current user available on Nexus.

nexus-staging:rc-close

Closes a Nexus staging repository.

Often used code snippets:

<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.7</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>ossrh</serverId>
    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
    <autoReleaseAfterClose>true</autoReleaseAfterClose>
  </configuration>
</plugin>
<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.3</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>ossrh</serverId>
    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
    <autoReleaseAfterClose>true</autoReleaseAfterClose>
  </configuration>
</plugin>
<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.8</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>ossrh</serverId>
    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
    <autoReleaseAfterClose>true</autoReleaseAfterClose>
  </configuration>
</plugin>
<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.5</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>sonatype-nexus-staging</serverId>
    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
    <autoReleaseAfterClose>true</autoReleaseAfterClose>
  </configuration>
</plugin>
<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.5.1</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>sonatype-nexus-staging</serverId>
    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
    <autoReleaseAfterClose>true</autoReleaseAfterClose>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.