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

参考方法:https://www.cnblogs.com/DDgougou/p/12636770.html
自己认为最优解决方案:使用脚本,一次性清除所有的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

相关文章:

  • 2021-11-25
  • 2021-07-09
  • 2021-06-24
  • 2022-12-23
  • 2022-01-03
  • 2021-07-27
  • 2021-07-25
猜你喜欢
  • 2021-08-05
  • 2022-02-21
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-06-19
相关资源
相似解决方案