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....
转载请注明原文地址: https://ju.6miu.com/read-1293842.html