No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

默认eclipse编译时通过jre编辑的,但是maven编辑是通过jdk编辑的,所以就会报上面的错误。

现在需要修改eclipse编辑。

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

然后update project(更新工程),之后maven  install 就不会报错了