ARTIFACTORY: Remote Repositories and How They Work

ARTIFACTORY: Remote Repositories and How They Work

AuthorFullName__c
Melissa McKay
articleNumber
000001286
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:38:09Z
lastModifiedDate
2024-06-23
VersionNumber
8

Both in its open source software (OSS) and pro versions, an integral feature of Artifactory is the remote repository, which is simply a proxy for a repository located on a remote server.
For example, let’s assume you create a remote repository called maven-remote with the URL of Maven Central, https://repo1.maven.org/maven2/ (that’s the default URL that Artifactory gives if you don't provide a URL to a different remote repository). And let’s assume you're beginning a Maven build, and Maven is using Artifactory as its source repository. In this scenario, Maven will request a resource from Artifactory.

As it's typically configured, Artifactory will look in the local cache of your remote Maven repository (i.e., maven-remote). If the file is not located in the local cache, then Artifactory will go to the internet to attempt to obtain the resource from Maven Central. If the resource is finally located, Artifactory will cache it locally and serve the client with the requested artifact. Accordingly, upon a subsequent request for the same resource, no internet connection will be required to retrieve the artifact as it will have already been cached in Artifactory.
Note: Only the requested file will be cached, not the entire Maven Central repository.