Maven 常见问题解决

来源:互联网 发布:数据备份软件下载 编辑:程序博客网 时间:2024/06/14 01:29

  • 一 、No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  1. 在项目名的地方鼠标右键单击
  2. 选择 Build Path
  3. 选择 Configure Build Path (如图所示)
    1. 选择 Java Build Path 
    2. 在 Libraries 中选择 你的JRE  将他移除
    3. 然后选择 右边的 Add Library
    1. 选择 JRE System Library
    2. 选择Next
    1. 选择 Alternate JRE
    2. 点击右边的 Installed JREs
    1. 点击 Installed JREs 面板中右边 Edit
    1. 点击 Directory 将 你的 jre 换成 Jdk的安装目录







二、 -Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

  • 修改Installed Jres 的 Default VM arguments
  • -Dmaven.multiModuleProjectDirectory=$M2_HOME