使用maven编译jar包时,报如下错误:

-source 1.5 中不支持 diamond 运算符
[ERROR] (请使用 -source 7 或更高版本以启用 diamond 运算符)

修改IDEA对应jdk设置,都无法解决,后将pom文件中增加如下内容,即可打包成功

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

相关文章:

  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-04-22
  • 2021-04-03
猜你喜欢
  • 2021-08-03
  • 2021-05-27
  • 2021-11-03
  • 2021-06-10
  • 2021-12-21
相关资源
相似解决方案