您当前的位置: 首页 >  spring

一一哥Sun

暂无认证

  • 0浏览

    0关注

    622博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

No plugin found for prefix spring-boot in the current project and in the plugin groups异常解决

一一哥Sun 发布时间:2020-05-21 09:49:28 ,浏览量:0

No plugin found for prefix 'spring-boot' in the current project and in the plugin groups异常解决 一. 异常问题

我在intellij idea中通过mvn spring-boot:run命令来启动springboot项目的时候,结果产生如下图所示的异常信息:

异常现象

[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] ava
ilable from the repositories [local (C:\MavenRepository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
二. 原因分析 产生该问题的原因大致有如下三种: 1. pom.xml文件里少了parent依赖,代码如下:

    org.springframework.boot
    spring-boot-starter-parent
    1.2.7.RELEASE
 

这种错误一般不会存在。

2. 缺少如下代码:

    
        spring-releases
        https://repo.spring.io/libs-release
    


    
        spring-releases
        https://repo.spring.io/libs-release
    
3. 运行mvn spring-boot:run 命令时的路径不对:

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.

意思是: 在命令行运行 mvn spring-boot:run 时,一定要确保你是运行在该pom.xml文件所在的路径下,不然就会出现 No plugin found for prefix 'spring-boot' in the current project and in the plugin groups 这种错误。

三. 解决办法

大多数人都是这个原因,只要切换到pom.xml文件所在的目录下运行mvn spring-boot:run 就顺利启动了。

 

关注
打赏
1665624836
查看更多评论
立即登录/注册

微信扫码登录

0.0391s