【发布时间】:2014-11-12 18:40:38
【问题描述】:
由于以下两个错误,我无法构建我的 maven java web 应用程序:
diamond operator is not supported in -source 1.5
(use -source 7 or higher to enable diamond operator)
multi-catch statement is not supported in -source 1.5
(use -source 7 or higher to enable multi-catch statement)
我很困惑,因为我的项目使用 java 1.8.0,我从未真正使用过 1.5
什么可能导致这个问题,我该如何解决?
我尝试在 pom.xml 中添加以下行后构建它,但没有成功:
<properties>
<sourceJdk>1.8</sourceJdk>
<targetJdk>1.8</targetJdk>
</properties>
【问题讨论】:
标签: java maven web diamond-operator multi-catch