<settings>
  ...
  <mirrors>
    <mirror>
      <id>internal-repository</id>
      <name>Maven Repository Manager running on repo.mycompany.com</name>
      <url>http://repo.mycompany.com/proxy</url>
      <mirrorOf>external:*</mirrorOf>
    </mirror>
  </mirrors>
  ...
</settings>
The official documentation, about the meaning of the external:* parameter within a <mirrorOf> tag, says that:
matches all repositories except those using localhost or file based repositories. This is used in conjunction with a repository manager when you want to exclude redirecting repositories that are defined for Integration Testing.
Within this context, my question are:
- What does it mean that a repository uses localhost?
 - What does it mean that repository is file-based?
 
                        
Simply that the host of the URL used in any repository declaration is not
localhostor127.0.0.1. For example, a repository whose URL is declared as:it will not be considered by the
external:*mirror, because its host islocalhost. This could be the case, for example, if you have an artifact manager hosted on the same machine, and you're working locally (so there is no need for a proxy).That the protocol of the URL of the repository is
file. For example, a repository whose URL is declared as:would be a file-based repository. The artifacts will be searched inside the folder
C:\my-repo, like if it were a usual remote repository. This is useful if you want to set-up a remote repository for testing purposes (i.e. no artifact managers, just working with folders, possibly on another drive). In this case, there is no need for a proxy as well, andexternal:*will not consider it.For reference, the code for
external:*performs exactly those checks.