Why Maven project is tied to J2SE-1.5 by default?

前端 未结 3 1172
南笙
南笙 2021-02-07 11:48

If I create default empty based on no archetype Maven project in Eclipse, it will be based on J2SE-1.5.

3条回答
  •  孤独总比滥情好
    2021-02-07 12:12

    It's consistent with source and target settings of maven-compiler-plugin, which are 1.5 by default.

    If you change them, generated project will use different version of as well:

    
        org.apache.maven.plugins
        maven-compiler-plugin
        3.1
        
             1.7
             1.7
        
    
    

    Note that if you change compliance settings of Eclipse project without changing of maven-compiler-plugin settings, your Maven builds would be inconsistent with your Eclipse environment.

提交回复
热议问题