Maven compile能过,idea build失败问题

问题描述

idea 版本

idea 2020.1
在这里插入图片描述

问题表现

maven 项目,已经引入jar包依赖;
本地repository里检查下载好了jar包;
idea项目下Libraries下查看依赖jar也存在;
同时编译失败的java文件中也能点进依赖的class类;

且maven compile 编译成功

idea build失败,报错:xxx.xx.x 不存在
比如我报错的就是这些依赖包不存在
在这里插入图片描述

解决方案

cmd命令行执行命令mvn idea:idea
在这里插入图片描述

然后File -> Invalidate Caches / Restart
在这里插入图片描述
打开之后rebuild project,问题解决

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章