gnodet opened a new pull request, #12050:
URL: https://github.com/apache/maven/pull/12050
## Summary
- Extend the transitive repository filter in `mergeRepositories` to also
exclude repositories whose ID contains uninterpolated expressions (`${...}`),
not just URLs
- Add test coverage for repositories with uninterpolated IDs but valid URLs
Fixes #12049
## Context
The existing filter (added in #11357) already excluded transitive
repositories with uninterpolated URLs. However, when a transitive dependency
POM contained an expression like `${eclipseP2RepoId}` as a repository **ID**
with a valid URL, it passed the filter and later caused
`MavenValidator.validateRemoteRepository` to throw `IllegalArgumentException`,
failing the build.
The consuming project has no control over third-party POM content, so these
invalid repositories should be silently skipped (they can't be useful in the
consuming project's context anyway).
## Test plan
- [x] Extended `testMergeRepositories` to verify repositories with
uninterpolated IDs are filtered
- [ ] CI passes
_Claude Code on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]