1:打开你的maven安装目录,找到conf/settings.xml文件。
2:修改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>3.最后在eclipse右键项目,选择maven->update project....
本文介绍如何通过修改Maven的settings.xml文件来指定Java 1.7作为项目的源代码和目标代码的编译版本。通过具体步骤说明如何在Eclipse中更新项目以使用新的编译设置。

1593

被折叠的 条评论
为什么被折叠?



