IntroductionThe quickest way for setting up Maven to use Artifactory proxy is to configure a Maven repository with the following URL: You can create and use a dedicated virtual (or local) repository to limit Artifactory searches to that specific repository: Overriding the Built-in RepositoriesIf your Artifactory is configured correctly, you should override the built-in central and snapshots repositories of Maven, so that no request will be ever sent directly to them. Additional "Mirror-any" SetupYou can also use the "mirror any" feature on top of the previous setup, and have Artifactory act as a redirecting proxy for any Maven repository, including ones defined inside POMs of plug-ins and of third party dependencies (which is bad practice, but unfortunately, not uncommon). This will make sure no unexpected requests will be made to external repositories introduced by such POMs. Insert the following into your settings.xml: CaveatDon't use "mirror any" by itself, as your only resolution rule. Use it to enforce any artifacts resolution to be made strictly through Artifactory. Configuring AuthenticationYou can turn off the Global Anonymous Access flag (Admin:Security:General) and use secured downloads with Maven. Users will have to have Read access on repositories they wish to resolve artifacts from. |