{"record":{"id":"071de284b57d9178","repo":"apache/maven","slug":"your-build-is-requesting-concurrent-execution-but","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java","lineNumber":323,"sourceCode":"                        + \", you should define versions in pluginManagement section of your \" + \"pom.xml or parent\");\n            }\n        }\n\n        private void checkThreadSafety(BuildPlan buildPlan) {\n            if (threads > 1) {\n                Set<MojoExecution> unsafeExecutions = buildPlan\n                        .allSteps()\n                        .flatMap(step -> step.mojos.values().stream().flatMap(map -> map.values().stream()))\n                        .filter(execution -> !execution.getMojoDescriptor().isV4Api())\n                        .collect(Collectors.toSet());\n                if (!unsafeExecutions.isEmpty()) {\n                    for (String s : MultilineMessageHelper.format(\"\"\"\n                                Your build is requesting concurrent execution, but this project contains the \\\n                                following plugin(s) that have goals not built with Maven 4 to support concurrent \\\n                                execution. While this /may/ work fine, please look for plugin updates and/or \\\n                                request plugins be made thread-safe. If reporting an issue, report it against the \\\n                                plugin in question, not against Apache Maven.\"\"\")) {\n                        logger.warn(s);\n                    }\n                    if (logger.isDebugEnabled()) {\n                        Set<MojoDescriptor> unsafeGoals = unsafeExecutions.stream()\n                                .map(MojoExecution::getMojoDescriptor)\n                                .collect(Collectors.toSet());\n                        logger.warn(\"The following goals are not Maven 4 goals:\");\n                        for (MojoDescriptor unsafeGoal : unsafeGoals) {\n                            logger.warn(\"  \" + unsafeGoal.getId());\n                        }\n                    } else {\n                        Set<Plugin> unsafePlugins = unsafeExecutions.stream()\n                                .map(MojoExecution::getPlugin)\n                                .collect(Collectors.toSet());\n                        logger.warn(\"The following plugins are not Maven 4 plugins:\");\n                        for (Plugin unsafePlugin : unsafePlugins) {\n                            logger.warn(\"  \" + unsafePlugin.getId());\n                        }\n                        logger.warn(\"\");","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java#L305-L341","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"<!-- before: v3-only plugin in a Maven 4 concurrent build -->\n<plugin>\n  <groupId>org.apache.maven.plugins</groupId>\n  <artifactId>maven-assembly-plugin</artifactId>\n  <version>3.6.0</version>\n</plugin>\n\n<!-- after: upgrade to a Maven-4-aware release (or drop -T until it ships) -->\n<plugin>\n  <groupId>org.apache.maven.plugins</groupId>\n  <artifactId>maven-assembly-plugin</artifactId>\n  <version>3.7.1</version>\n</plugin>","handlingStrategy":"validation","validationCode":"# guard: probe the plan before enabling threads under Maven 4\nmvn -T 1C -Dstyle.color=never package 2>&1 \\\n  | tee build.log | grep -q 'not built with Maven 4' \\\n  && { echo 'v3-API plugins present; run without -T or upgrade'; exit 1; } || true","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["maven","maven-4","concurrent-build","thread-safety","plugin-api-migration"],"backgroundTag":"maven-plugin-not-thread-safe","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}