Compiling Java 7 code via Maven

前端 未结 18 1507
夕颜
夕颜 2020-12-04 07:10

My pom file lists


  
    
        
            
                

        
18条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 08:03

    try using a newer version of the maven compiler plugin:

        
            maven-compiler-plugin
            3.2
            
                1.7
                1.7
            
        
    

    also, specifying source file encoding in maven is better done globally:

    
            UTF-8
    
    

    EDIT: As this answer is still getting attention i'd just like to point out that the latest values (as of latest edit) are 3.2 for maven compiler plugin and 1.8 for java, as questions about compiling java 8 code via maven are bound to appear soon :-)

提交回复
热议问题