Metadata type out of coordinates#1491
Merged
cstamas merged 1 commit intoapache:masterfrom Jun 16, 2025
Merged
Conversation
Fix for metadata type that contains / (slash)
cstamas
added a commit
to cstamas/maven-resolver
that referenced
this pull request
Jun 24, 2025
Fix for metadata type that contains `/` (slash), as right now the layout get messed up in such cases. Originally, the "type" was filename, and GAV are the coordinates, but with this simple change, we can (re)use Resolver to resolve files that are not in "addressable space", but still have all the benefit of caching/auth etc.
cstamas
added a commit
that referenced
this pull request
Jun 24, 2025
Fix for metadata type that contains `/` (slash), as right now the layout get messed up in such cases. Originally, the "type" was filename, and GAV are the coordinates, but with this simple change, we can (re)use Resolver to resolve files that are not in "addressable space", but still have all the benefit of caching/auth etc.Fix for metadata type that contains `/` (slash), as right now the layout get messed up in such cases. Originally, the "type" was filename, and GAV are the coordinates, but with this simple change, we can (re)use Resolver to resolve files that are not in "addressable space", but still have all the benefit of caching/auth etc. This is a backport for #1491
cstamas
added a commit
that referenced
this pull request
Aug 12, 2025
High level new features and changes:
* (change) filtering is **enabled by default**
* (new) filtering can be suppressed on per-repository basis by appending configuration key with `.repoId=false`.
* (change) both filters enhanced to become really usable.
## GroupId filter
Is enabled by default (but remains dormant if user does not provides input). It becomes active only when user provides input for it.
Input vastly improved and now supports modifiers as well (Resolver 1.x modus operandi was `=org.apache` ONLY). Hence, upgrading from Resolver 1.x to Resolver 2.x leads to "broadened" filtering but that is fine is was user usually wants (Resolver 1.x had to enumerate all Gs for nested G, ie `org.apache.maven`, `org.apache.maven.plugins` etc... same effect with Resolver 2.x is one liner: `org.apache.maven` (as it means now "and below"). Added support for negation (`!`) and limiter (`=`). Example groupId filter file:
```
# My file (1)
(2)
org.apache.maven (3)
!=org.apache.maven.foo (4)
!org.apache.maven.indexer (5)
=org.apache.bar (6)
```
Lines 1, 2 ignored. Line 3 "allow `org.apache.maven` and below". Line 4 "not allow `org.apache.maven.foo` only". Line 5 "not allow `org.apache.maven.indexer` and below". Line 6 "allow `org.apache.bar` only".
## Prefix filter
Is enabled by default and improved to try to auto-discover prefix file published by remote repository. If prefix file is discovered, common resolver means are used to resolve and cache the prefix file in user local repository. If discovery fails, user provided prefix file is attempted (and used, if found). Finally, if no input, filter will not interfere. Order of precedence:
* user provided prefix file (if found, will be used, no discovery happens)
* auto discovery
Caching is now possible with fix done in #1491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for metadata type that contains
/(slash), as right now the layout get messed up in such cases. Originally, the "type" was filename, and GAV are the coordinates, but with this simple change, we can (re)use Resolver to resolve files that are not in "addressable space", but still have all the benefit of caching/auth etc.