windows下maven打包eclipse工程
打包过程中,可能出现的2个问题:
①、[WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
解决办法:
只要在pom.xml文件中增加一个配置项即可
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
②、编码 gbk 的不可映射字符
解决办法:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf8</encoding>
</configuration>
</plugin>
参考: