apache/maven · warning

Parameter '{}' is unknown for plugin '{}:{}:{} ({})'

Error message

Parameter '{}' is unknown for plugin '{}:{}:{} ({})'

What it means

DefaultMojoExecutionConfigurator merges the POM's plugin <configuration> into the mojo execution and then checks every element name against the goal's parameter descriptors (including aliases). An element matching no parameter of the goal - and no parameter of any goal of that plugin - is reported with this warning and ignored when the mojo runs.

Source

Thrown at impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java:180

                    .builder()
                    .warning("Parameter '")
                    .warning(name)
                    .warning("' is unknown for plugin '")
                    .warning(mojoExecution.getArtifactId())
                    .warning(":")
                    .warning(mojoExecution.getVersion())
                    .warning(":")
                    .warning(mojoExecution.getGoal());

            if (mojoExecution.getExecutionId() != null) {
                messageBuilder.warning(" (");
                messageBuilder.warning(mojoExecution.getExecutionId());
                messageBuilder.warning(")");
            }

            messageBuilder.warning("'");

            logger.warn(messageBuilder.toString());
        });
    }

    private Stream<String> getParameterNames(Parameter parameter) {
        if (parameter.getAlias() != null) {
            return Stream.of(parameter.getName(), parameter.getAlias());
        } else {
            return Stream.of(parameter.getName());
        }
    }

    private Set<String> getUnknownParameters(MojoExecution mojoExecution, Set<String> parameters) {
        return stream(mojoExecution.getConfiguration().getChildren())
                .map(Xpp3Dom::getName)
                .filter(name -> !parameters.contains(name))
                .collect(Collectors.toSet());
    }
}

View on GitHub (pinned to e4093d4e12)

Solutions

  1. List the goal's real parameters: mvn help:describe -DgroupId=.. -DartifactId=.. -Dversion=.. -Dgoal=<goal> -Ddetail
  2. Rename or remove the reported element from the execution's <configuration> in your POM
  3. If the parameter exists in a newer plugin version, pin the plugin to that version instead of dropping the config

Example fix

<!-- before -->
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.13.0</version>
  <configuration>
    <soureDirectory>${basedir}/src</soureDirectory> <!-- typo -->
  </configuration>
</plugin>
<!-- after -->
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.13.0</version>
  <configuration>
    <sourceDirectory>${basedir}/src</sourceDirectory>
  </configuration>
</plugin>
Defensive patterns

Strategy: validation

Validate before calling

# CI lint: diff configured parameter names against the plugin descriptor
mvn -q help:describe -DartifactId=maven-compiler-plugin -DgroupId=org.apache.maven.plugins \
    -Dversion=3.13.0 -Dgoal=compile -Ddetail | grep -oP '^\s+\w+(?=/)' > /tmp/params.txt
# then assert every <configuration> child in pom.xml appears in /tmp/params.txt

Prevention

When it happens

Trigger: A <configuration> element under a plugin execution (or plugin-level config applied to a goal) that is misspelled, was renamed in a newer plugin version, or belongs to a different goal of the same plugin (the all-goals second pass removes those from the report).

Common situations: Upgrading plugins where parameters were renamed (e.g. compiler plugin argument changes); copy-pasted configuration snippets from tutorials targeting different plugin versions; typos like <soureDir> for <sourceDir>.

Related errors


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