一个可能的原因是由于你的网络从局域网(比如实验室网)切换到了代理网络(比如校园公共网)。
方法一:重新切换到非代理网络
办法二:repository 或 dependency 名称不对,比如新repository中给dependency起了个新名字,而你的pom.xml文件中没有更新
办法三:更改 localRepository (默认为 ~/.m2/repository)中的settings.xml,加入本地库的server信息,比如id, username, password
办法四:更改maven 的conf/settings.xml,与办法四类似,加入本地库的server信息
办法五:删除localRepository(默认为~/.m2/repository)中对应生成的jar包的lastUpdated文件