如何解決設置maven時Could not read settings.xml


今天初學maven碰到了配置錯誤

錯誤信息:

解決方法:

可以看到再次點擊Browse選擇settings.xml文件后出現了警告:Unable to parse global ...\u7a9d\n<m... @226:3) ,

這個226說明第226行出現了錯誤,導致了文件不能正常讀取,仔細檢查該行有沒有錯誤或者中文信息。

更改后:

這個錯誤是settings.xml內標簽配置有問題,替換正確的標簽信息后能夠解決。

 

放一下使用的路徑配置:<localRepository>E:/maven/repository/</localRepository>    

 

阿里鏡像:

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

 

jdk配置:

<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM