Q1:由于网络原因,maven仓库中产生了后缀LastUpdated文件,再次clean直接报错

自己认为最优解决方案:使用脚本,一次性清除所有的LastUpdated后缀的文件。

# linux脚本

# 这里写你的仓库路径
REPOSITORY_PATH=~/Documents/tools/repository
echo 正在搜索...
find $REPOSITORY_PATH -name "*lastUpdated*" | xargs rm -fr
echo 搜索完
# windows脚本
@echo off
rem create by NettQun

rem 这里写你的仓库路径
set REPOSITORY_PATH=D:\Java\maven-repository\maven-aliyun\repository
rem 正在搜索...
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (
echo %%i
del /s /q "%%i"
)
rem 搜索完毕
pause


Hole yor life get everything if you never give up.