第1步:
因为Eclipse集成的Maven插件是没有settings.xml文件的,所以,首先需要手动安装好maven(从maven的官网下载后解压即可)。
第2步:
然后将“maven安装路径/conf/”目录下的settings.xml文件复制到“用户目录/.m2”目录下。
第3步:
修改“用户目录/.m2”目录下的settings.xml文件:在<profiles></profiles>
这一对标签之间,添加上下列代码,然后保存即可:
<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.c