欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

新建maven项目默认使用jdk1.8

程序员文章站 2022-02-06 11:31:36
...

 在maven conf/settings.xml 中添加内容<profile>

 <profiles>
    
    <profile>   
	    <id>jdk1.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> 
   
  </profiles>

 

相关标签: maven jdk1.8