wannimadeluogua
例如 陈晨
2021-02-22 10:31
采纳率: 0%
浏览 196

IDEA中运行maven为什么报settings.xml错误?

在学龙虾三少的SpringBoot构建电商基础秒杀项目时,运行maven项目,出现报错

Some problems were encountered while building the effective settings

Expected root element 'settings' but found 'w:wordDocument' (position: START_TAG seen ... w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">... @3:543) @ /Users/lixuzhao/.m2/settings.xml, line 3, column 543

经指点是setting配置文件出现错误

但是在网上换了很多个配置文件,仍然报错

Some problems were encountered while building the effective settings

Expected root element 'settings' but found 'w:wordDocument' (position: START_TAG seen ... w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">... @3:1704) @ /Users/lixuzhao/.m2/settings.xml, line 3, column 1704

配置文件如下<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<!-- 这里使用的是阿里的远程maven镜像,目前国内大多数都使用它 -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<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>
</profiles>
</settings>
不晓得现在应该怎么调试

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • weixin_45333098
    Ryan_蛤蟆 2021-02-22 13:22

    我也是运行没错,打包的时候报出setting,xml出错,搞了好久也没搞出来,好头疼

    点赞 评论

相关推荐