java遇到 Check $M2_HOME 问题 解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

时间:2023-02-07 09:09:10

步骤:

  1.添加M2_HOME的环境变量

  2.Preference->Java->Installed JREs->Edit 选择一个jdk

java遇到 Check $M2_HOME 问题 解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

  3.添加 -Dmaven.multiModuleProjectDirectory=$M2_HOME

java遇到 Check $M2_HOME 问题 解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

  4. 神圣的一步:Finish

  Over !!! 小伙伴,不要太感动哦~      #^_^#