IDEA 導(dǎo)入maven項(xiàng)目,會(huì)報(bào)錯(cuò)No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system。
由于創(chuàng)建Maven工程時(shí)引入一些新的依賴,或者加入了新的實(shí)體類,mapper映射,我們都會(huì)選擇在這里點(diǎn)一下clean,進(jìn)行一次清理重新加載,再點(diǎn)擊install下載依賴。
點(diǎn)擊install下載依賴出現(xiàn)錯(cuò)誤
原因:IDEA的maven地址設(shè)置出錯(cuò),系統(tǒng)找不到指定的maven路徑
問(wèn)題解決:
打開(kāi)setting,選擇Build,Execution,Deplyment,再選擇Build Tools,點(diǎn)擊Maven,會(huì)出現(xiàn)下圖文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-678528.html
設(shè)置完成后,點(diǎn)擊apply和ok重新構(gòu)建項(xiàng)目即可。(即重新刷新下載Maven依賴)文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-678528.html
到了這里,關(guān)于解決Maven中No valid Maven installation found. Either set the home directory in the configuration dialog的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!