Intellij +Maven 报错: Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

时间:2022-06-17 17:23:36

在intellij使用 Maven Project 测试时,运行test时看到log里的报错信息:

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

经查证,是Maven版本与 Intellij 兼容的问题,现在使用的版本是:

Maven apache-maven-3.3.9-bin.zip

Intellij: 14.0.1 community version

将 maven 换做apache-maven-3.1.1, 问题解决

Intellij +Maven 报错: Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.