遇到错误:
[ERROR] Failed to execute goal on project ecif-task-frame: Could not resolve dependencies for project … Failure to find com.xxx.xxx:yyyy:jar:1.0.0 in http://123.56.183.194:8081/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of releases has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException ;
这个com.xxx.xxx:yyyy:jar:1.0.0 包是我们公司自己内网的包, 但是我们公司内网并不是 上面那个ip地址, 所以他下载不下来.
那么问题来了, 这个ip地址到底是哪里的, 因为我配置了我自己的settings文件如图:
这里我用的是配置了公司的settings文件, 里面也没有上面错误的那个ip地址.
但是这里注意: 我这里是用的override默认settings文件
所以我又去他默认settings文件里面找, 是否有这个ip地址, 果然:
也就是说 我指定了自己的settings文件并没有卵用, 只是在import 的时候是从指定仓库下载, 但是在打包的时候他又去找自己的默认settings文件了.
所以问题到这里就解决了, 我把默认settings文件改成公司的settings文件, 不用idea自带的override了.