gnodet opened a new pull request, #12107:
URL: https://github.com/apache/maven/pull/12107
## Summary
Backport 3 additional bug fixes from master to maven-4.0.x:
1. **Fix ArtifactTypeRegistry implementations** (#10941) — removes redundant
null check after `require()` in `TypeRegistryAdapter.get()`. Since `require()`
throws if the type is not found, the null branch was unreachable dead code that
could mask contract violations. Only the `TypeRegistryAdapter` fix is included;
the `RepositoryUtils` cleanup from master is omitted for backward compatibility.
2. **Avoid NPE using ProjectId** (#11178, fixes #11109) — replaces
`result.getProject().getId()` with `result.getProjectId()` in
`DefaultProjectsSelector`, preventing an NPE when `getProject()` returns null
(which happens when a project build fails). The safe `getProjectId()` method
already exists on 4.0.x.
3. **Improve error message for unresolved expressions** (#11615) — when
dependency collection fails due to unresolved `${property}` expressions, the
error now identifies the specific artifact and provides actionable guidance
instead of the generic "Unable to collect dependencies" message.
## Test plan
- [x] Compilation verified (`mvn install -pl impl/maven-impl,impl/maven-core
-DskipTests -am`)
- [x] All tests pass (`mvn test -pl impl/maven-impl,impl/maven-core` — 0
failures, 0 errors)
- [ ] Full CI validation
_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]