apache/maven · warning

The following plugins are not Maven 4 plugins:

Error message

The following plugins are not Maven 4 plugins:

What it means

Non-debug branch of BuildPlanExecutor.checkThreadSafety(): without -X, the concurrent executor aggregates unsafeExecutions up to Plugin level and logs 'The following plugins are not Maven 4 plugins:' with one plugin id per line. It identifies plugins containing at least one goal not built with the Maven 4 plugin API in a concurrent build.

Source

Thrown at impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java:337

                                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("");
                        logger.warn("Enable verbose output (-X) to see precisely which goals are not marked as"
                                + " thread-safe.");
                    }
                    logger.warn(MultilineMessageHelper.separatorLine());
                }
            }
        }

        void execute() {
            try (var phase = executor.phase()) {
                plan();
                executePlan();
            } catch (Exception e) {
                session.getResult().addException(e);

View on GitHub (pinned to e4093d4e12)

Solutions

  1. Upgrade each listed plugin to a Maven-4-built version when released.
  2. Fall back to a single-threaded build (-T 1 / no -T) for reactors still depending on listed plugins.
  3. Track plugin releases / upstream issues for v4 API support instead of reporting against Maven itself.

Example fix

# before
mvn -T 1C verify
# -> The following plugins are not Maven 4 plugins: ...

# after: sequential until plugins are v4-built
mvn verify
Defensive patterns

Strategy: validation

Validate before calling

# guard: break CI when non-v4 plugins would run concurrently
mvn -T 1C -Dstyle.color=never install 2>&1 \
  | grep -q 'not Maven 4 plugins' && exit 1 || true

Prevention

When it happens

Trigger: Concurrent Maven 4 session (threads > 1) with any v3-API mojo in the plan and debug logging disabled — the default 'mvn -T 4 ...' run under Maven 4.

Common situations: Standard Maven 4 parallel CI runs on existing projects; blanket warnings expected while the plugin ecosystem migrates to the v4 API.

Related errors


AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21). Data as JSON: /api/errors/b7f0ce3048f2f71c. Report an issue: GitHub.