maven,pom.xml 不更新,不加载包

pom.xml文件已经加载了  com.xx.scv.common.tair;包 (该包里包含tairHelper类)

但是文件仍然报错,找不到delete方法

import com.xx.scv.common.tair.TairHelper;
private static TairHelper tairHelper;
public static void deleteTairData(String tairKey) throws Exception {
tairHelper.delete(tairKey);
}

解决办法:

把maven仓库里的.m2文件删除,在idea里在重新加载 pom.xml->maven->Reimport

删除.m2文件 

控制台输入 cd .m2 , rm-rf .m2

 

 

原因:

已经有com.xx.scv.common.tair;包,但是这个包有更新,所以需要重新加载。

posted on 2017-02-15 20:48  积累学习  阅读(854)  评论(0编辑  收藏  举报

导航