Jenkins Maven Repository Server

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID repository Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
1.2 (archives)
Jan 12, 2014
token-macro (version:1.7, optional)
promoted-builds (version:2.10, optional)
git (version:1.1.29)
maven-plugin (version:2.1)
Source Code
Issue Tracking
Pull Requests
Open Issues
Pull Requests
Nigel Magnay (id: magnayn)
Bastiaan Schaap (id: bjwschaap)
Usage Installations 2014-Nov 761
2014-Dec 754
2015-Jan 794
2015-Feb 811
2015-Mar 865
2015-Apr 858
2015-May 882
2015-Jun 868
2015-Jul 931
2015-Aug 889
2015-Sep 936
2015-Oct 975

This plug-in exposes project builds as a maven repository so the artifacts can be picked up by downstream builds or other systems.

Use in a Maven build pipeline

1. Add the following to the jenkins maven settings.xml file:

Add maven setting

Add -Pupstream to your maven 'goals and options' (e.g: -Pupstream clean install) to turn on the above profile.

Check the "Define Upstream Maven Repository" checkbox item

Set a specific project, or the project that caused this build.


After installation, archived build artifacts of your Maven jobs will be available as a maven repository so that other tools or builds that understand maven repositories can use them directly, without having to upload them to a separate server first.

By Build

Thus an artifact from build 4 of project helloworld might be


Alternatively, if your build was executed from source stored in a GIT repository, you can access it via the SHA1 id. The plugin will return the most recent successful build artifacts.


Thus an artifact from build 4 of project helloworld might be



This feature could be used (with an appropriate script) to allow a developer who checks out a particular branch, to automatically sync his local repository with the correctly built artifacts stored in jenkins. You can access the build without the project name:


Therefore you could sync your repository with something like the following:

wget -e robots=off -P ~/.m2/repository -np -r -nH --cut-dirs=4 http://jenkins:8080/plugin/repository/SHA1/`git rev-parse HEAD`/
All Builds

A repository containing all build artifacts is available at


Chained Builds

The above examples return repositories containing just the artifacts from the particular build. You can get access to a repository that also contains any upstream resources by substituting 'repository' for 'repositoryChain'. E.g:



Care is needed due to aliasing of artifacts if you have multiple projects generating artifacts with the same coordinate with the 'everything' and 'repositoryChain' modes.

Version History

0.9 Various fixes for content-type rendering, maven-metadata.xml generation, checksums and snapshot versions.

* New UI extension to simplify jobs that need to point to specific (typically upstream) repositories
* The repository now supports WebDAV, so it can be browsed/connected to by WebDAV clients
* Ships with a tools repository containing a maven plugin. This plugin can be used to synchronise a local machine with artifacts contained in a build in Jenkins.
0.5 Introduce an extension point
0.4 Fix resolving artifacts with different canonicalNames (e.g pom files)
0.3 * pom.xml artifacts renamed to artifact-version.pom (canonicalName)
* don't expose part-built project repositories
* New top-level repository, like 'everything', called 'SHA1' (so developers can wget build repo without having to know Jenkins project name)
* Add tokens for token-macro plugin of ${REPOSITORY_UPSTREAM} and ${REPOSITORY_UPSTREAM} which calculate the correct upstream repository url for the build in progress (based on the upstream build).
0.2 Updates to include requested LastSuccessful and 'everything', and also chained job repositories. Slightly adjusted URL space to add room for the everything repository.
0.1 Initial Release



plugin-maven plugin-maven Delete
plugin-misc plugin-misc Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment