You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2026/08/31 01:54:07 UTC
(maven) branch master updated: Fix modello velocity goal phase to generate-sources for concurrent builder compatibility (#12687)
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 852e66a18a Fix modello velocity goal phase to generate-sources for concurrent builder compatibility (#12687)
852e66a18a is described below
commit 852e66a18a4c3e1a4a996393dd054fce75beb45e
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Aug 31 03:54:02 2026 +0200
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 <no...@anthropic.com>
---
api/maven-api-settings/pom.xml | 6 ++++++
api/maven-api-toolchain/pom.xml | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/api/maven-api-settings/pom.xml b/api/maven-api-settings/pom.xml
index 8262c2efde..c646f11476 100644
--- a/api/maven-api-settings/pom.xml
+++ b/api/maven-api-settings/pom.xml
@@ -76,6 +76,12 @@ under the License.
<id>modello</id>
<goals>
<goal>velocity</goal>
+ </goals>
+ <phase>generate-sources</phase>
+ </execution>
+ <execution>
+ <id>modello-docs</id>
+ <goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
diff --git a/api/maven-api-toolchain/pom.xml b/api/maven-api-toolchain/pom.xml
index 64d53566d3..a2d360df59 100644
--- a/api/maven-api-toolchain/pom.xml
+++ b/api/maven-api-toolchain/pom.xml
@@ -67,6 +67,12 @@ under the License.
<id>modello</id>
<goals>
<goal>velocity</goal>
+ </goals>
+ <phase>generate-sources</phase>
+ </execution>
+ <execution>
+ <id>modello-docs</id>
+ <goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>