Thanks a lot, Tamás. This will definitely help me fix this. Cheers, Martin
Op wo 10 nov. 2021 om 09:14 schreef Tamás Cservenák <[email protected]>: > Howdy, > > see this issue > https://issues.apache.org/jira/browse/MNG-6898 > > In short: plexus (that is aware of realm) performs filtered lookup by > realm. > Sisu OTOH (that is not aware of the realm) performs "flattened" lookups. > > So, this is 2nd place where we find plexus semantics being implicitly > relied on. > And I am afraid there are more (but in the upper issue IT did make it > visible, > while in change your reference did not). > > In MNG-6898 there were two PRs (but one superseded by other): > - 1st PR introduced a "helper" to perform filtered lookups using SISU+realm > - 2nd PR was simpler, it simply uses Plexus API to perform lookup (while > component itself > is JSR330). > > Also, on related not Guillame had a PR for "maven container".... > > > HTH > Tamas > > On Wed, Nov 10, 2021 at 8:26 AM Martin Kanters <[email protected]> > wrote: > >> Hi all, >> >> A while ago I encountered a bug [1] in Maven 4 which I'm testing at work. >> I >> took quite some time into debugging the issue, but I am at a dead end >> currently. >> The issue should describe the problem enough, but in short I understand it >> as the following: >> 1. Multi module project with two submodules A and B. >> 2. "A" defines a plugin, which is an extension and which registers a new >> lifecycle. This lifecycle uses the ${project.version} variable. >> 3. During the model "B" validation (DefaultModelValidator), the >> lifecycle of "A" is suddenly validated as well, and trips on the >> ${project.version} usage. >> >> Important to note is that this problem is introduced in a commit from >> April >> 2nd 2020 [2]. This commit "just" converted maven-core from Plexus DI to >> Guice DI. >> In earlier Maven versions, the custom lifecycle is not injected during the >> model validation of B, but that happens at a later moment. >> >> Does anyone understand why such a change could occur when changing from >> Plexus DI to Guice DI? >> Any pointers are welcome. >> >> Thanks, >> Martin >> >> [1] https://issues.apache.org/jira/browse/MNG-7310 >> [2] >> >> https://github.com/apache/maven/commit/9567da2bc889a94f5c3b692b4afb310ddbacd6e5 >> >
