/errors/maven/no-plugin-found-for-prefix
No plugin found for prefix 'spring-boot' in the current project and in the plugin groups
- 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:
- Plugins declared in the current project's
pom.xml(including those inherited from a parent POM). - Plugin groups:
org.apache.maven.pluginsandorg.codehaus.mojoby default, plus anypluginGroupsinsettings.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
<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
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<settings>
<pluginGroups>
<pluginGroup>org.springframework.boot</pluginGroup>
</pluginGroups>
</settings>| Prefix | Plugin | Group in the default list? |
|---|---|---|
| compiler, surefire, jar, dependency, clean | org.apache.maven.plugins:maven-*-plugin | yes |
| versions, exec, build-helper | org.codehaus.mojo:*-maven-plugin | yes |
| spring-boot | org.springframework.boot:spring-boot-maven-plugin | no: declare it or add the group |
| quarkus | io.quarkus.platform:quarkus-maven-plugin | no: declare it or add the group |
| jetty | org.eclipse.jetty:jetty-maven-plugin (group varies by Jetty version) | no: declare it or add the group |