Repository Key Function SPI (#1679) New opt-in **experimental** feature for enhanced local repository: ability to choose "repository key" function. Local repository (simple and enhanced) by default uses the `simple` key (historically) where other places all used `nid`. Have to note, that `simple` is technically equivalent to `nid` as `RemoteRepository.isRepositoryManager()` is not set anywhere in Maven. Added key functions: * `simple` -> the original code in LRM * `nid` -> `norm(id)` (path friendly) * `hurl` -> `sha1(url)` * `nid_hurl` -> `norm(id)-sha1(url)` * `gurk` -> `norm(id)-sha1(seed)` where "seed" is all config properties of repo * `ngurk` -> `norm(id)-sha1(seed)` where "seed" is all config sans mirror list (just the string "isMirrored" is added for mirrors) Introduced `RepositoryKeyFunction` type, that is used consistently in enhanced local repository (availability calculation), prefix composer (split repository prefix calculation) and remote repository manager (remote repository consolidation). This is new SPI, and impl provides default implementation with those above.
You have found a bug, or you have an idea for a cool new feature? Contributing code is a great way to give something back to the open source community. Before you dig right into the code, there are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
We accept Pull Requests via GitHub. The developer mailing list is the main channel of communication for contributors. There are some guidelines which will make applying PRs easier for us:
git diff --check before committing.mvn -Prun-its verify to assure nothing else was accidentally broken.If you plan to contribute on a regular basis, please consider filing a contributor license agreement.