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