其他分享
首页 > 其他分享> > var编译错误 ,设置JDK11 配置Maven进行编译

var编译错误 ,设置JDK11 配置Maven进行编译

作者:互联网

配置下maven的pom.xml文件,将目标编译版本改为JDK11,配置如下

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <maven.compiler.source>11</maven.compiler.source>
  <maven.compiler.target>11</maven.compiler.target>
</properties>

<build>
  <finalName>test</finalName>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>11</source>
        <target>11</target>
      </configuration>
    </plugin>
  </plugins>
</build>
</project>


标签:11,maven,配置,JDK11,Maven,编译,pom
来源: https://blog.csdn.net/qq_25958497/article/details/121228291