Maven錯誤 diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator)問題解決


如果在Maven構建時出現:

diamond operator is not supported in -source 1.5
(use -source 7 or higher to enable diamond operator)

的錯誤,是由於使用了complier的插件版本為1.5導致的,因為在默認不配置情況下,Maven3默認為1.5,此時如果項目上使用泛型,那么就會出現錯誤。

解決方法就是升級為1.8,具體參考:http://www.cnblogs.com/EasonJim/p/6810758.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM