在install maven项目的时候如果有:
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
提示,这说明你没有指定编码,只能按照平台的默认编码进行拷贝。如果原来编码使用的是UTF-8进行保存,而这里拷贝用GBK肯定会出现乱码的。所以要改成自己的编码保存的方式。
添加:
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
添加后:
Using 'UTF-8' encoding to copy filtered resources.
会出现如上的提示。
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.
手工在 java build path 中加载 jre system library。是可以临时的解决
但一旦执行 maven - update project configuration后,配置将恢复,警告又会出现,so
更改pom文件才是王道
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>