Maven 修改默认工程下的jdk版本

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Fighting_mjtao/article/details/82989308

在Maven安装包的conf目录下面的settings.xml的<Profiles>节点下添加如下代码即可:

<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>

猜你喜欢

转载自blog.csdn.net/Fighting_mjtao/article/details/82989308