Maven is a software project management and comprehension tool based on the project object model (POM). Maven can manage the build process, reporting, and documentation of a project from a central piece of information.
For more information, go to http://maven.apache.org/.
CloudBees CD/RO integration to Maven
The EC-Maven plugin calls the Maven tool through a command line interface and passes the user-provided parameters. It includes the most important features provided by the Maven tool. This plugin allows the input of any command with additional functional and configuration options, completely integrating Maven with CloudBees CD/RO.
CloudBees CD/RO provides advantages including checking parameters, using check boxes or radio buttons to easily select functional options, generating historical log reports and procedure duration statistics, attaching simple credentials, and generating real-time analysis of the log.
Plugin Version 2.4.9.2022041236
Revised on April 13, 2022
Setting up the plugin configuration
For all parameter descriptions below, required parameters are in bold italics. |
Input
Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined sets of parameters for end users, and store credentials securely. Each configuration has a unique name that is automatically entered in designated parameters in the procedures.
-
Go to Administration > Plugins to open the Plugin Manager.
-
Find the EC-Maven row.
-
Click Configure to open the Maven Configurations page.
-
Click Create Configuration.
-
To enable CloudBees CD to communicate with your JBoss AS, enter the following information. You may need to create additional configurations later, especially when using standalone and domain servers, because they use different port numbers.
Plugin procedures
Retrieve artifact
This procedure retrieves an artifact from Artifactory or the Nexus Maven repository.
Input
-
Go to the Retrieve Artifact procedure.
-
Enter the following parameters:
Parameter | Description |
---|---|
Configuration Name | The name of an existing Maven configuration. |
Public Server URL | The URL of the public (without authentication) Artifactory or Nexus server, such as http://repo.spring.io/. NOTE: This value must be in the configuration or in a procedure step. |
Repository | The name of the Artifactory or Nexus repository, such as repo. |
Artifact | The ID of artifact to retrieve, in form of artifact group:_artifact key_, such as org.apache.activemq:activemq-all. |
Version | The version of artifact to retrieve. Select Latest for latest version. Select Exact and enter the specific version, such as 4.0. For a snapshot retrieval, specify the snapshot version, e.g. 1.0-SNAPSHOT, and the plugin will look for maven-metadata.xml descriptor in the snapshot directory for the full version. |
Classifier | The classifier for the artifact. |
Artifact Extension | The type of the artifact extension, such as .jar or .txt. |
Retrieve to Directory | The directory where CloudBees CD put the artifact after it is retrieved. The default is the workspace directory. |
Overwrite | Select this to overwrite the file if it exists. |
Retrieved Artifact Location Property | Name of 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. The following data will be saved under the property sheet: filename, e.g. MyArtifact-1.0.0.jar destination - full path to the artifact in the file system, e.g. /tmp/MyArtifact-1.0.0.jar version - artifact version, e.g. 1.0.0 artifactUrl - URL, which was used to download the artifact. |

RunMaven
This procedure allows the input of all the necessary parameters and additional ones to make the tool more configurable. When the parameters are defined, the Maven command or script is created and run in CloudBees CD, which displays the results. The results include a summary of the selected source directories, classPath, total execution time, memory statistics, and a log file containing the output generated by the console.
Input
-
Go to the runMaven procedure.
-
Enter the following parameters:
Parameter | Description |
---|---|
Working Directory | Specify the directory where the Maven project is located. It has a file called POM.xml. |
Command | Enter the Maven command or script to run. |
Environment Variables | Set the environment variables that CloudBees CD uses to run the procedure step. Use the perl syntax to set the environment variables (for example, $ENV{PATH}=$ENV{PATH}.";%USERPROFILE%\\bin";). |
Errors | Select this parameter to generate execution error messages. This is the command-line --errors option. |
Debug | Select this parameter to generate execution debug output. This is the command-line --debug option. |
Never Fail | Select this parameter to set the build to never fail, regardless of the project result. This is the command-line --fail-never option. |
Fast Fail | Select this parameter to stop the build at the first failure in reactorized builds. This is the command-line --fail-fast option. |
Fail at the end | Select this parameter to set the build to fail after all the builds run. All builds that were not affected by the failed build continue to run. This is the command-line --fail-at-end option. |
Additional Options | Enter any valid Maven options to the command. |

Use cases
Release notes
EC-Maven 2.4.3
-
Fixed Retrieve Artifact from Artifactory procedure:
Retrieval logic for snapshots in "Retrieve Artifact from Artifactory" procedure has been fixed to use both the extension and the build number, during comparison with Maven metadata.
EC-Maven 2.4.0
-
Added "Retrieved Artifact Location Property" parameter to the "Retrieve Artifact" procedure.
EC-Maven 2.3.2
-
Fixed issue with configurations being cached for IE.
-
Select input field, when associated radio button was clicked.
EC-Maven-2.3.1 (July 15, 2015)
-
Added link to plugin Configuration Page in plugin step panels.
-
Renamed ElectricCommander to CloudBees CD.
EC-Maven-2.2.2 (February 24, 2015)
-
The plugin determines the latest version of the artifact from the versions node instead of the latest node in the XML file from Maven.
-
Minor Retrieve Artifact step UI change (allow selection only for one repository configuration options).
EC-Maven-2.2.1 (January 27, 2015)
-
Added the Classifier parameter to the Retrieve Artifact procedure.
-
The Retrieve Artifact procedure fails if CloudBees CD cannot determine the latest version of the artifact.
-
Added support to retrieve snapshots.
-
Added support for basic authentication.
-
CloudBees CD now retains the configuration across plugin upgrades.
EC-Maven-2.1.0 (August 2014)
-
Added support to retrieve artifacts from the Artifactory and Nexus repository servers.