Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup

Repository Connector adds features


for resolving artifacts from a Maven repository like Nexus or Artifactory.

When installing this plugin, you'll get be given an additional build parameter 'Maven Repository Artifact' and a build step called 'Artifact Resolver'.


Build parameters can be used for , 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 to 'Artifact Resolver' lets you download the artifact from a Maven repository without the need to install Maven.

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

The way you use the plugin is completely up to you, the way of just selecting the version .

Using only the version selection feature makes sense when you have previously installed Maven installed anyway 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 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
  • Wiki Markup*\[0-SNAPSHOT,)* \ - a version range

This String 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.


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

Image RemovedImage Added

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.:

Image Added

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")

Respository Connector uses sonatypes aether api to resolve artifacts from a repository.



Wiki Markup
...instead of a fix version, you can also use '*RELEASE*' or '*LATEST*' to identify the newest release or the latest build of an artifact. Version ranges are supported too, e.g. *\[0-SNAPSHOT,)*

one is also able to define a job as parametrized and use the parameter within each field in the config - e.g. define a string parameter called 'VERSION' and use it as ${VERSION}

within the Version field in the config.

Image Removed


The repositories to resolve the artifacts from, can be configured in global config:

Image Removed

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

No Format
titlePassing parameter version
No Format
titlePassing parameter version example

Image Added

Global Configuration

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

Image Added


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.

Code Block
titleExample deployment POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
  <name>Maven deployment template</name>







                <!-- dump all available properties -->
                <echoproperties />
                <exec dir="." executable="cmd" osfamily="windows">
                  <arg value="/c"/>
                  <arg value="deploy.cmd ${} ${environment} ${distversion}"/>
                <exec dir="." executable="/bin/bash" osfamily="unix">
                  <arg value="-c"/>
                  <arg value="./ ${} ${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

Jira Issues
titleOpen issues

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