Create Maven plugin procedures

2 minute readExtensibilityDeveloper productivity

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Retrieve Artifact

Retrieves an artifact from a Maven repository.

Input parameters

Table 1. Retrieve Artifact input parameters
Parameter Description

Configuration name

Previously defined configuration for the plugin.

Public server URL

URL of the public Maven repository. For example, https://repo.spring.io/.

Repository

Required. Name of the Maven repository. For example, repo.

Artifact

Required. ID of the artifact to be retrieved. For example, org.apache.activemq:activemq-all.

Classifier

Artifact classifier.

Version

Artifact version. If not specified, the latest version is used.

Artifact extension

Required. Artifact type extension. For example, .jar, .txt.

Retrieve to directory

Directory to copy the artifact to. The default is the workspace directory.

Overwrite

Overwrite the file if it exists.

Retrieved artifact location property

Name of the property sheet path used by the step to create a property sheet. This property sheet stores information about the retrieved artifact version, including its location in the file system.

runMaven

Executes Maven commands.

Input parameters

Table 2. runMaven input parameters
Parameter Description

Working directory

Required. The working directory where the Maven project is located. There should be a pom.xml file properly configured in this location.

Command

Required. Provide the Maven command to execute.

Environment variables

Set environment variables during the step execution using Perl syntax.

Errors

Produces execution error messages. This is the command-line --errors option.

Debug

Produces execution debug output. This is the command-line --debug option.

Never fail

Never fail the build, regardless of the project result. This is the command-line --fail-never option.

Fast fail

Stop at first failure in reactorized builds. This is the command-line --fail-fast option.

Fail at the end

Only fail the build after it completes and allow all non-impacted builds to continue. This is the command-line --fail-at-end option.

Additional options

Add any valid Maven option to the command.