Commit 852e66a
Fix modello velocity goal phase to generate-sources for concurrent builder compatibility (#12687)
In the Maven 4 graph lifecycle model, the SOURCES and RESOURCES phases
are parallel siblings under BUILD, and COMPILE depends on SOURCES
(via after(SOURCES)) but not on RESOURCES. The modello velocity goal
generates Java source files, but was bound to generate-resources
(mapped to the RESOURCES phase), creating a race condition with the
concurrent builder (-b concurrent): COMPILE could start before
the velocity goal finished generating Java sources.
This caused "package does not exist" compilation errors when running
`mvn build -T1C -b concurrent` without clean, because upstream
modules built fast enough (incremental) that COMPILE started before
modello had called addCompileSourceRoot(). With clean, upstream
rebuilds took longer, masking the race.
Split the modello execution so velocity (Java source generation) runs
at generate-sources (SOURCES phase) and xdoc/xsd (documentation)
stay at generate-resources (RESOURCES phase), matching the pattern
already used by maven-api-model.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 833a64b commit 852e66a
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
0 commit comments