先删掉本地pom-root文件夹,然后按步骤配置下就可以了。
1、MAVEN HOME环境变量:M2_HOME
设置到对应maven的解压路径下:比如D:\Java\apache-maven-3.2.2
2、在Path环境变量中添加指定bin目录的路径:
例如:D:\Java\apache-maven-3.2.2\bin
3、确保只有一个有效的settings.xml
删除多余的xml, 比如c:\Users\登录用户 以及 本地仓库下的xml
4、修改maven解压路径下的settings.xml
定义profile
<profile>
<id>cyyun</id>
<repositories>
<repository>
<id>central</id>
<name>libs-release</name>
<url>http://192.168.1.100/artifactory/libs-release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://192.168.1.100/artifactory/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
激活相关profile:
<activeProfiles>
<activeProfile>cyyun</activeProfile>
</activeProfiles>
5、经过以上配置,在命令行测试速度正常没有问题。eclipse上的配置要注意指定settings.xml。