今天初學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>