M2_HOME not working in IntelliJ on OSX 10.10.1 Yosemite

孤街醉人 提交于 2019-12-05 14:43:23

checkout :

"and the file /etc/launchd.conf looks like this:"

change :

setenv $M2_HOME /usr/local/apache-maven-3.2.3

to

setenv M2_HOME /usr/local/apache-maven-3.2.3

Create new file /Library/LaunchDaemons/setenv.M2_HOME.plist:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
      <key>Label</key>
      <string>setenv.BAR</string>
      <key>ProgramArguments</key>
      <array>
        <string>/bin/launchctl</string>
        <string>setenv</string>
        <string>M2_HOME</string>
        <string>/opt/local/share/java/apache-maven-3.1.1</string>
      </array>
      <key>RunAtLoad</key>
      <true/>
      <key>ServiceIPC</key>
      <false/>
    </dict>
    </plist>

Then restart the computer, or execute

launchctl load -w /Library/LaunchDaemons/setenv.M2_HOME.plist

Relaunch IDEA, and it picks up MAVEN_HOME. Tested on Yosemite 10.10.3.

Source: http://lajosd.blogspot.be/2015/06/place-following-content-enhance-it-to.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!