The problem is that, by some miracle, the maven.home variable disappears from the startup line when you do this in IDEA. In the beginning, I added it with my hands to MAVEN_OPTS and everything worked, but after restarting the computer, IDEA started adding it to the startup line again... It feels like this is some kind of bug, but in any case, you've figured out what to do.