maven does not compile in java 1.6

后端 未结 3 1917
挽巷
挽巷 2020-12-22 03:45

how to force maven to compile 1.6 compatible source

i made web-app project with maven in eclipse. change web.xml to use 3.0 version -> then update configuration and

3条回答
  •  萌比男神i
    2020-12-22 04:25

    You have it there. Just put 1.6 instead of 1.7:

      
        org.apache.maven.plugins
        maven-compiler-plugin
        3.0
        
          1.6
          1.6
        
      
    

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

    I would also avoid additional configuration if not needed.

提交回复
热议问题