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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to