Maven: Source Encoding in UTF-8 not working?

后端 未结 5 668
南旧
南旧 2020-12-13 03:38

i am converting a project from Ant to Maven and i\'m having problems with a specific unit test which deals with UTF-8 characters. The problem is about the following String:<

5条回答
  •  难免孤独
    2020-12-13 04:16

    this works for me:

    ...
     
            **ISO-8859-1
            ISO-8859-1**
        
    ...
      
        Project
    
        src
        
          
            maven-compiler-plugin
            2.3.2
            
              1.6
              1.6
              **${project.build.sourceEncoding}**
            
          
          
            maven-war-plugin
            2.2
            
              WebContent
            
          
        
      
    

提交回复
热议问题