1、因为maven默认的是jdk1.4版本,所以需要修改
在maven安装目录下的conf文件夹下的setting.xml中,添加下面的内容
在<mirror> ..... </mirror>
中添加
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
在<profile>.........</profile>
中添加:
<profile>
<id>jdk- 1.8 </id>
<activation>
<activeByDefault> true <