Plugin 'org.springframework.boot:spring-boot-maven-plugin:'not found


前言

在配置spring-boot的maven时,软件报错:Plugin 'org.springframework.boot:spring-boot-maven-plugin:'not found
在CSDN和博客园博主智慧的帮助下,解决了这个问题,现将解决过程记录下来,以作后续参考。

解决方案

在pom.xml中,我的原始配置如下:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

在maven库中,发现了Repository\org\springframework\boot\spring-boot-maven-plugin存在相关插件2.1.7.RELEASE
在pom.xml上补充版本:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>2.1.7.RELEASE</version>
</plugin>

更新maven配置后,发现不再报此错误。

又有了一个新的报错"Element 'plugin' cannot have character [children], because the type's content type is element-only"
通过参考博客园文章并检查pom.xml后,发现在上一步添加的</version>中我不小心多打了一个">"变成了</version>>
把多余的括号去掉后终于正常了。

参考

  1. 解决:Plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘ not found
  2. Element 'plugin' cannot have character [children], because the type's content type is element-only


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM