Skip to content

Maven Plugin Validation Warnings

Problem Statement

When running mvn clean verify, your build succeeds but displays warnings like: [WARNING] Plugin validation issues were detected in 7 plugin(s)

These warnings indicate that certain Maven plugins may have compatibility issues with future Maven versions. While your build succeeds now with Maven 3.x, the highlighted plugins might cause failures when migrating to Maven 4.x.

The warning lists problematic plugins (e.g., maven-compiler-plugin, surefire-plugin, etc.) and suggests using the maven.plugin.validation property for more details.

Types of Validation Issues

There are two categories of issues:

Internal Issues (Fixable in your project)

  1. Using deprecated plugin goals
  2. Using deprecated plugin parameters
  3. Using read-only parameters
    Solution: Update your POM configuration or upgrade plugin versions.

External Issues (Requires plugin maintainer fixes)

  1. Plugin uses deprecated Maven APIs
  2. Plugin declares dependencies incorrectly
    Solution: Wait for plugin updates or suppress warnings (see below).

1. Upgrade Maven and Plugins (Preferred Solution)

Many warnings disappear by upgrading Maven itself:

shell
# Upgrade to latest Maven version (tested with 3.9.6+)
mvn --version # verify upgrade

Also upgrade plugins listed in the warning (update versions in your POM):

xml
<build>
  <plugins>
    <!-- Example: Upgrading compiler plugin -->
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.11.0</version> <!-- Replace with latest -->
    </plugin>
    <!-- Repeat for other warned plugins -->
  </plugins>
</build>

2. Control Warning Verbosity

Configure how Maven reports issues:

shell
mvn clean verify -Dmaven.plugin.validation=BRIEF
shell
# Linux/macOS
export MAVEN_OPTS="-Dmaven.plugin.validation=BRIEF"

# Windows
set MAVEN_OPTS=-Dmaven.plugin.validation=BRIEF
text
## Create .mvn/maven.config in project root
-Dmaven.plugin.validation=BRIEF
xml
<settings>
  <profiles>
    <profile>
      <id>suppress-plugin-warnings</id>
      <properties>
        <maven.plugin.validation>BRIEF</maven.plugin.validation>
      </properties>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>suppress-plugin-warnings</activeProfile>
  </activeProfiles>
</settings>

3. Verbosity Options

SettingBehavior
NONECompletely silence validation warnings
BRIEFShow internal issues inline + list plugins with external issues (default)
SUMMARYList plugins with issues at build end
VERBOSEDetailed report for all issues

Key Considerations

  1. No immediate action required for Maven 3.x users – these warnings anticipate future Maven 4 compatibility issues
  2. Java version upgrades may indirectly resolve issues by leveraging updated dependencies
  3. Avoid unrelated "solutions" like adding <packaging>war</packaging> unless required by your project

When to Act

  • Address warnings immediately if:
    ⚠️ You're planning a Maven 4 migration
    ⚠️ Specific plugin features break
    ⚠️ Warnings obscure important build output
  • Otherwise, use BRIEF mode for cleaner builds while monitoring plugin updates

Official Maven Plugin Validation Documentation