IntelliJ IDEA Maven报错 -Dmaven.multiModuleProjectDir

问题:

    IntelliJ IDEA 使用Maven构建项目报错 -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.[ERROR] Maven execution terminated abnormally (exit code 1)

解决办法:

    依次打开以下菜单项:Preferences... > Build,Execution,Developyment > Build Tools > Maven > Runner

然后在VM Options中添加如下配置:-Dmaven.multiModuleProjectDirectory=$M2_HOME

 

posted @ 2016-05-16 14:59  zonc  阅读(946)  评论(0编辑  收藏  举报