因为maven仓库内部有些文件存在 _remote.repositories 后缀文件,导致在重新刷新maven内部远程jar的时候没有下载,还是只是本地找,需要把对应的文件删除,然后去远程仓库中心下载,所以需要删除仓库内部的 【 _remote.repositories 】对应的文件
文件名称:定向扫描文件删除指定后缀文件.bat
文件内容:
set REPOSITORY_PATH=D:\apache-maven-repository\com\
rem 正在搜索...
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*_remote.repositories*"') do (
del /s /q %%i
)
rem 搜索完毕
pause
解释: 其中 D:\apache-maven-repository\com\ 为需要进行操作的文件夹
_remote.repositories 为对应文件的后缀