maven编译项目时,总是报编码错误,编译通不过
1、先检查项目的encoding是不是utf-8
2、在pom.xml文件中加入
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin>