在更改maven中央仓库(将其更改为阿里的maven仓库),配置修改完成后,新建一个maven项目,对这个项目进行maven test(测试)时,出现如下的问题:
Unable to update index for aliyun|http://maven.aliyun.com/nexus/content/groups/public/
当出现这个异常信息时,你所使用的阿里maven仓库是不能正常使用的,在pom.xml中是访问不到阿里的maven仓库,那么为什么会出现这个异常信息呢?
出现这个异常,问题就在于你没有把settings.xml文件的编码格式设置为UTF-8的格式;
当你把它设置为UTF-8的格式之后,会出现Update indexes,来更新maven仓库(这个需要等待一段时间)
如果Update indexes更新完成之后出现错误提示窗,那么需要在window--》show view---》other--->maven--->点击maven repositories
rebuild index完成后,在pom.xml就可以搜索到相关的依赖包了,如果在pom.xml找不到一些版本的包,可以到去网上找:http://mvnrepository.com/
或者去阿里的仓库中查找:
http://maven.aliyun.com/nexus/#welcome