我在出初学spring boot时,用idea启动项目没问题,但是用maven启动项目时报错信息如下:
[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 [local (C:\Users\Administrator.m2\repository), alimaven (http://
maven.aliyun.com/nexus/content/groups/public/)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException。
国类论坛关于此问题的讨论甚少,之后在国外IT论坛StrackOverflow上找到了解决方法,主要有三种原因:
1.pom.xml里少了parent,代码如下:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.7.RELEASE</version>
</parent>
这种错误几乎不会存在。
2.少了如下代码:
<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>
我找到的帖子的发帖人采纳的就是这个。
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 就顺利启动了。
现在spring boot报错在国内论坛不太容易找到答案,建议大家多用Google,多看外国论坛,英语不好没关系,用百度翻译慢慢看,不要怕,这是成为优秀程序员的必经之路。
相关推荐
赠送jar包:spring-plugin-core-2.0.0.RELEASE.jar; 赠送原API文档:spring-plugin-core-2.0.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-core-2.0.0.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring...
赠送jar包:spring-plugin-metadata-2.0.0.RELEASE.jar; 赠送原API文档:spring-plugin-metadata-2.0.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-metadata-2.0.0.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-plugin-core-1.2.0.RELEASE.jar; 赠送原API文档:spring-plugin-core-1.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-core-1.2.0.RELEASE-sources.jar; 包含翻译后的API文档:...
赠送jar包:spring-plugin-core-1.2.0.RELEASE.jar; 赠送原API文档:spring-plugin-core-1.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-core-1.2.0.RELEASE-sources.jar; 包含翻译后的API文档:...
Maven坐标:org.springframework.boot:spring-boot:2.3.12.RELEASE; 标签:springframework、boot、spring、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览...
java运行依赖jar包
spring-boot-2.1.3.RELEASE.jar -autoconfigure- -devtools- -maven-plugin- -starter- -starter-jdbc- -starter-json- -starter-logging- -starter-test- -starter-tomcat- -starter-web- -test- -test-...
java运行依赖jar包
spring-boot最新正式版源码spring-boot-2.2.6.RELEASE.zip,github太慢特上传此处,方便大家学习使用。其他资源亦可从我的资源页获取https://download.csdn.net/user/u010887744/uploads,如果没找到你想要的可以...
spring-plugin-core-1.2.0.RELEASE
赠送jar包:oss-spring-boot-starter-1.0.3.jar 赠送原API文档:oss-spring-boot-starter-1.0.3-javadoc.jar 赠送源代码:oss-spring-boot-starter-1.0.3-sources.jar 包含翻译后的API文档:oss-spring-boot-...
标签:pig4cloud、spring、plugin、starter、boot、oss、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持...
java运行依赖jar包
struts2-spring-plugin-2.3.15.2.jar ; struts2-json-plugin-2.3.16.3.jarstruts2-spring-plugin-2.3.15.2.jar ; struts2-json-plugin-2.3.16.3.jar
camunda-bpmn-model-7.10.0.jar,camunda-bpm-spring-boot-starter-3.2.0.jar,camunda-bpm-spring-boot-starter-rest-3.2.0.jar,camunda-bpm-spring-boot-starter-test-3.2.0.jar,camunda-bpm-spring-boot-starter-...
yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm
yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm
赠送jar包:spring-plugin-metadata-1.2.0.RELEASE.jar; 赠送原API文档:spring-plugin-metadata-1.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-metadata-1.2.0.RELEASE-sources.jar; 包含翻译后的...
赠送jar包:spring-plugin-metadata-2.0.0.RELEASE.jar; 赠送原API文档:spring-plugin-metadata-2.0.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-metadata-2.0.0.RELEASE-sources.jar; 赠送Maven依赖信息...
13.2.3. Using the Spring Boot Maven Plugin 13.3. Gradle 13.4. Ant 13.5. Starters 14. Structuring Your Code 14.1. Using the “default” Package 14.2. Locating the Main Application Class 15. ...