报错的的内容:
C:\Program Files\Java\jdk1.8.0_171\bin\java.exe" -Dmaven.multiModuleProjectDirectory=E:\A_Develop\marry\marry2.2\marry -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true "-Dmaven.home=E:\A_Development Kit\apache-maven-3.6.3" "-Dclassworlds.conf=E:\A_Development Kit\apache-maven-3.6.3\bin\m2.conf" "-Dmaven.ext.class.path=E:\A_Development Kit\IntelliJ IDEA 2020.1.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:E:\A_Development Kit\IntelliJ IDEA 2020.1.3\lib\idea_rt.jar=51683:E:\A_Development Kit\IntelliJ IDEA 2020.1.3\bin" -Dfile.encoding=UTF-8 -classpath "E:\A_Development Kit\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;E:\A_Development Kit\apache-maven-3.6.3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version2020.1.3 -s "E:\A_Development Kit\apache-maven-3.6.3\conf\settings.xml" -DskipTests=true clean
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com:marry:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 5, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com:marry:0.0.1-SNAPSHOT (E:\A_Develop\marry\marry2.2\marry\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com:marry:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 5, column 10: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [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中的setting中要有阿里云库
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
然后在设置里面:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
这样子如果还解决不了的话:那就还有可能是版本的问题:我当时建立了两个项目:
其中一个是:(这是打包没问题)
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.3</version>
<relativePath/>
</parent>
但是这个版本的就出现了问题:所以我怀疑版本有可能也会影响:我用的是2018版本的idea
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/>
</parent>