您的位置:首页 > 编程语言 > Java开发

maven-compiler-plugin插件-JDK版本和编码

2016-01-06 17:06 549 查看
方案一

[html] view
plaincopy

<plugins>  

          <plugin>  

              <groupId>org.apache.maven.plugins</groupId>  

              <artifactId>maven-compiler-plugin</artifactId>  

              <executions>  

                  <execution>  

                      <id>default-compile</id>  

                      <phase>compile</phase>  

                      <goals>  

                          <goal>compile</goal>  

                      </goals>  

                      <configuration>  

                          <encoding>UTF-8</encoding>  

  <source>1.6</source> 

                <target>1.6</target> 

                      </configuration>  

                  </execution>  

              </executions>  

          </plugin>  

</plugins>  

方案二、

[html] view
plaincopy

<plugins>  

          <plugin>  

              <groupId>org.apache.maven.plugins</groupId>  

              <artifactId>maven-compiler-plugin</artifactId>  

              <executions>  

                  <execution>  

                      <id>default-compile</id>  

                      <phase>compile</phase>  

                      <goals>  

                          <goal>compile</goal>  

                      </goals>  

                  </execution>  

              </executions>  

              <configuration>  

                  <encoding>UTF-8</encoding> 

<source>1.6</source> 

                 <target>1.6</target> 

              </configuration>  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: