Brief description
When we introduce the maven dependency package in the idea, the download of the dependency package will fail due to bad network conditions, computer freezes, etc.; and after the download fails, reloading does not solve the problem, but needs to be cleaned up first Reload can be performed only after downloading failed files.
Solution
set REPOSITORY_PATH=你的maven仓库全路径(如d:maven)
rem 正在搜索...
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (
del /s /q %%i
)
rem 搜索完毕
pause
-
Copy and paste the above code into your notepad, and modify the suffix to .bat
-
Modify the path path, modify the path path to the full path of your maven warehouse storage disk
-
Double-click to run, you can delete the jar package that failed to download
-
After running, just close it
-
Open idea and reload again, this time it can usually be successful