org.sonatype.plugins:nexus-staging-maven-plugin-testsuite

${project.name}

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.sonatype.plugins
ArtifactId

ArtifactId

nexus-staging-maven-plugin-testsuite
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

${project.name}
Project Organization

Project Organization

Sonatype, Inc.

Download nexus-staging-maven-plugin-testsuite

How to add to project

<!-- https://jarcasting.com/artifacts/org.sonatype.plugins/nexus-staging-maven-plugin-testsuite/ -->
<dependency>
    <groupId>org.sonatype.plugins</groupId>
    <artifactId>nexus-staging-maven-plugin-testsuite</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.sonatype.plugins/nexus-staging-maven-plugin-testsuite/
implementation 'org.sonatype.plugins:nexus-staging-maven-plugin-testsuite:1.0.0'
// https://jarcasting.com/artifacts/org.sonatype.plugins/nexus-staging-maven-plugin-testsuite/
implementation ("org.sonatype.plugins:nexus-staging-maven-plugin-testsuite:1.0.0")
'org.sonatype.plugins:nexus-staging-maven-plugin-testsuite:jar:1.0.0'
<dependency org="org.sonatype.plugins" name="nexus-staging-maven-plugin-testsuite" rev="1.0.0">
  <artifact name="nexus-staging-maven-plugin-testsuite" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.sonatype.plugins', module='nexus-staging-maven-plugin-testsuite', version='1.0.0')
)
libraryDependencies += "org.sonatype.plugins" % "nexus-staging-maven-plugin-testsuite" % "1.0.0"
[org.sonatype.plugins/nexus-staging-maven-plugin-testsuite "1.0.0"]

Dependencies

test (10)

Group / Artifact Type Version
junit : junit jar 4.12
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
org.apache.maven.shared : maven-verifier jar 1.3
org.sonatype.goodies : goodies-httpfixture jar 2.3.0
org.sonatype.sisu : sisu-file-tasks jar 1.9
org.sonatype.sisu.litmus : litmus-testsupport jar 1.9
org.eclipse.sisu : org.eclipse.sisu.inject jar 0.3.1
com.sonatype.nexus : nexus-platform-api jar 3.4.20181205-180005.1567c7b
com.jayway.awaitility : awaitility jar 1.7.0
com.sonatype.nexus.testsuite » nxrm-pro-image tar.gz 3.15.2-01

Project Modules

There are no modules declared in this project.

NXRM3 Maven Plugin

Maven Central

This plugin handles Nexus Repository Manager 3 operations for Maven projects.

Example configuration

The basic build configuration requires a url (nexusUrl), repository to deploy (repository) and a server (serverId).

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nxrm3-maven-plugin</artifactId>
        <version><!-- choose a version --></version>
        <extensions>true</extensions>
        <configuration>
          <nexusUrl>http://localhost:8081</nexusUrl>
          
          <!-- The server "id" element from settings to use authentication from settings.xml-->
          <serverId>local-nexus</serverId>
         
          <!-- Which repository to deploy to -->
          <repository>maven-releases</repository>
          
          <!-- Skip the staging deploy mojo -->
          <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
        </configuration>
      </plugin>

To override the default deploy goal add the following to the plugin. This can be used if more control is desired over when the plugins deploy goal is activated.

        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>

Staging

Example staging usage

The plugin allows a tag to be specified via -Dtag or as a parameter in the plugin configuration in the pom file.

e.g. mvn install nxrm3:staging-deploy -Dtag=test or

<plugin>
    ...
    <configuration>
      ...
      <tag>...</tag>
       ...

If no tag is specified, one will be generated in the format:

<artifactId>-<version>-<timestamp>

e.g. myproject-1.5.7-1550242817039

Performing a staging move

The plugin currently provides a means for performing a move of artifacts. The move is performed by conducting a search in a repository for all artifacts tagged with a defined tag. The move operation has three configuration properties, tag, sourceRepository, and destinationRepository.

The tag can be specified via -Dtag or the plugin configuration in the pom file. If a tag has not been specified, the plugin will attempt to find a tag previously used (and stored) in the target directory of project's the build.

sourceRepository is an optional configuration property which can be specified via -DsourceRepository or the plugin configuration in the pom file.

NOTE: If the source repository property is not specified, the plugin will default to the repository property in the plugin configuration in the pom file.

The target repository is a required configuration property specified via -DdestinationRepository or within the plugin configuration in the pom file.

Staging Move Usage Example

e.g. mvn nxrm3:staging-move -Dtag=build-123 -DsourceRepository=maven-dev -DdestinationRepository=maven-qa

<plugin>
    ...
    <configuration>
      ...
      <!--Optional configuration -->
      <sourceRepository>...</sourceRepository>
       ...
       
      <!--Required configuration -->
      <destinationRepository>...</destinationRepository>
        ...
        
      <tag>...</tag>

Performing a staging delete

The plugin provides a means for performing a delete of tagged artifacts. The delete operates in a similar way to the move operation whereby it performs a search for all artifacts with the specified tag. The delete operation makes use of a single property tag and operates as described in Example staging usage

Staging Delete Usage Example

mvn nxrm3:staging-delete -Dtag=build-123

Note: Delete searches all repositories for tagged assets.

Mutation testing

Run mvn -DwithHistory org.pitest:pitest-maven:mutationCoverage to calculate mutation coverage. This needs to be run from inside the maven-plugin directory rather than at the root of the project to detect the tests.

Integration testing

To run the integration tests against a docker instance specify the port you would like the tests to run on:

-Dnexus.it.port=8085

e.g. mvn clean install -Dnexus.it.port=8085

To run the integration tests against a local instance use the profile local-nexus3

e.g. mvn clean install -Plocal-nexus3

Getting Help

Looking to contribute or need some help?

org.sonatype.plugins

Sonatype

Developer friendly, full-spectrum software supply-chain management

Versions

Version
1.0.0