在导入maven项目时,发现有几个公司私服的核心jar包死活拉不下来,尝试了几种办法无果,最后参考同事的办法解决。
pom.xml中,几个核心依赖jar包无法拉取到本地
报错:Resolve dependencies
Cannot resolve xxx…
Maven home path、User setting file和Local repository的设置。



重新导入该maven项目
如果还无法解决,需要检查Maven的配置文件setting.xml

上述几个办法仍然未能解决我的问题,最后参考同事的解决办法完美决绝

在

对应代码:
</profiles>
nexusProfile</id>
nexus</id>
nexus</name>
http://需要改为本公司私服仓库url</url>
true</enabled>
</releases>
true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
nexusProfile</activeProfile>
</activeProfiles>
找到maven窗口,在项目根节点下,Lifecycle-->clean-->intall,或者直接在控制台输入命令 mvn clean install

最后几个公司私服的jar包终于拉取到本地。