如何在maven的setting.xml中指定jdk版本(详细步骤)

打开maven所在的位置,打开conf下的setting.xml,如我的:D:\Path\apache-maven-3.5.4\conf\setting.xml
进行编辑,编辑如下:

	<profile>
      <id>jdk-1.8</id>
 
      <activation>
		<activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>
 
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>

在这里插入图片描述

发布了760 篇原创文章 · 获赞 636 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/qq_41946557/article/details/104292309