在eclipse里使用maven,链接nexus私服。eclipse
添加依赖以后,老是报添加的依赖jar文件找不到,可是在nexus的库里面能找到这个依赖的jar文件,可是在本地的maven库里面找不到,因而我将本地库里面这个依赖对应的文件夹删掉,而后在eclipse里面执行update dependencies。成功解决问题!maven
右键单击项目->maven->update dependencies。ide
引发的缘由是因为本地库从nexus中请求jar文件,若是私服中不存在则取网上下载,若是网速过慢,下载时间超过了maven设置的时间限制就会报该错误。this
加入阿里云资源,速度会快不少
阿里云
在settings.xml文件中加入url
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
</mirrors>spa