Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Relevant MNG Issues

Proposal

I ran into some issues recently with the IT tests. I use a mirrorof * to redirect everything to a repo manager but this is also redirecting the file based repositories. I can't think of any good reason this should apply to anything other than remote repos. I have two proposals:

1.      Change maven so that file based repos ignore all mirror settings

2.      Change maven so that file based repos ignore the wildcard but will respond if the mirror specifically names it.

 I can't think of any reason why a mirror should override a local repo so I suggest we go with #1.Updated Proposal:

 Allow more flexibility in mirror specifications. Currently only a repo Id or * can be used in the mirrorOf field. This isn't very flexible with advanced repo managers and can cause problems with ITs or Units that expect to have specific repos that may have been overridden by the *.

Proposed Changes:

Add new "external:*" syntax to mean any repo except those using localhost, 127.0.0.1 or file://. This is specifically intended to avoid conflicts with units and ITs.

Additionally, allow the mirrorOf to support a list of repoIds and exclusions to the two wildcards (* and external:*). The syntax will be a comma separated list of repoIds to match, and ! meaning not the repo. This provides valid syntaxes such as:

* = everything
external:* = everything not on the localhost and not file based.
repo,repo1 = repo or repo1
*,!repo1 = everything except repo1

and combinations thereof. The order is not important from left to right as the wildcards defer to further processing and explicit includes or excludes stop the processing. Additionally, the mirror list will now be ordered using a LinkedHashMap instead of HashMap such that the user may influence match order by changing the order of the definitions in the settings.xml