idea中使用maven项目默认打开jdk1.5问题
百度了很多,修改idea中项目配置和settings都只在当时有效,重新打开后还是会存在问题,于是修改了maven的默认配置:
-
找到自己maven安装位置下的conf文件夹下的settings.xml文件
默认使用的1.4
-
修改配置:
在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>