如何去掉maven的[WARNING] Using platform encoding (UTF-8 actually) to copy filter

时间:2020-12-25 18:27:29

方法一:

再使用maven和jetty的时候,如果你不想看到上面的警告,那么你只需要修改pom如下:

<plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-resources-plugin</artifactId>     <version>2.3</version>     <configuration>         <encoding>UTF-8</encoding>     </configuration> </plugin>

方法二:

添加<configuration>…</configuration>即可

  1. <project>  
  2.   ...  
  3.   <properties>  
  4.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
  5.   </properties>  
  6.   ...  
  7. </project>