I'd like to discuss a certain problem I recently came across and if it might could be considered as an enhancement:

Currently there are two components that influence when a certain reactor project is build:

1) GraphBuilder computes the Project relation graph
2) Builder executes the Graph of projects (either serial or in parallel)

While this works most of the time (and one can enhance these strategies by a core-extension) I came across some situations where I need to influence this while the build is running to enforce some not known in advance dependencies in a local manner.

So I came across the idea if it would be possible to have a method in the Builder (or a new interface) called "buildProject(MavenProject)" (or similar) that triggers/wait for the specified project before returning.

It should simply work the following way:

- If the project was already executed before, simply return
- If the project is currently executing (e.g. in another thread) wait until it is finished - If the project was not yet scheduled for execution, execute it in the current thread

That way it would be possible to even executes "dynamic" project dependencies, e.g ones that are only discovered in the generate-sources phase but would be required in the compile/test phase as well as requirements where I for example want to make sure all projects with a certain property are executed before I take several actions without encoding this in the dependencies of a project directly.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to