报错内容:
Some problems were encountered while building the effective settings
expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<!--\u8fdc\u7a0b\u4ed3\u5e93-->\r\n\t<mirror>\r\n\u3000\u3000\t<i... @161:6) @ D:\R7000\apache-maven-3.6.3\conf\settings.xml, line 161, column 6
expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<!--\u8fdc\u7a0b\u4ed3\u5e93-->\r\n\t<mirror>\r\n\u3000\u3000\t<i... @161:6) @ D:\R7000\apache-maven-3.6.3\conf\settings.xml, line 161, column 6
做法
检查相关文档161行代码,无严重性问题
原因
可能在Maven警告提示区域存在空格等不规范字符,在网上复制到项目中时经常出现类似问题。
pop.xml文件,setting.xml文件极易出现此类问题。
解决
到阿里云公共仓库更新配置https://maven.aliyun.com/mvn/guide
maven 配置指南
打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在<mirrors></mirrors>
标签中添加 mirror 子节点:
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
如果想使用其它代理仓库,可在<repositories></repositories>
节点中加入对应的仓库使用地址。以使用 spring 代理仓为例:
<repository>
<id>spring</id>
<url>https://maven.aliyun.com/repository/spring</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
在你的 pom.xml 文件<denpendencies></denpendencies>
节点中加入你要引用的文件信息:
<dependency>
<groupId>[GROUP_ID]</groupId>
<artifactId>[ARTIFACT_ID]</artifactId>
<version>[VERSION]</version>
</dependency>
执行拉取命令:
mvn install