maven 新建项目时修改默认jre路径

新建maven项目时,JRE System Library默认为J2SE-1.5

如果想修改为1.7,修改maven的settings.xml ,在profiles中添加

<profile>
      <id>jdk-1.7</id>
      <activation>
<activeByDefault>true</activeByDefault>
        <jdk>1.7</jdk>
      </activation>
 <properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
 </properties>
    </profile>
原文地址:https://www.cnblogs.com/vincent4code/p/5749477.html