Maven- No plugin found for prefix 'spring-boot' in the current project and in the plugin groups
If you are running the
mvn spring-boot:run
from the command line, make sure you are in the directory that contains the pom.xml file. Otherwise, you will run into the No plugin found for prefix 'spring-boot' in the current project and in the plugin groups error.
If you are using Spring Boot for application, forgetting to add
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.2.7.RELEASE</version> </parent>
can cause this issue, as well as missing these lines
<repositories> <repository> <id>spring-releases</id> <url>https://repo.spring.io/libs-release</url> </repository></repositories><pluginRepositories> <pluginRepository> <id>spring-releases</id> <url>https://repo.spring.io/libs-release</url> </pluginRepository></pluginRepositories>
If you don't want to use
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>(...)</version></parent>
as a parent POM, you may use the
mvn org.springframework.boot:spring-boot-maven-plugin:run
command instead.