添加依赖或者导入新项目时出现类似的错误:
- Failure to transfer commons-collections:commons-collections:jar:3.2.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact commons-collections:commons-collections:jar:3.2.2 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.
或者是这种类似的
- Missing artifact com.oracle:ojdbc14:jar:10.2.0.2.0
此时在eclipse中可以选择项目,右击,maven,update project。此时如果还不可以,还是右击项目,构建路径,配置构建路径,选择库,如下图,此时查看maven dependencies会提示在某个路径中缺少某个jar包,此时根据包名称去网上查找下载放到该路径并执行上面说的update project即可。