This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push:
new bec4e1c64b [MNG-7991] Document aggregator goal lifecycle behavior and
design spe… (#13330)
bec4e1c64b is described below
commit bec4e1c64b2d955f4af0363c7ea6d087ffc8ab5d
Author: TARUN N <[email protected]>
AuthorDate: Thu Nov 5 22:11:00 2026 +0530
[MNG-7991] Document aggregator goal lifecycle behavior and design spe…
(#13330)
* [MNG-7991] Document aggregator goal lifecycle behavior and design
specification (#8718)
- Add comprehensive documentation and architectural design specification
for aggregator Mojos and reactor lifecycle in
src/site/markdown/aggregator-goals.md
- Add 'Aggregator Mojos & Lifecycles' reference link in src/site/site.xml
- Expand Javadoc in Mojo.java and MojoDescriptor.java detailing CLI vs
lifecycle execution differences and thread safety locking
- Update plugin.mdo aggregator field description with multi-module
execution semantics
* [MNG-7991] Address reviewer feedback on aggregator documentation and
Javadoc consistency
- Update aggregator-goals.md: attribute root-project-only filtering to
BuildListCalculator and BuildPlanExecutor
- Update Mojo.java: replace 'module' with 'subproject' for terminology
consistency per MNG-8210
- Update MojoDescriptor.java: use 'subprojects' in isAggregator Javadoc to
match setAggregator
* [MNG-7991] Use 'subproject' in plugin.mdo aggregator description per
MNG-8210
* [MNG-7991] Point issue references to GitHub Issues in aggregator-goals.md
- Replace legacy JIRA issue links with active GitHub Issue links across
aggregator-goals.md
- Add GitHub Issue reference column in the Related Issues table
* Fix concurrent builder accuracy in aggregator-goals.md
Three corrections:
- Section 1.1: split 'root-project-only' attribution between
BuildListCalculator (sequential path) and BuildPlanExecutor
buildInitialPlan() (concurrent path), with the actual code snippet
- Section 1.2: scope the aggregatorLock description to the sequential
builder only; document that the concurrent MojoExecutor overrides
useProjectLock() to false and relies on the DAG instead
- Section 3: add a note that the target architecture is proposed future
design, not currently implemented behaviour
* Document Maven 4 concurrent builder before:/after: phase system in
aggregator-goals.md
Replace the vague 'future design' section with an accurate description of
the already-implemented before:/after: phase system in the Maven 4
concurrent
builder, which solves most of the aggregation problems described in section
2:
- Explain the 'all' and 'each' phases and the children(all) DAG link that
guarantees after:all runs once after the full reactor completes
- Add a table mapping each aggregation problem to its concurrent builder
solution
- Add a concrete aggregated-Javadoc example using after:all
- Clearly scope this to model version 4.1.0 + concurrent builder only
(not supported by the legacy sequential builder)
- Keep forking deduplication as an open item (section 3.5)
- Retain MNG-7991 as the open question for bridging aggregator=true on 4.0.0
model POMs
* Fix: concurrent builder is -b concurrent (ConcurrentLifecycleStarter),
not -T
-T activates the multithreaded builder; -b concurrent activates the
ConcurrentLifecycleStarter. DefaultLifecycleStarter is the sequential
default when no -b flag is passed.
* Fix: correct before:all DAG edge direction in aggregator-goals.md
The children(all) link translates to: parent's before:all fires first,
child's before:all waits for it. The previous text had the direction
inverted. Confirmed via BuildPlanExecutor.java line ~1110:
plan.step(p, BEFORE + n2).ifPresent(before::executeBefore)
i.e. parent 'before' executes before child 'before'.
* Fix: correct builder naming in aggregator-goals.md
- §1.1: 'sequential builder' → 'singlethreaded and multithreaded builders';
concurrent builder is -b concurrent, not -T
- §1.2: 'sequential builder only / Maven 4 default -T' → 'multithreaded
builder only'; -T uses MultiThreadedBuilder, not
ConcurrentLifecycleStarter.
Concurrent builder (-b concurrent) referenced correctly.
* Fix: before:/after: phases don't require model version 4.1.0
BuildPlanExecutor does not check model version anywhere in the build
execution path. The before:/after: phase system works with any POM
model version (4.0.0 or 4.1.0) — only -b concurrent is required.
Also fix inline code comment in §3.3 example.
* Fix: three incorrect assertions in aggregator-goals.md
§1.1 §4 - Ordering: segments are in CLI argument order, not auto-sorted.
'mvn clean install site:stage' runs lifecycle first only because of
argument order; 'mvn site:stage install' does the opposite.
§1.4 - Forked lifecycles: distinguish @Execute(phase) vs @Execute(goal).
Phase forks use singletonMap(step.project) — current project only.
Goal forks add getCollectedProjects() only when isAggregator()=true.
Previous text incorrectly conflated both cases.
§3.2 table - 'No <inherited>false/> needed' is wrong. The before:/after:
system enforces timing via DAG but does not bypass POM inheritance.
A plugin execution declared in a parent POM with inherited=true still
runs on every module's after:all.
* Fix: remaining incorrect assertions in aggregator-goals.md
§3.4: Removed incorrect 'Maven 3 model POMs (model version 4.0.0)'
framing. The 4.0.0 model version predates Maven 3 and has nothing to do
with the limitation. The actual constraint is that existing plugins using
@Mojo(aggregator=true) still have legacy problems regardless of POM model
version — before:/after: is an alternative approach for new plugin
designs, not a fix for old aggregator plugins.
* [MNG-7991] Clarify CLI execution order in Mojo aggregator Javadoc
* [MNG-7991] Address reviewer nit in Mojo aggregator Javadoc and
specification
* [MNG-7991] Decompose aggregator attribute, deprecate forked lifecycles,
and update roadmap
* [MNG-7991] Fix @After code examples, backward compatibility wording, and
restore plugin-tools caveat
* Fix aggregator-goals.md: before:/after: phases work with all builders
Correct the documentation that incorrectly stated before:/after: phases
and all/each reactor-scoped phases require the concurrent builder.
MavenITmng8244PhaseAllTest proves they work with all builders.
Additional fixes:
- Move auto-mapping of aggregator=true to DAG constraints from the
Maven 5.x roadmap to 4.x (infrastructure already exists)
- Change @Execute translation from stated-as-done to aspirational
- Add references to new tracking issues #13762, #13763, #13764
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---------
Co-authored-by: Guillaume Nodet <[email protected]>
Co-authored-by: Guillaume Nodet <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
---
.../apache/maven/api/plugin/annotations/Mojo.java | 13 +-
api/maven-api-plugin/src/main/mdo/plugin.mdo | 5 +-
.../maven/plugin/descriptor/MojoDescriptor.java | 10 +-
src/site/markdown/aggregator-goals.md | 225 +++++++++++++++++++++
src/site/site.xml | 1 +
5 files changed, 246 insertions(+), 8 deletions(-)
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java
index 009c2541f3..fe523fa98d 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java
@@ -76,8 +76,17 @@
boolean projectRequired() default true;
/**
- * if the Mojo uses the Maven project and its subprojects.
- * @return uses the Maven project and its subprojects
+ * Indicates whether the Mojo operates as an aggregator across the Maven
reactor and its subprojects.
+ * <p>
+ * <b>Execution semantics:</b>
+ * <ul>
+ * <li>When invoked directly via CLI (e.g. {@code mvn plugin:goal}), an
aggregator Mojo executes
+ * only once on the top-level project of the reactor.</li>
+ * <li>When bound to a lifecycle phase, the goal executes during that
phase for each subproject in the
+ * reactor unless explicitly configured with {@code
<inherited>false</inherited>}.</li>
+ * </ul>
+ *
+ * @return {@code true} if the Mojo operates across the reactor project
and its subprojects
*/
boolean aggregator() default false;
diff --git a/api/maven-api-plugin/src/main/mdo/plugin.mdo
b/api/maven-api-plugin/src/main/mdo/plugin.mdo
index 5d29f2db55..92ae5ccd0e 100644
--- a/api/maven-api-plugin/src/main/mdo/plugin.mdo
+++ b/api/maven-api-plugin/src/main/mdo/plugin.mdo
@@ -308,8 +308,9 @@ under the License.
<version>1.0.0+</version>
<type>boolean</type>
<description>
- Flags this Mojo to run it in a multi-module way, i.e. aggregate
the build with the set of projects
- listed as modules.
+ Flags this Mojo to run in a multi-module aggregating manner across
the reactor.
+ When invoked directly via CLI, it executes only once on the
top-level project.
+ When bound to a lifecycle phase, it executes on each subproject
unless inheritance is explicitly disabled.
</description>
<defaultValue>false</defaultValue>
</field>
diff --git
a/compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
b/compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
index 0b5b800038..df2ab3e12c 100644
---
a/compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
+++
b/compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
@@ -539,16 +539,18 @@ public void setExecuteLifecycle(String executeLifecycle) {
}
/**
- * @param aggregator <code>true</code> if the Mojo uses the Maven project
and its child modules,
- * <code>false</code> otherwise.
+ * @param aggregator <code>true</code> if the Mojo operates across the
reactor project and its subprojects,
+ * <code>false</code> otherwise.
*/
public void setAggregator(boolean aggregator) {
this.aggregator = aggregator;
}
/**
- * @return <code>true</code> if the Mojo uses the Maven project and its
child modules,
- * <code>false</code> otherwise.
+ * Indicates whether the Mojo operates as an aggregator across the Maven
reactor and its subprojects.
+ *
+ * @return <code>true</code> if the Mojo operates across the Maven reactor
and its subprojects,
+ * <code>false</code> otherwise.
*/
public boolean isAggregator() {
return aggregator;
diff --git a/src/site/markdown/aggregator-goals.md
b/src/site/markdown/aggregator-goals.md
new file mode 100644
index 0000000000..480b534545
--- /dev/null
+++ b/src/site/markdown/aggregator-goals.md
@@ -0,0 +1,225 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+# Aggregator Mojos and Reactor Lifecycle Specification
+
+## Overview
+
+Aggregation was introduced early in Maven 2
([MNG-250](https://github.com/apache/maven/issues/2896)) to enable plugins to
operate across an entire multi-module build reactor rather than on a single
isolated module. It is exposed to plugin developers via the `@Mojo(aggregator =
true)` annotation (or `@aggregator` in JavaDoc tag format).
+
+This document analyzes the current behavior, outlines historical shortcomings,
and establishes a target design specification for refactoring aggregator goals
in Maven ([MNG-7991](https://github.com/apache/maven/issues/8718)).
+
+---
+
+## 1. Current Aggregator Behavior
+
+Maven treats aggregator Mojos differently depending on whether they are
invoked directly via the Command Line Interface (CLI) or bound to a build
lifecycle phase in a POM.
+
+### 1.1 CLI Invocation (`mvn plugin:goal`)
+When an aggregating goal is invoked from the command line:
+1. **Task Segment Classification**: `DefaultLifecycleTaskSegmentCalculator`
inspects the Mojo descriptor:
+ ```java
+ boolean aggregating = mojoDescriptor.isAggregator() ||
!mojoDescriptor.isProjectRequired();
+ ```
+2. **Aggregating Task Segment**: A distinct aggregating `TaskSegment` is
created.
+3. **Execution on Root Project Only**: Aggregating task segments are
restricted to the top-level project (`session.getTopLevelProject()`).
Submodules in the reactor are skipped for this goal.
+ - In the **singlethreaded** and **multithreaded** builders, this filtering
is performed by `BuildListCalculator`.
+ - In the **concurrent builder** (`-b concurrent`), it is performed by
`BuildPlanExecutor` inside `buildInitialPlan()`:
+ ```java
+ Map<MavenProject, List<MavenProject>> projects =
taskSegment.isAggregating()
+ ? Collections.singletonMap(rootProject, allProjects.get(rootProject))
+ : allProjects;
+ ```
+4. **Ordering**: Tasks are executed in CLI argument order — task segments are
produced in CLI argument order with no automatic re-sorting. In `mvn clean
install site:stage`, the non-aggregating `clean install` segment runs first
(across all modules), then the aggregating `site:stage` segment runs once on
the root. If the user writes `mvn site:stage install`, the aggregating segment
runs first.
+
+### 1.2 Lifecycle-Bound Execution (`<phase>...</phase>`)
+When an aggregator Mojo is bound to a phase in a `pom.xml`:
+1. **Lifecycle Segment Classification**: Lifecycle phases (e.g. `package`,
`verify`) produce standard non-aggregating `TaskSegment`s.
+2. **Per-Module Execution**: The goal is injected into the execution plan of
**every module** in the reactor that inherits the plugin configuration.
+3. **Redundant Executions**: Unless the project author explicitly configures
`<inherited>false</inherited>` on the plugin execution in the parent POM, the
aggregator Mojo executes once for each module in the reactor.
+4. **Thread Locking (multithreaded builder only)**: When using the
multithreaded builder (`-T`), `MojoExecutor` acquires an exclusive reactor-wide
write lock (`aggregatorLock.writeLock()`) whenever an aggregator executes:
+ ```java
+ acquiredAggregatorLock = aggregator ? aggregatorLock.writeLock() :
aggregatorLock.readLock();
+ ```
+ This means that executing an aggregator Mojo across multiple submodules
repeatedly halts parallel build concurrency across all threads.
+
+ In the **concurrent builder** (`-b concurrent`), project-level locking is
disabled entirely — the concurrent `MojoExecutor` overrides `useProjectLock()`
to return `false`. The concurrent builder instead relies on the build plan DAG
to enforce ordering between steps.
+
+### 1.3 Dependency Resolution
+When executing an aggregator Mojo:
+- `MojoExecutor.ensureDependenciesAreResolved` checks
`mojoDescriptor.isAggregator()`.
+- If `true`, Maven resolves dependencies not only for the current project, but
also across all projects in `session.getProjects()` matching the scopes
requested by the Mojo.
+
+### 1.4 Forked Lifecycles
+When an aggregator Mojo declares `@Execute(phase = ...)` or `@Execute(goal =
...)`, the concurrent builder (`BuildPlanExecutor`) handles each case
differently:
+- **`@Execute(phase = ...)`**: A forked plan is computed for the **current
project only** (`Collections.singletonMap(step.project, ...)`), up to the
specified phase. The main plan is appended after the forked plan as a DAG
dependency.
+- **`@Execute(goal = ...)`**: A forked plan is computed for the current
project, plus `step.project.getCollectedProjects()` if the mojo is also an
aggregator. This means forking a non-aggregator goal targets only the current
project; forking an aggregator goal spans the reactor tree rooted at the
current project, which can lead to duplicated builds, redundant tests, and
nested reactor re-executions.
+
+---
+
+## 2. Identified Shortcomings & Problem Space
+
+Over successive Maven releases, multiple discrepancies and pain points have
been identified:
+
+1. **CLI vs. Lifecycle Discrepancy
([MNG-6336](https://github.com/apache/maven/issues/7529))**:
+ - Plugin authors annotate a goal with `@Mojo(aggregator = true)` with the
expectation that Maven will execute it once per reactor.
+ - While CLI invocation honors this expectation (running only on root),
lifecycle binding runs it on every module.
+ - Forcing users to configure `<inherited>false</inherited>` is error-prone,
unintuitive, and breaks down in nested multi-module structures.
+
+2. **Execution Timing: Aggregate at Start vs. Aggregate at End**:
+ - In hierarchical builds, the root project is typically evaluated first in
reactor order.
+ - Consequently, an aggregator bound to `package` or `verify` on the root
module executes *before* child modules have compiled or packaged their
artifacts.
+ - When the purpose of the aggregator is to combine artifacts or reports
produced by child modules (e.g. aggregated Javadoc, Jacoco code coverage,
distribution zip), executing on the root project at the start fails because
child outputs do not yet exist.
+ - Projects often resort to artificial "distribution" child modules placed
last in reactor order to work around this limitation.
+
+3. **Submodule Forking Issues
([MNG-7672](https://github.com/apache/maven/issues/8780),
[MNG-7163](https://github.com/apache/maven/issues/8291),
[MNG-2184](https://github.com/apache/maven/issues/4453))**:
+ - When an aggregator goal is executed within a submodule, forking triggers
a build of the entire reactor from within that submodule, repeating
already-completed goals.
+
+4. **Reporting and Site Generation Edge Cases**:
+ - The `maven-site-plugin` and `maven-reporting-exec` maintain separate
aggregation abstractions for generating multi-module documentation and stage
reports, leading to inconsistencies between CLI reporting and lifecycle
documentation goals.
+
+---
+
+## 3. Maven 4: `before:`/`after:` Phase System
+
+Maven 4 introduces a first-class solution to several of the shortcomings above
through
+the `before:` and `after:` phase prefixes and two special reactor-scoped
phases: `all` and `each`.
+
+> **Note**: The `before:`/`after:` phase system and the `all`/`each` phases
work with **all** builders
+> (singlethreaded, multithreaded `-T`, and concurrent `-b concurrent`). They
work with any POM model version
+> (4.0.0 or 4.1.0) — no model version upgrade is required. The concurrent
builder additionally provides
+> DAG-based ordering enforcement (no `aggregatorLock`), while the legacy
builders execute phases sequentially.
+
+### 3.1 The `all` and `each` Phases
+
+The default Maven 4 lifecycle defines a top-level `all` phase that wraps the
entire reactor, with `each`
+representing a single subproject's full build:
+
+```
+all ← reactor-scoped wrapper (children link)
+└── each ← per-subproject scope
+ ├── validate / initialize
+ ├── build (sources → compile → ready → package)
+ ├── verify (unit-test, integration-test)
+ ├── install
+ └── deploy
+```
+
+The `all` phase carries a `children(all)` link, which is translated into
ordering constraints:
+- The root project's `before:all` fires first; every child project's
`before:all` waits for it to complete.
+- The root project's `after:all` fires only after every child's `after:all`
has completed.
+
+This means a plugin goal bound to `after:all` on the root project is
**guaranteed to run once, after all
+reactor subprojects have finished their full build**. With the concurrent
builder, this is enforced by DAG
+edges; with the legacy builders, by sequential phase execution order.
+
+### 3.2 Solving the Aggregation Problems
+
+| Problem (section 2) | Solution |
+| :--- | :--- |
+| **CLI vs. lifecycle discrepancy**
([MNG-6336](https://github.com/apache/maven/issues/7529)) | Bind to `after:all`
on the root project — runs once after the full reactor. The timing guarantee is
enforced regardless of whether the goal was invoked via CLI or lifecycle, and
works with all builders. Note: `<inherited>false</inherited>` is still required
if the execution is declared in a parent POM, since the `before:`/`after:`
system controls ordering, not inheritance. |
+| **Execution timing** (aggregator runs before children are built) |
`after:all` fires after all children complete `all`, which includes
`build`/`verify`. Artifact outputs are available. |
+| **`before:each` / `after:each`** | Goals bound to these phases run once per
subproject, bracketing each module's full build. Useful for per-module
setup/teardown. |
+
+### 3.3 Example: Aggregated Javadoc after the Full Reactor
+
+```xml
+<!-- works with any builder and any model version -->
+<execution>
+ <id>aggregate-javadoc</id>
+ <goals><goal>aggregate</goal></goals>
+ <phase>after:all</phase>
+</execution>
+```
+
+This executes `maven-javadoc-plugin:aggregate` exactly once on the root
project, after every subproject has
+completed its `all` phase (which includes compilation and packaging). No
distribution submodule workaround
+required.
+
+### 3.4 Decomposing `aggregator = true`
+
+The `aggregator` flag is a **compound attribute** that bundles four distinct
runtime behaviors. Maven 4 already provides orthogonal replacements for each:
+
+| Behavior | What `aggregator=true` does | Maven 4 replacement | Status |
+| :--- | :--- | :--- | :--- |
+| **Execution scope** | Run once on the root project, not per-module | Bind to
`all` phase (`before:all`, `after:all`) | Available |
+| **Dependency resolution scope** | Resolve dependencies for all reactor
projects | `@Resolution` annotation (per-field, per-project injection in
`DefaultMavenPluginManager`) | Available |
+| **Exclusive locking** | Acquire reactor-wide write lock in `-T` builder |
DAG edges enforce ordering in the concurrent builder — no lock needed |
Available |
+| **Fork scope** | Forked lifecycles include all subprojects | Ordering
constraints via `@After` (forks deprecated — see section 3.5) | Available |
+
+This decomposition means new Maven 4 plugins should **not** use
`@Mojo(aggregator = true)`. Instead:
+
+- Bind the goal to `after:all` (or `before:all`) for reactor-scoped execution.
+- Use `@Resolution` fields for dependency injection, which is already
orthogonal to aggregator.
+- Express ordering constraints via `@After` with `PROJECT`, `DEPENDENCIES`, or
`CHILDREN` type values.
+
+For backward compatibility, existing plugin descriptors declaring
`aggregator=true` will continue to work. The target is to automatically map the
flag to equivalent DAG constraints internally so that legacy plugins benefit
without source changes (see §3.6 roadmap and
[#13763](https://github.com/apache/maven/issues/13763)).
+
+### 3.5 Deprecating Forked Lifecycles (`@Execute`)
+
+Forked lifecycles (`@Execute(phase = ...)`) let a mojo fork a lifecycle phase
in a separate execution context before running. Analysis of all Apache Maven
plugins using `@Execute` shows that **none require fork isolation** — every use
is purely an ordering guarantee:
+
+| Plugin | `@Execute` target | Actual need |
+| :--- | :--- | :--- |
+| maven-javadoc-plugin | `@Execute(phase = COMPILE)` | Compiled classes must
exist |
+| maven-source-plugin | `@Execute(phase = GENERATE_SOURCES)` | Generated
sources must exist |
+| maven-dependency-plugin | `@Execute(phase = TEST_COMPILE)` | Classes
compiled for analysis |
+| maven-pmd-plugin | `@Execute(phase = TEST_COMPILE)` | Classes compiled for
analysis |
+| maven-surefire (report) | `@Execute(lifecycle = "surefire", phase = TEST)` |
Test results must exist |
+
+Every case reduces to "phase X must have completed before I run" — a DAG edge,
not an isolated execution context. The `-no-fork` mojo variants
(`javadoc-no-fork`, `aggregate-no-fork`, `jxr-no-fork`) exist only to opt out
of unwanted forking, confirming that the fork is the wrong abstraction.
+
+The Maven 4 replacement is `@After` constraints:
+
+```java
+// Instead of @Execute(phase = LifecyclePhase.COMPILE)
+@After(phase = "compile", type = After.Type.PROJECT)
+
+// Instead of @Execute(phase = LifecyclePhase.TEST_COMPILE)
+@After(phase = "test-compile", type = After.Type.PROJECT)
+```
+
+The `computeForkPlan()` machinery, `$plan$` sentinel detection, and
`getExecutionProject()` API can be deprecated for v4 mojos. As part of the
migration roadmap, Maven 3 plugin descriptors declaring `@Execute` should be
translated into equivalent `@After` constraints at descriptor load time.
+
+### 3.6 Migration Roadmap
+
+| Phase | Action |
+| :--- | :--- |
+| **Maven 4.0** | `before:`/`after:` phases available with all builders;
`aggregator` and `@Execute` still supported |
+| **Maven 4.x** | Deprecate `aggregator` and `@Execute` with runtime warnings
([#13762](https://github.com/apache/maven/issues/13762)); auto-map
`aggregator=true` to DAG constraints in the concurrent builder
([#13763](https://github.com/apache/maven/issues/13763)); provide migration
guide ([#13764](https://github.com/apache/maven/issues/13764)) |
+| **Maven 5.x** | Remove forked lifecycle machinery; remove `aggregator` flag |
+
+---
+
+## 4. Related Issues
+
+| Key | GitHub Issue | Summary | Relationship |
+| :--- | :--- | :--- | :--- |
+| MNG-7991 | [#8718](https://github.com/apache/maven/issues/8718) | Refactor
"aggregator" goal feature | Umbrella / Architecture |
+| MNG-6336 | [#7529](https://github.com/apache/maven/issues/7529) | Aggregator
Mojo should be executed only once even when part of the lifecycle | Core defect
|
+| MNG-250 | [#2896](https://github.com/apache/maven/issues/2896) | Make
aggregation feasible | Original origin |
+| MNG-2184 | [#4453](https://github.com/apache/maven/issues/4453) | Possible
problem with `@aggregator` and forked lifecycles | Forking defect |
+| MNG-5665 | [#6657](https://github.com/apache/maven/issues/6657) | Advanced
Lifecycle Handling | Lifecycle enhancement |
+| MNG-7163 | [#8291](https://github.com/apache/maven/issues/8291) |
Aggregating Mojo re-executes goals for child modules that are already executed
| Forking duplication |
+| MNG-7672 | [#8780](https://github.com/apache/maven/issues/8780) | Aggregate
goals executed in a submodule forks the whole reactor | Submodule isolation |
+| MNG-4504 | [#5543](https://github.com/apache/maven/issues/5543) |
Disallowing all aggregator bindings to any lifecycle is too broad | Lifecycle
policy |
+| MNG-7900 | [#9015](https://github.com/apache/maven/issues/9015) | Wrapper
lifecycle in multi module project should be executed only in root module |
Wrapper lifecycle |
+| - | [#13529](https://github.com/apache/maven/issues/13529) | Concurrent
builder drops later lifecycle phases when merging overlapping task segments
(fixed in [#13532](https://github.com/apache/maven/pull/13532)) | Task segment
merging |
+| - | [#13762](https://github.com/apache/maven/issues/13762) | Deprecate
`aggregator=true` and `@Execute` with runtime warnings | Deprecation |
+| - | [#13763](https://github.com/apache/maven/issues/13763) | Auto-map
`aggregator=true` to DAG constraints in the concurrent builder | Auto-migration
|
+| - | [#13764](https://github.com/apache/maven/issues/13764) | Plugin author
migration guide for `aggregator=true` to `after:all` | Documentation |
diff --git a/src/site/site.xml b/src/site/site.xml
index 5a713768b1..1797feeffe 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -58,6 +58,7 @@ under the License.
<item name="CLI options" href="./compat/maven-embedder/cli.html"/>
<item name="Super POM"
href="./compat/maven-model-builder/super-pom.html"/>
<item name="Maven Configuration" href="./configuration.html"/>
+ <item name="Aggregator Mojos & Lifecycles"
href="./aggregator-goals.html"/>
</menu>
<menu inherit="bottom" name="Development">