阿里云配置settings.xml文件
<?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">
<!--自己的本地库-->
<localRepository>/Users/lcx/.m2/repository</localRepository>
<mirrors>
<mirror>
<id>mirror</id>
<mirrorOf>!rdc-releases,!rdc-snapshots</mirrorOf>
<name>mirror</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>rdc-releases</id>
<username>3hagrU</username>
<password>sdkjd4v6Hh</password>
</server>
<server>
<id>rdc-snapshots</id>
<username>3hagrU</username>
<password>sdkjd4v6Hh</password>
</server>
</servers>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/51172-release-R2Bltn/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/51172-snapshot-ordiyO/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/51172-release-R2Bltn/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/51172-snapshot-ordiyO/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
具体原因:自己在配置的setttings.xml和maven config下的setting.xml有冲突,一山不容二虎,干掉一个
最后一步
重新导下依赖可以先删了pom.xml里的依赖然后还原,OK,打完收工
清理之前未下载完的.lastUpdated文件脚本,新建一个 .bat文件,复制下面脚本,然后双击执行
@echo off
rem create by NettQun
rem 这里写你的仓库路径
set REPOSITORY_PATH=D:\Java\repository
rem 正在搜索...
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (
echo %%i
del /s /q "%%i"
)
rem 搜索完毕
pause