Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View Repository Connector on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

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:

  • 1.0.0 - a regular version
  • RELEASE - the latest release version
  • LATEST - the latest version, which is usually a SNAPSHOT version
  • [0-SNAPSHOT,) - a version range

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:

  • <groupId>.<artifactId>=<version> (e.g. "commons-collections.commons-collections=1.0.0")
  • <global-repo-name>=<version> (e.g. "central=1.0.0")

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

Passing parameter version
Passing parameter version example

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.

Example deployment POM
<?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

type key summary

Data cannot be retrieved due to an unexpected error.

View these issues in Jira

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)

  • fix JENKINS-52669: IndexOutOfBoundsException after upgrade to 1.2.3

1.2.5 (05. Mar 2019)

  • don't store repository credentials in plain text

1.2.4 (18. May 2018)

  • fix JENKINS-50293: Repository Connector Plugin does not use Jenkins configured proxy correctly
  • fix JENKINS-50963: UpdatePolicy reset to default on edit 

1.2.3 (31. Jan 2018)

1.1.3 (29. March 2016)

  • integrate JENKINS-30671 expand tokens in file for artifact deploy

1.1.2 (10. Sep 2015)

  • Implemented JENKINS-28323: Add RELEASE and LATEST to version selection dropdown list
  • fix JENKINS-27678: NullPointerException when non proxy hosts is not set
  • Implemented JENKINS-27641: Name of version selection build parameter should be customized
  • fix JENKINS-17541 target directory does not expand token macro parameters
  • fix JENKINS-29166 list of artifacts stored on maven repository not refreshed
  • fix JENKINS-20263 Artifact Resolver does not retrieve the latest version from central Maven Repository

1.1.1 (28. Feb 2015)

1.1.0 (2. Feb 2015)

1.0.1 (16. Aug. 2014)

1.0.0 (18. July 2014)

  • fix JENKINS-17541 target directory does not expand token macro parameters
  • integrate PR #3 (thanks to mrumpf!)
    • Sort the list of Maven repositories in the global configuration page
    • Added I18N and translated all help files and texts to german
    • Extracted the global configuration from the ArtifactResolver and moved it into the central class GlobalConfiguration
    • Added the version selection build parameter
    • When your ArtifactResolver build step and the build parameter is used in one job, the version, selected by the builld parameter overrides the version of the ArtifactResolver build step.
    • Added proxy support which makes the plugin usable in corporate environments

0.8.2 (18. Feb. 2012)

0.8.0 (18. Sep. 2011)

  • add support for variable resolving in configuration


  • update to aether 1.12 and fix a classloader issue


  • update to aether 1.11 and fix update policy issue


  • now supports to configure the repository update policy (for earch builder individually)


  • Inital


  1. Unknown User (geronimo)

    Why would I ever wish to download an artefact from a Maven repository as additional build step? Perhaps when using Ant without Ivy? Nevertheless, the missing functionality is something urgently needed.

  2. Unknown User (andrewmo)


    I have a parameterized build and I wish to use the value of the parameter as my "Version" when retrieving the artifact.

    e.g. I have defined a parameter called My_Version.  the user enters "1.0.1-SNAPSHOT"

    I have tried to use $My_Version, %My_Version% and many others, but nothing works.

    Is there a way to do this?

    Thank you.


    1. Unknown User (maqy)

      You can use ${VERSION}

      1. Unknown User (sushil)

        Hi, I tried with $

        Unknown macro: {VERSION}

        but its still not working. I want version parameter value to pass into a shell script which I'm calling in "publish over SSH". The problem is when I use $

        Unknown macro: {group_id.artifact_id}

        and pass it to shell script then unix treat these '.' periods in special way and not getting the the value of the expression. Your quick help will be appreciated. 

  3. Unknown User (maqy)

    I just want to say I really love this plugin, we have artifacts generated by a tool in a external server and we needed to download them as part of the deployment. The only thing I don't understand is what are the fields "Release update policy" and "Snapshot update policy" for.

  4. Unknown User (leonkatz)

    Couple of usability issues. Bug 20263 is big problem, especially if you start using this for many jobs. It would be nice if you could set the storage for version files in job, or just have it in the workspace by default. I have a DEV job and a QA job, for the DEV job, I want to see both snapshot and release versions, and for the QA jobs, I only want to see the release versions. It was fine when I only had one of the jobs, because i only had to set the release repo for the plugin repos, but now i need to get both release and snapshot repos so both versions show up in the version dropdown which makes the list larger and defeats the purpose of having release versions.

    To get around bug 20263, I have  a separate job that runs a shell command to delete the directory configured for storing the version information in the global config. Then this job has to reload all of the versions when I run it, which takes some time. I need to have this clear job run after each run of the current job that uses this plugin, and I have to run this clear job every time I do a build so it will see the new versions next time I run the resolver job.

  5. Unknown User (keeplearning7)

    Hi, does this download the artifact to the local Jenkin job's workspace ?

  6. Unknown User (hujirong)

    https://wiki.jenkins-ci.org/display/JENKINS/Upload+artifacts+to+nexus+Plugin. In this post, @Brenton B says the Repository Connector plugin can also be used to upload artifacts to Nexus/Artifactory. Can anyone tell me how?

    1. Unknown User (brantone)

      The pull request to allow for this elegantly is still outstanding: https://github.com/jenkinsci/repository-connector-plugin/pull/15

  7. Unknown User (brantone)

    Lots of pull requests out standings, any chance of merges?

  8. Unknown User (aribiross_1)

    Cool plugin! But how do I use it in a Shell build step?

    I've configured the plugin appropriately and got all the versions I need from the Nexus at build time as intended, but what is the build parameter that can be used in an Execute Shell build step? or is there?

    The plugin is configured with the following params:

    Repository: myCompany

    Property Name: selectedVersion

    Group Id: com.myCompany

    Artifact Id: someArtifact



    I'm only need the version I selected, what parameter would that be? When I use ${selectedVersion} I get nothing.


  9. Unknown User (mohit_dharamshi)

    For those getting a null or empty parameter, you must have noticed that for that particular build, the list of parameters will also be empty.

    JIRA ticket:  JENKINS-35920 - Getting issue details... STATUS

    This is due to a security issue with the plugin (Security-170): https://jenkins.io/security/advisory/2016-05-11/

    There are other plugins also affected by this: Plugins affected by fix for SECURITY-170

    This PR: https://github.com/jenkinsci/repository-connector-plugin/pull/19 already solves this problem and has been merged. A public release is pending.