Conversation
|
The second commit removes this exception when the cache is not enabled: |
575907d to
e0aa3de
Compare
@gnodet my idea is that you should commit modello migration directly to MNG-7129_Modello when it is about the switch from JAXB to Modello, because I expect that we'll to the swtich in 1 PR that we'll apply to MNG-7129 for other unrelated changes, we need other branches/PRs: instead of creating branches in personal forks, given you have commit rights, I prefer in general branches directly in original Git repository because I think it makes working together easier. |
|
|
||
| MojoExecution forkedExecution = new MojoExecution( forkedMojoDescriptor, forkedGoal ); | ||
|
|
||
| forkedExecution.setLifecyclePhase( mojoExecution.getLifecyclePhase() ); |
There was a problem hiding this comment.
how does that relate to MNG-7129 and the switch from JAXB to Modello?
There was a problem hiding this comment.
It does not relate to JAXB, however, this fixes a NPE which happens in the cache system when using forked lifecycles. It may be fixed in a different way, but it did look like the easier fix.
My reasoning is the following : I suppose no-one ever looked for the phase of forked plugin executions and it makes sense to me to have those phases set to the phase of the original mojo execution.
The cache system does look and uses the phase in several locations, and this caused NullPointerException.
There was a problem hiding this comment.
Hi
Thanks for the change! Jaxb is gone for the good. In overall pr looks good for me.
Few notes:
- as i understand modello schema is located in core. if we move the cache to an extension in future - doest it mean there will be dependency on core from the extension? It might be not convenient to change core if extension model need to be changed. Looks like modello scheme actuall couples the cache and the core.
- There should be few small jaxb related leftovers - dependency in pom itself and in licenses, but in general it looks good.
There was a problem hiding this comment.
@AlexanderAshitkin I don't see why the modello generated code could not be moved into the extension.
|
ok, now that I reviewed and understood many parts, here my proposal:
and the next update I want on MNG-7129_Modello branch is the removal of all dependencies that were added for JAXB: removing them is a key benefit the full idea behind splitting everything in many buckets is that both original developers of MNG-7129 need to be able to review/understand what is done to their original code: for usual Maven contributors, all the work is about lowering the bar to understanding the global MNG-7129 branch to be able to merge some time later to master |
|
thinking a little bit more, I just found that merging the PR to MNG-7129_Modello branch is what I just need to do I'll do that and we can continue the work together |
17e99ad to
14111bb
Compare
|
ok, I did the cherry-picks and the rebase: I think we can close this PR |
This fixes a possible exception when using forked lifecycles.
In my case, this happens when using the
spotbugs-maven-plugin:spotbugsplugin which forks the lifecycle (see https://github.com/spotbugs/spotbugs-maven-plugin/blob/spotbugs/src/main/groovy/org/codehaus/mojo/spotbugs/SpotbugsViolationCheckMojo.groovy#L57).