maven下载之后解压,之后添加了path,
控制台执行 mvn --version 也能正常显示。
在eclipse 中 创建一个demo项目后,运行run as -> maven install 时提示如下:
-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.
从网上没找到相应的解决问题,不知各位是否遇到过此问题
刚刚测了一下,用eclipse 自带的maven好使,apache下载的不好用
PHP中文网2017-04-21 11:19:25
I found two posts on the Internet before to modify the eclipse.ini file and add -Dmaven.multiModuleProjectDirectory=$M2_HOME
, but it didn’t work. Later, I added this paragraph to the jdk parameters and it worked
Environment variables are configured like this
shell
export M2_HOME=/Users/mac/Applications/maven export PATH=$M2_HOME/bin:$PATH
伊谢尔伦2017-04-21 11:19:25
Check whether the environment variables are configured correctly, and whether the eclipse
中maven
configuration is correct
伊谢尔伦2017-04-21 11:19:25
Did you install a plug-in for eclipse?
Have you modified the maven setting.xml warehouse path? There is also a designated place in eclipse. If it doesn’t work, try adding the environment variables when running