【钉钉开发】企业内部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域名,镜像部分的配置更改如下

 
    
     aliyunmaven
     *
     阿里云公共仓库
     https://maven.aliyun.com/repository/public
    
     
     aliyunmaven
     *
     阿里云谷歌仓库
     https://maven.aliyun.com/repository/google
    
    
     aliyunmaven
     *
     阿里云Apache仓库
     https://maven.aliyun.com/repository/apache-snapshots
    
    
     aliyunmaven
     *
     阿里云spring仓库
     https://maven.aliyun.com/repository/spring
    
    
     aliyunmaven
     *
     阿里云spring插件仓库
     https://maven.aliyun.com/repository/spring-plugin
    
	 
  

 

你可能感兴趣的:(钉钉)