Christian Posta bio photo

Christian Posta

Chief Architect, cloud application development @ Red Hat, author Microservices for Java Developers, open-source enthusiast, committer @ Apache, Cloud, Integration, Kubernetes, Docker, OpenShift, Fabric8, #blogger

Twitter Google+ LinkedIn Github Stackoverflow

Apparently, even if you put your environment variables into your .profile, IntelliJ won't pick it up. Which makes sense since .profile is for setting your shell environment. To set environment variables that IntelliJ (or any non-bash app) can see, such as the M2_HOME var needed for maven integration, create a file in /etc called "launchd.conf" (if it doesn't already exist... if it does, then just add the lines to it) and add a line such as "setenv M2_HOME /usr/bin/maven"