apache/maven · warning
Your build is requesting concurrent execution, but this proj
Error message
Your build is requesting concurrent execution, but this project contains the following plugin(s) that have goals not built with Maven 4 to support concurrent execution. While this /may/ work fine, please look for plugin updates and/or request plugins be made thread-safe. If reporting an issue, report it against the plugin in question, not against Apache Maven.
What it means
The Maven 4 concurrent BuildPlanExecutor's checkThreadSafety(): when threads > 1, it collects every MojoExecution whose MojoDescriptor.isV4Api() is false — i.e. goals not built against the Maven 4 plugin API. Maven 4's concurrent steps assume v4 API mojos; legacy v3 mojos are still executed, but with this disclaimer that they may not be safe under the new concurrent execution model.
Source
Thrown at impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java:323
+ ", you should define versions in pluginManagement section of your " + "pom.xml or parent");
}
}
private void checkThreadSafety(BuildPlan buildPlan) {
if (threads > 1) {
Set<MojoExecution> unsafeExecutions = buildPlan
.allSteps()
.flatMap(step -> step.mojos.values().stream().flatMap(map -> map.values().stream()))
.filter(execution -> !execution.getMojoDescriptor().isV4Api())
.collect(Collectors.toSet());
if (!unsafeExecutions.isEmpty()) {
for (String s : MultilineMessageHelper.format("""
Your build is requesting concurrent execution, but this project contains the \
following plugin(s) that have goals not built with Maven 4 to support concurrent \
execution. While this /may/ work fine, please look for plugin updates and/or \
request plugins be made thread-safe. If reporting an issue, report it against the \
plugin in question, not against Apache Maven.""")) {
logger.warn(s);
}
if (logger.isDebugEnabled()) {
Set<MojoDescriptor> unsafeGoals = unsafeExecutions.stream()
.map(MojoExecution::getMojoDescriptor)
.collect(Collectors.toSet());
logger.warn("The following goals are not Maven 4 goals:");
for (MojoDescriptor unsafeGoal : unsafeGoals) {
logger.warn(" " + unsafeGoal.getId());
}
} else {
Set<Plugin> unsafePlugins = unsafeExecutions.stream()
.map(MojoExecution::getPlugin)
.collect(Collectors.toSet());
logger.warn("The following plugins are not Maven 4 plugins:");
for (Plugin unsafePlugin : unsafePlugins) {
logger.warn(" " + unsafePlugin.getId());
}
logger.warn("");View on GitHub (pinned to e4093d4e12)
Solutions
- Update listed plugins to versions built with Maven 4 hiapi support when available.
- If no v4 build exists, validate outputs carefully or run the build without threads until those plugins ship v4 support.
- File/surface the request with the plugin project (as the message says) to migrate to the Maven 4 plugin API.
- For your own plugins, migrate mojos to the org.apache.maven.api annotations/SPI so isV4Api() returns true.
Example fix
<!-- before: v3-only plugin in a Maven 4 concurrent build --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.6.0</version> </plugin> <!-- after: upgrade to a Maven-4-aware release (or drop -T until it ships) --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.7.1</version> </plugin>
Defensive patterns
Strategy: validation
Validate before calling
# guard: probe the plan before enabling threads under Maven 4
mvn -T 1C -Dstyle.color=never package 2>&1 \
| tee build.log | grep -q 'not built with Maven 4' \
&& { echo 'v3-API plugins present; run without -T or upgrade'; exit 1; } || true Prevention
- Track v4-built releases of the plugins you use before switching CI to Maven 4 + -T.
- Verify concurrent output equals sequential output (reproducible builds) as the acceptance gate.
When it happens
Trigger: Building with -T/concurrent sessions under Maven 4 where the plan contains any plugin compiled against Maven 3 plugin API (isV4Api() == false) — which is most existing plugins today, plus any custom mojo not migrated to the org.apache.maven.api SPI.
Common situations: Early adoption of Maven 4 in CI with an unchanged plugin set; warnings appearing across whole reactors because virtually no third-party plugin is v4-built yet; evaluating whether concurrency gains are safe.
Related errors
- The following goals are not Maven 4 goals:
- The following plugins are not Maven 4 plugins:
- Version not locked for default bindings plugins {}, you shou
- Enable verbose output (-X) to see precisely which goals are
- Unexpected skipping of TEARDOWN step {}
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/071de284b57d9178.
Report an issue: GitHub.