Skip to content
Latchkey

Maven "'version' is missing for plugin" in CI

Maven validation found a <plugin> with no <version>, and no pluginManagement, parent, or super-POM default supplies one. The build fails (or warns then fails on strict settings) before the plugin runs.

What this error means

mvn reports "'build.plugins.plugin.version' for org.apache.maven.plugins:maven-X-plugin is missing". It is deterministic until a version is pinned.

mvn output
[ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-shade-plugin is missing.
@ line 54, column 15
[ERROR] The build could not read 1 project -> [Help 1]

Common causes

A plugin configured without a version

The <plugin> omits <version> and there is no pluginManagement entry or parent default to fill it in.

A parent that used to manage the version was removed

Dropping a parent POM or pluginManagement block leaves the plugin version unset.

How to fix it

Pin the plugin version

  1. Add a <version> to the plugin, or
  2. Declare it once under <pluginManagement> for the whole build.
  3. Re-run mvn validate.
pom.xml
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-shade-plugin</artifactId>
  <version>3.6.0</version>
</plugin>

Manage plugin versions centrally

Use pluginManagement in the parent so child modules inherit pinned versions.

pom.xml
<build>
  <pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
      </plugin>
    </plugins>
  </pluginManagement>
</build>

How to prevent it

  • Always pin plugin versions for reproducible builds.
  • Manage plugin versions in the parent pluginManagement.
  • Run mvn validate after POM edits.

Frequently asked questions

What causes ""'version' is missing" (plugin)"?
The <plugin> omits <version> and there is no pluginManagement entry or parent default to fill it in.
How do I fix "'version' is missing" (plugin)?
Pin the plugin version

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card