問題概述
輸入artifactId時候出現多種選項
groupId也是如此
每次artifactId還沒輸完就下載 產生很多error文件
解決方法
1.File->Settings->Maven->Repositories->選擇本地倉庫->Update
2.上述方法無用的話 卸載idea
選擇刪除緩存和本地記錄 重新安裝即可
3.刪除lastUpdated文件
1、cleanLastUpdated.bat(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 ( del /s /q %%i ) rem 搜索完畢 pause
2、cleanLastUpdated.sh(linux版本)
# create by NettQun # 這里寫你的倉庫路徑 REPOSITORY_PATH=~/Documents/tools/repository echo 正在搜索... find $REPOSITORY_PATH -name "*lastUpdated*" | xargs rm -fr echo 搜索完