Skip to content

/errors/maven/no-plugin-found-for-prefix

No plugin found for prefix 'spring-boot' in the current project and in the plugin groups

The commands on this page have not been executed by our verification runner yet.updated
tool
Maven
exit code
1
versions
Maven 3.x, Maven 4
os
any

[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 [...] means Maven could not map the short prefix in spring-boot:run to a plugin. It looks first at the plugins declared in the current pom.xml, then in the plugin groups listed in the message. For Spring Boot, the plugin is not in those groups, so it must be declared in pom.xml, and mvn must run in that project's folder.

How Maven resolves a prefix

mvn PREFIX:GOAL is resolved in this order:

  1. Plugins declared in the current project's pom.xml (including those inherited from a parent POM).
  2. Plugin groups: org.apache.maven.plugins and org.codehaus.mojo by default, plus any pluginGroups in settings.xml.

The message lists exactly the groups and repositories Maven tried, which shows whether the issue is the project, the groups or the network.

Fix: declare the plugin

pom.xml
<build>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <!-- version managed by spring-boot-starter-parent -->
    </plugin>
  </plugins>
</build>

Without the Spring Boot parent POM, add an explicit <version>.

Other fixes

bash
mvn -pl web spring-boot:run                                    # run in the module that declares it
mvn org.springframework.boot:spring-boot-maven-plugin:run      # full coordinates, no prefix lookup
~/.m2/settings.xml
<settings>
  <pluginGroups>
    <pluginGroup>org.springframework.boot</pluginGroup>
  </pluginGroups>
</settings>
PrefixPluginGroup in the default list?
compiler, surefire, jar, dependency, cleanorg.apache.maven.plugins:maven-*-pluginyes
versions, exec, build-helperorg.codehaus.mojo:*-maven-pluginyes
spring-bootorg.springframework.boot:spring-boot-maven-pluginno: declare it or add the group
quarkusio.quarkus.platform:quarkus-maven-pluginno: declare it or add the group
jettyorg.eclipse.jetty:jetty-maven-plugin (group varies by Jetty version)no: declare it or add the group

Sources