一、[ERROR] 不再支持源选项 1.5。请使用 1.6 或更高版本。 [ERROR] 不再支持目标选项 1.5。请使用 1.6 或更高版本。
解决方法:在pom.xml中添加 (写自己的jdk版本,我的是jdk10)
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
</properties>
二、maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
解决方法:1、cmd命令行
mvn clean package -Dmaven.test.skip=true
2、在pom.xml中添加
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>