Additional Maven Setting: Mirror Any Setup

JFrog Artifactory Documentation

JFrog Artifactory
Content Type
User Guide

In addition to overriding built-in Maven repositories, you can use the Mirror Any setting to redirect all requests to a Maven repository through Artifactory, including those defined inside POMs of plug-ins and third party dependencies. (While it does not adhere to best practices, it is not uncommon for POMs to reference Maven repositories directly). This ensures no unexpected requests directly to Maven are introduced by such POMs.

You can either check Mirror Any in the Maven Settings screen when generating your settings.xml file, or you can manually insert the following:

      <url>http://[host]:[port]/artifactory/[virtual repository]</url>

Care when using "Mirror Any"

While this is a convenient way to ensure Maven only accesses repositories through Artifactory, it defines a coarse proxying rule that does not differentiate between releases and snapshots and relies on the single specified repository to do this resolution.

Using Mirrors

For more information on using mirrors please refer to Using Mirrors for Repositories in the Apache Maven documentation.