-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNG-8615] [MNG-8616] Maven core extensions handling improvements #2147
base: master
Are you sure you want to change the base?
Conversation
Do not swallow + log only, explode rather. --- https://issues.apache.org/jira/browse/MNG-8615
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/PlexusContainerCapsuleFactory.java
Outdated
Show resolved
Hide resolved
…exusContainerCapsuleFactory.java Co-authored-by: Konrad Windszus <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of conflict and DEBUG output:
|
As mimir had a bug that prevented it from starting :)
ClassRealm was not closed, but left to GC. This was not a problem before but with extensions is, as JUnit would delete directories but is prevented doing so on Windoze.
Why do we consider a conflict if the extension is the same (same GAV + same config) ? |
We consider it as "conflict" for simplicity sake: I'd not go down the route to have "model builder" for extensions, and "build" the model out of 3 sources. Even if same GAV of extension, project one may have different config due some requirement while user wide another config, etc. I'd keep handling them dead simple: they are considered as "blob" (atom?) keyed by GA and no merging or building or whatsoever magic happens, basically rules are simple:
|
Yeah, I fully agree we don't need merging or whatever. I was simply thinking about a slightly less dead simple approach: for a given GA, either there's a single entry or V + config is the same. |
It all started with MNG-8615 to not swallow DI problems while loading core extensions. Then tried to add origin as well, but it turns out there is lack of context. Then turned out models are not location tracking. Then came MNG-8616 as Maven was too rigid and did not apply precedence for extensions making project hopping problematic, if not impossible...
Changes:
Behavioural change since 4.0.0-rc-3:
https://issues.apache.org/jira/browse/MNG-8615
https://issues.apache.org/jira/browse/MNG-8616