Return code is: 501 , ReasonPhrase:HTTPS Required and ‘parent.relativePath‘ points at no local POM

时间:2024-06-01 20:56:57
[ERROR]   The project tech.lianxiang:finance:0.0.1-SNAPSHOT (/home/jenkins/lib/jenkins/workspace/testmaven/finance/finance/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.0.RELEASE/spring-boot-starter-parent-2.1.0.RELEASE.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM @ line 5, column 13 -> [Help 2]

 

vi /home/maven/maven/conf/settings.xml

j加入  :<mirror> <id>repo2id> <mirrorOf>centralmirrorOf> <name>Human Readable Name for this Mirror.name> <url>https://repo2.maven.org/maven2/url> mirror>

修改 url为对应的 正确url

 

Return code is: 501 , ReasonPhrase:HTTPS Required and ‘parent.relativePath‘ points at no local POM