1、报错 failed to transfer from http://0.0.0.0/ during a previous attempt.
com.byd.xxx:xxx-parent:pom:1.1.0-SNAPSHOT failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer artifact com.byd.xxx:xxx-parent:pom:1.1.0-SNAPSHOT from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [xxxrepo (http://hub.byd.com:9081/repository/maven-xxx-snapshot/, default, releases+snapshots), xxx (http://hub.byd.com:9081/repository/maven-xxx-snapshot, default, releases+snapshots)]
Since Maven 3.8.1 http repositories are blocked.
新版本maven 不支持http问题,通过在settings.xml增加如下内容即可解决:
<mirror><id>maven-default-http-blocker</id><mirrorOf>external:http:*</mirrorOf><name>Pseudo repository to mirror external repositories initially using HTTP.</name><url>http://0.0.0.0/</url>
</mirror>
其中url写成实际的地址:例如:http://hub.byd.com:9081/repository/maven-xxx-snapshot/
2、为什么springboot的pom文件中有的依赖不用加版本号,有的依赖却必须加
应为springboot中引入了一个父依赖,其中包含了一些依赖的版本号,这些依赖不需要添加版本,而有一些依赖并不在父依赖的版本中,这些依赖需要添加版本。