Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
maven 使用install命令报错 Compilation failure 在pom增加如下元素
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
当你设置了jdk版本为6以上后还报如下的错误。在pom增加如上图properties元素
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project demo-spi-threadpool: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] 错误: 不再支持源选项 5。请使用 6 或更高版本。
[ERROR] 错误: 不再支持目标选项 1.5。请使用 1.6 或更高版本。
还没有评论,来说两句吧...