开发者社区 问答 正文

maven 出错,求大神指点一二,谢谢啦~ 400 请求报错 

[ERROR] Failed to execute goal on project shiro: Could not resolve dependencies for project shiro:shiro1.0-SNAPSHOT: Failed to collect dependencies at org.apache.shiro:shiro-core1.3.1: Failed to read artifact descriptor for org.apache.shiro:shiro-core1.3.1: Could not transfer artifact org.apache.shiro:shiro-core:pom:1.3.1 from/to nexus-osc (http://maven.oschina.net/content/groups/public/): Connect to maven.oschina.net:80 [maven.oschina.net/183.78.182.122] failed: Connection timed out: connect -> [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
maven启动就出现这个异常,然而度娘原因说的也是不明不白,求大神们告知下什么原因,怎么做。。

展开
收起
kun坤 2020-05-30 23:14:49 473 分享 版权
1 条回答
写回答
取消 提交回答
  • 把maven仓库地址换了###### maven 对SNAPSHOT是每天更新一次,如果中间中断了一次,如按CTRL+C中断maven运行,可能会导致它不知道是否成功下载了包.
    在pom中加入

    <updatePolicy>always</updatePolicy>
    让maven强制更新包
    <!--<repository>--> 
     <!--<id>central</id>--> 
     <!--<url>https://*****.com/repository/public</url>-->
      <!--<snapshots>--> 
     <!--<enabled>true</enabled>--> 
     <!--<updatePolicy>always</updatePolicy>-->
      <!--</snapshots>-->  <!--<releases>-->
      <!--<enabled>true</enabled>-->  
    <!--</releases>-->
     <!--</repository>-->
    2020-05-30 23:14:56
    赞同 展开评论
问答分类:
问答标签:
问答地址: