IntelliJ says Maven’s M2_HOME system property is not set

And it’s right! To be fair, IntelliJ should really set this kind of thing up for us (given that it’s really not that hard), but I guess we should allow it a quirk every so often.

I’ve found I run into this at random (well, randomly after reinstalling Maven). It’s somewhat frustrating and I end up running to Google each time, so here’s to hoping that next time I just read here.

I run into this on OSX, but the steps should be fairly similar. Bring up your IntelliJ preferences and browse to the Runner section of your Maven preferences.

Maven runner section

Maven runner section

In that section, under VM Options, add

Magic words.

Magic words.

Kick off your build again and, hopefully, all is well now.

Tagged with: ,
Posted in IntelliJ, Java, Javascript, Technology

Leave a Reply