You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/11/06 15:38:48 UTC
[GitHub] [maven] gnodet commented on a change in pull request #604: Finish switch to modello
gnodet commented on a change in pull request #604:
URL: https://github.com/apache/maven/pull/604#discussion_r744137847
##########
File path: maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
##########
@@ -554,6 +554,8 @@ private void injectLifecycleOverlay( Map<String, List<MojoExecution>> lifecycleM
MojoExecution forkedExecution = new MojoExecution( forkedMojoDescriptor, forkedGoal );
+ forkedExecution.setLifecyclePhase( mojoExecution.getLifecyclePhase() );
Review 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.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org