What is a Remote repository and how does it work?

A Remote repository is an integral part of Artifactory, both in the Open Source Software (OSS) and the pro versions.

A remote repository in Artifactory is a proxy to a repository located on a remote server. Requests to this Artifactory remote repository will first try to resolve the artifact from the local cache. If the artifact cannot be found locally, Artifactory will attempt to resolve the artifact from the remote server and then store that artifact in the local cache for future requests.

As a concrete example, let us use the ‘jcenter’ remote repository (it’s predefined in Artifactory).


In our example, a Maven build begins. Maven is using Artifactory as it’s source repository, so Maven requests the resource from Artifactory. Artifactory will typically be set up so that it first looks for the file in one or more of your local repositories. If the necessary artifact is not found, Artifactory will then look in the local cache of your remote Maven (JCenter) repository. If the files are not located in the local cache, Artifactory will go to the internet to attempt to obtain the resources from JCenter. Assuming that the resources are located, Artifactory will cache them locally so that next time no network connection is needed, then provide the binaries to Maven so that the build can proceed.

* It should be noted that only the requested files will be cached, and not the entire ‘JCenter’ repository.