Public | Automated Build

Last pushed: a year ago
Short Description
Repository proxy for Maven routing incoming requests to the correct repository based on groupId
Full Description

This image provides a very simple repository proxy for Maven routing incoming requests to the correct remote repository based on groupId prefix.

The proxy is intended to be run close to the build environment typically as part of the build process on the CI server. It aims to improve build performance and security by avoiding obsolete network requests for artifacts known to be located on a specific repository. It's a pity that Maven does not support this out of the box.

Quick Setup

Run the proxy with Docker:

$ docker run -it -p 8181:8181 \
    -e REPO1_URL=https://repo1 \
    -e REPO1_USERNAME=username \
    -e REPO1_PASSWORD=password \
    -e REPO1_INCLUDES=com.example,org.example \

You may specify up to 10 repositories with environment variables. The default repository is Maven Central and can be overridden with environment variable REPO_DEFAULT.

Next, you'll need to configure your Maven to use the proxy as a mirror for all repositories. This is done with the help of the Maven settings file which should be located at ~/.m2/settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="" 

Now you have configured your Maven setup to download all dependencies through your routing proxy. You'll probably want to use this with your CI server running in the cloud, eg. Bitbucket Pipelines.

Docker Pull Command
Source Repository