Starting fresh with the new IntelliJ I got this annoying error:

> 
> Error running MYARTIFACTNAME [compile]: JAVA\_HOME environment variable not defined
> 
> 
> 

It was a very nostalgic and a bit painful. After a bit of thinking I remembered what was missing:

My JAVA\_HOME was set as before but somehow maven couldn't find it from within IntelliJ. So the solution was simple, I had to go to `Preferences > ... > Maven > Runner` and just set the JRE value to my current version of Java home that is 1.8.