gnodet commented on PR #1559:
URL: https://github.com/apache/maven/pull/1559#issuecomment-2159221597

   > > the benefit of having it statically defined (so that we can compute 
exactly what is needed in advance)
   > 
   > I'm not sure I get it, this should be 1-1 with the programmatic flavor 
IMHO so either it is cached in the impl and it is always computed in advanced 
somehow - or there is no pitfall computing it lazily more exactly - or it will 
be wrong if computed in advanced and a mojo modifies the current scope for next 
mojo 🤔
   > 
   > I assume - but not sure at all - you speak about adding more concurrency 
or something like that but I'm not sure we can do it more than the resolution 
requested by the mojo itself - which needs to move to a list of custom string I 
guess now.
   
   The fact that we statically know that a given mojo execution will require 
the project dependencies will be helpful if we can implement the fully 
concurrent lifecycle. My goal would be to have a builder which goes down to the 
phase or mojo level : all mojos executions should be able to run concurrently 
and ordered according to the actual dependencies specified between projects.
   
   My assumption is that "Project A depends on Project B" has no direct impact 
on the build order.  It only has an effect if a mojo execution actually 
requires the dependencies of project A.   This is currently not really needed, 
because we build a given project completely before building another one.  
   This means we need more fine-grained dependencies: for example, if Project A 
depends on Project B, at compile time, we don't really need the fully built 
Project B, we need compiled and post-processed classes.  We don't need the 
compiled test classes, nor the results of the unit tests.
   This information can be either stored in phase semantics:  all mojos 
executions in the `compile` phase need to be executed after the compile time 
dependencies of the project are themselves in the `compile` phase.  This can 
also be provided on a per-mojo basis: the `@Resolution` annotation of this PR 
does provide some information that a given mojo execution does require its 
dependencies (though it currently does not specify in which phase, that may 
need to be added later).  With both source of informations, we can build a full 
graph of mojo executions and run it in a much more efficient way that with our 
current model.
   


-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to