Error Knowledge Base MAVEN NO_PLUGIN_FOUND_FOR_PREFIX

No plugin found for prefix

Maven cannot map a short plugin prefix (like `spring-boot`) to an actual plugin artifact, usually because the plugin isn't available from configured plugin repositories or isn't declared in the build.

Affected versions: All supported Apache Maven versions.

What This Error Means

Maven cannot map a short plugin prefix (like spring-boot) to an actual plugin artifact, usually because the plugin isn't available from configured plugin repositories or isn't declared in the build.

How to Fix It

  1. Try running the goal using full coordinates: mvn groupId:artifactId:version:goal (this bypasses prefix mapping).
  2. Preferably, add the plugin to your pom.xml under <build><plugins> (and set the plugin version explicitly).
  3. If the plugin is hosted outside Maven Central, configure the correct <pluginRepositories> (or a mirror in settings.xml).
  4. If you use a corporate mirror/repository manager, confirm it proxies plugin repositories and that the plugin is not blocked by policy.
  5. Retry the command, and if needed, run with debug logs: mvn -X <prefix>:<goal>.

Why It Happens

  • The plugin is not declared in the project and Maven cannot resolve it by prefix from configured plugin groups.
  • The plugin repository is not configured (or is blocked by proxy/auth/TLS issues).
  • You are offline or using a mirror that does not proxy the plugin's upstream repository.

How to Verify

  1. Re-run the original <prefix>:<goal> command and confirm Maven resolves and runs the plugin.
  2. Confirm the plugin artifact exists under ~/.m2/repository/.

Manual plugin resolution checks

  1. Confirm you can reach Maven Central (or your mirror) from this machine by resolving any known plugin: mvn -q -DskipTests help:effective-pom.
  2. Search your pom.xml for a plugin declaration that matches the goal you're trying to run under <build><plugins>.
  3. If the plugin is not in Central, confirm you have a <pluginRepositories> entry (or a mirror) that contains it.

Common CLI Output

[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (~/.m2/repository), central (https://repo.maven.apache.org/maven2)]

How plugin prefix resolution works

  1. When you run mvn <prefix>:<goal>, Maven must resolve the prefix to a plugin artifact (groupId:artifactId).
  2. Maven searches known plugin groups and repositories for plugin metadata that declares that prefix.
  3. If Maven cannot find the plugin in any configured plugin repositories, prefix resolution fails.

Prevention Tips

  • Declare build plugins in pom.xml and pin plugin versions (avoid relying on prefix auto-discovery).
  • Use a repository manager mirror that includes plugin repositories and caches them for CI stability.
  • Keep settings.xml consistent across environments so plugin resolution does not vary by machine.

Where This Can Be Triggered

github.com/apache/maven/blob/maven-3.9.11/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java

Maven throws NoPluginFoundForPrefixException when it cannot resolve a plugin prefix from available plugin groups/repositories. - GitHub

if (requests.isEmpty()) {
    continue;
}

throw new NoPluginFoundForPrefixException(prefix, session, pluginGroups, requests);

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list