欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

错误:No plugin found for prefix spring-boot in the current project and in the plugin groups

发布时间:2024/9/19 编程问答 50 豆豆
生活随笔 收集整理的这篇文章主要介绍了 错误:No plugin found for prefix spring-boot in the current project and in the plugin groups 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

前言

  • maven 3.6.1
  • springboot v2.1.x

在多模块的 Maven 项目中,执行 mvn spring-boot:run -pl xxx.groupId:xxx.artifactId命令启动某个 Module 。

错误:No plugin found for prefix spring-boot in the current project and in the plugin groups

在多模块的 Maven 项目中,使用 spring-boot:run 执行启动时,遇到错误:No plugin found for prefix spring-boot in the current project and in the plugin groups 。

鼓捣了半天,好了。

发生该错误应该是项目的当前配置中缺少spring-boot-maven-plugin插件所致。
分2种情况处理:

  • 项目的父项目是 spring-boot-starter-parent,这种情况下应该不会出这个错误的。如果过出现了,可以检查是否有拼写错误
  • 项目的父项目不是 spring-boot-starter-parent,但某一级父级项目的父项目是 spring-boot-starter-parent,同上。
  • 项目的父项目不是 spring-boot-starter-parent,也不存在某一级父级项目的父项目是 spring-boot-starter-parent,那检查是否未包含spring-boot-maven-plugin插件(本项目未包含时,手动添加)。

再次验证真理:只要设置对,就不会出错。
解决办法:出现这个错误时,将设置修改对即可。对的设置,参考这里。

参考

No plugin found for prefix spring-boot in the current project and in the plugin groups异常解决
maven 多模块项目关系
【sprinb-boot】maven 多模块项目:单独 spring-boot:run 某个模块

总结

以上是生活随笔为你收集整理的错误:No plugin found for prefix spring-boot in the current project and in the plugin groups的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。