maven 设置jdk编译水平

在pom.xml添加:

  1. <build>
  2.   <plugins>
  3.     <plugin>
  4.       <groupId>org.apache.maven.pluginsgroupId>
  5.       <artifactId>maven-compiler-pluginartifactId>
  6.       3.1
  7.       <configuration>
  8.         <source>6source>
  9.         <target>6target>
  10.         <encoding>UTF-8encoding>
  11.       configuration>
  12.     plugin>
  13.   plugins>
  14. build>