The Release Nexus trigger allows Release to interact with Sonatype Nexus repositories. It uses the Nexus Server REST API to communicate and fetch information from Nexus repositories.
A Nexus trigger periodically polls a Nexus server for new versions of a specific artifact and triggers a release if a new version is published to the repository being watched.
The Release Nexus trigger is compatible with Nexus 2. It does not support Nexus 3.0.0.
To set up a Nexus server:
- In Release, go to Settings > Shared configuration. 1. Next to Nexus: Server, click +.
- In the Title box, type the name of the Nexus server.
- In the URL box, type the server address.
- In the Username and Password boxes, type the server log-in user ID and password.
Click Save to save the server.
To create a Nexus trigger:
- Add a trigger to the template, as described in Create a release trigger.
- In the Group Id box, type the group ID of the artifact.
- In the Artifact Id box, type the artifact ID of the artifact.
In the Version box, type the version of the artifact.
Here, you can use
RELEASE, and snapshot versions (such as
LATESTto trigger on both release and snapshot versions of a particular artifact. With
RELEASE, only release versions will be tracked. Triggering on redeployments of release versions (such as 1.0.0) is not supported.
- In the Packaging box, optionally type the packaging type of the artifact (such as
- In the Classifier box, optionally type the classifier of the artifact.
- In the Extension box, optionally type the artifact’s extension.
- If you want to suppress errors when an artifact is not found for the given GAV coordinates, select Trigger On Initial Publish. Select this option when the artifact was never published to Nexus and you want to trigger a release on the initial publish.
- In the Username and Password boxes, type the log-in user ID and password to use to connect to the server. If set, these will override the credentials defined in the Nexus server configuration.
- Finish saving the trigger, as described in Create a release trigger.
Note: The trigger requires a POM file to exist in the artifact directory. If you are using the Nexus Artifact Uploader plugin for Jenkins, note that it does not upload the POM file.
The output properties of the Nexus trigger are:
- Artifact Version: Latest artifact version retrieved from the Nexus repository
- Artifact Base Version: Latest artifact base version retrieved from the Nexus repository. For releases, this is the same as the
artifactVersion. For snapshots (such as
1.0-SNAPSHOT), it excludes the additional qualifiers
- Artifact Snapshot Build Number: Latest artifact snapshot build number retrieved from the Nexus repository
- Artifact Repository Path: Artifact path relative to the selected Nexus repository
The Triggers management page displays an actionable list of all triggers that you have permissions to view and manage, and provides the entry point for creating new triggers. For details, see Triggers.