Repository Connector adds features for resolving artifacts from a Maven repository like Nexus or Artifactory.

When installing this plugin, you'll be given an additional build parameter 'Maven Repository Artifact' and a build step 'Artifact Resolver', allowing you to select versions from a remote repository and to download the artifact.

The Repository Connector Plugin can also be used to deploy artifacts to target servers and it uses Sonatype's Aether API internally to resolve artifacts from a repository and to determine the sorting order of versions.


The build parameter 'Maven Repository Artifact' allows for simple version selection and the build step 'Artifact Resolver' lets you download the artifact from a Maven repository without the need to install Maven.

It is possible to use the version selection feature of this plugin alone and let a Maven POM do the artifact download, or you can allow Jenkins to do the download before a script is invoked.

The way you use the plugin is completely up to you.

Using only the version selection feature makes sense when you have previously installed Maven and you want to have all aspects of the artifact processing under version control (see Maven example below)

Version Selection

String Parameter

You can use a simple string build parameter (e.g. 'VERSION') to enter a version as free text:

This string parameter can be used in the later stages of the job by specifying the property ${VERSION}. It can even be used in the version field of the Artifact Resolver build step.

Maven Repository Artifact Parameter

The version selection feature is provided by the build parameter 'Maven Repository Artifact':

When you click on "Build with Parameters" you will see a drop-down box with all the versions that have been found in the Maven repository:

The special versions "LATEST" and "RELEASE" are added to the list where the latter is the default selection (new, not yet-released feature, see JENKINS-28323).

The selected version is passed in 2 properties to the build:

Artifact Resolver Build Step

The 'Artifact Resolver' build step allows you to download the specified artifact in a build step. The location where the artifact is downloaded to can be specified by the parameters "target directory" and "target filename":

For passing the parameter version use


Global Configuration

The repositories to resolve the artifacts from, can be configured in Jenkins' global configuration section:


The following Maven POM downloads the artifact, and passes the path to the artifact to a shell script for further processing. The shell script also gets an environment parameter which comes from a "Choice Paramater" to determine the target environment on which to deploy the artifact.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   http://maven.apache.org/maven-v4_0_0.xsd">
  <name>Maven deployment template</name>







                <!-- dump all available properties -->
                <echoproperties />
                <exec dir="." executable="cmd" osfamily="windows">
                  <arg value="/c"/>
                  <arg value="deploy.cmd ${maven.dependency.com.foobar.templates.maventemplate-ear.ear.path} ${environment} ${distversion}"/>
                <exec dir="." executable="/bin/bash" osfamily="unix">
                  <arg value="-c"/>
                  <arg value="./deploy.sh ${maven.dependency.com.foobar.templates.maventemplate-ear.ear.path} ${environment} ${distversion}"/>

NOTE: This is just a suggestion. Instead of forking a shell script, all the necessary steps could als be performed by the Antrun Maven plugin.

Help and Support

For Help and support please use the Jenkins Users mailing list.
The comment list below is not monitored.

Version History

1.2.6 (05. June 2019)

1.2.5 (05. Mar 2019)

1.2.4 (18. May 2018)

1.2.3 (31. Jan 2018)

1.1.3 (29. March 2016)

1.1.2 (10. Sep 2015)

1.1.1 (28. Feb 2015)

1.1.0 (2. Feb 2015)

1.0.1 (16. Aug. 2014)

1.0.0 (18. July 2014)

0.8.2 (18. Feb. 2012)

0.8.0 (18. Sep. 2011)