Some plugins can benefit a lot from parallel execution (e.g. native compilers, javadoc scanners, report generators, etc.). To not have all plugins do their own task management, a task execution framework is suggested.
Plugins can build a task tree out of ParallelTaskGroups, SequentialTaskGroups and Tasks and hand this tree to Maven for execution. Maven then builds a task graph out of this task tree and executes it, ensuring correct task order and maximum parallelism.
For example, a compiler plugin builds the following task tree:
It then hands the tree to Maven for execution, Maven builds a graph out of the tree and executes the tasks, parallelizing where possible. Also, if the maximum number of threads is limited, it never executes more than this number of tasks in parallel.
In the future, this framework may also simplify clustering of Maven builds.