Spring boot 使用 maven 编译报错:No plugin found for prefix 'spring-boot' in the current project and in the plugin groups
问题
如题,使用 maven 对 Spring boot 项目编译时(mvn compile)报错:
No plugin found for prefix 'spring-boot' in the current project and in the plugin groups解决
项目的创建都依赖于 Spring boot 的 pom.xml 文件,那么首先就要检查 pom.xml 的位置是否正确。
$ ls -l
-rw-r--r-- 1 Administrator 197121 1520 ??? 17 09:09 pom.xml
drwxr-xr-x 1 Administrator 197121 0 ??? 17 09:08 src/
drwxr-xr-x 1 Administrator 197121 0 ??? 17 09:31 target/注意:也要看一下当前位置是否在项目目录下面
其次就是 pom.xml 内部是否包含以下代码了:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
</parent> 当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »