Maven初使用的一个配置
使用mvn install 码云下载得项目一直报错:Non-resolvable parent POM for co.yiiu:pybbs:5.2.1: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.1.RELEASE from/to jdk18 (http://www.myhost.com/maven/jdk18): Failed to transfer file: http://www.myhost.com/maven/jdk18/org/springframework/boot/spring-boot-starter-parent/2.1.1.RELEASE/spring-boot-starter-parent-2.1.1.RELEASE.pom. Return code is: 500 , ReasonPhrase:Internal Server Error. and ‘parent.relativePath’ points at no local POM @ line 14, column 11
;
最后发现是maven在基础配置本地仓库后,,maven setting中配置的mirrors配成可用的地址,如阿里云的maven镜像地址:
下面展示一些 内联代码片
。
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
最好把jdk版本也制定好:</