【釘釘開發】企業內部H5微應用demo在使用mvn install構建時出現的錯誤(1)

問題描述

使用的是釘釘官方文檔中Java版QuickStart

在使用mvn install時出現的錯誤如下

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.dingtalk:h5app-corp-quickstart:1.0.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.6.RELEASE from/to repo1 (http://repo1.maven.org/maven2/): Transfer failed for http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.0.6.RELEASE/spring-boot-starter-parent-2.0.6.RELEASE.pom 501 HTTPS Required and 'parent.relativePath' points at wrong local POM @ line 17, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.dingtalk:h5app-corp-quickstart:1.0.0-SNAPSHOT (E:\eeproject\h5app-corp-quickstart\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.dingtalk:h5app-corp-quickstart:1.0.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.6.RELEASE from/to repo1 (http://repo1.maven.org/maven2/): Transfer failed for http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.0.6.RELEASE/spring-boot-starter-parent-2.0.6.RELEASE.pom 501 HTTPS Required and 'parent.relativePath' points at wrong local POM @ line 17, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

解決方法

我的maven在配置settings.xml時使用的mirror是http,maven中心倉庫不再支持純http訪問,需要設置爲https域名,鏡像部分的配置更改如下

 <mirrors>
    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>阿里雲公共倉庫</name>
     <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
     <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>阿里雲谷歌倉庫</name>
     <url>https://maven.aliyun.com/repository/google</url>
    </mirror>
    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>阿里雲Apache倉庫</name>
     <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>
    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>阿里雲spring倉庫</name>
     <url>https://maven.aliyun.com/repository/spring</url>
    </mirror>
    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>阿里雲spring插件倉庫</name>
     <url>https://maven.aliyun.com/repository/spring-plugin</url>
    </mirror>
	 
  </mirrors>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章