添加 JDBC 依赖项会导致所有工件丢失

Adding JDBC dependency causes all artifacts to go missing

我的项目中成功构建了 6 个左右的 Maven 依赖项。但是,当我尝试添加 JDBC 依赖项时,我收到所有现有工件的错误消息:

缺少工件 mysql:mysql-connector-java:jar:5.1.6

缺少工件 org.springframework:spring-aop:jar:3.2.3.RELEASE

缺少工件 org.springframework:spring-beans:jar:3.2.3.RELEASE

缺少工件 org.springframework:spring-context:jar:3.2.3.RELEASE

缺少工件 org.springframework:spring-core:jar:3.2.3.RELEASE

缺少工件 org.springframework:spring-expression:jar:3.2.3.RELEASE

缺少工件 org.springframework:spring-jdbc:jar:4.3.10.RELEASE

这是我要添加的依赖项:(看起来有效 XML)

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>4.3.10.RELEASE</version>
</dependency>

有效Pom.xml之前:

添加JDBC依赖后Pom.xml出错:

我已经检查过,根据 Maven 站点,4.3.10.RELEASE 是一个有效版本。

有谁知道为什么添加这一依赖项会导致整个 Pom.xml 出错?

原来我的 {User_Home}/.m2/settings.xml 文件中有错字。这导致新的 Maven 构建在更新时全部失败,因为设置文件不可读。