Repository ID handling improvement by cstamas · Pull Request #1570 · apache/maven-resolver

@cstamas

Many feature blindly assume (as Maven validates this) that
repository.id is "path segment"-safe string.

Still, we found som fairly recent POMs (like maven-core
3.6.1!) that contain in their transitive hull POMs that
contain FS unsafe repository IDs.

These IDs makes features like split repository, or metadata
caching go hayway.

This feature contains:
* fix for these "bad" repository.id-s (by "fixing" them to be
  as should - FS safe
* preparation (unused yet) for better distinction of repositories,
  not only by ID, that may lead to clashes still, but by
  `$(repo.id)-sha1($(repo.url))`

@cstamas

@cstamas

@cstamas cstamas marked this pull request as ready for review

August 30, 2025 20:50

@cstamas cstamas linked an issue

Sep 1, 2025

that may be closed by this pull request

gnodet

@cstamas

Nothing smart or complicated, we usually deal with
ONE illegal char, ie "foo/bar", and not a series,
so nothing to deal with "--" (double separators).