当使用Maven遇到”resolution will not be reattempted until the update interval of MyRepo has elapsed”的解决办法

当你部署了一个私有的Maven Repo,然后release/snapshots里库被更新了,就有可能遇到标题上的错误。

网上有一种解决办法,就是修改setting.xml里的updatePolicy设置,比如:

把updatePolicy改成always, 就没有这个问题了。

还有一种办法就是在命令行上加上-U的选项,有一样的效果。下面有一些说明。

  • -U,–update-snapshots Forces a check for updated releases and snapshots on remote repositories
  • -up,–update-plugins Ineffective, only kept for backward compatibility

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注