Set default java compliance level for Maven projects in Eclipse

前端 未结 4 1729
情歌与酒
情歌与酒 2020-12-31 07:27

The default compliance level for Maven is 1.5 and every time that I update a maven project in Eclipse it sets back the compliance level from 1.6 to 1.5 which is really annoy

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-31 07:40

    Another way (if you do not have already compiler plugin defined) is to set just these properties in your pom file:

    
      1.8
      1.8
    
    

    Details: https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html

提交回复
热议问题