I’m working on a client project and I ran into an issue when I needed to run a maven task from within IntelliJ. When I would run it, it would return the following error.
Error running Tests: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.
Which… really stinks. After setting my global env variable, playing with as .MacOSX file and then a bunch of other stuff for around 20 minutes … I realized it was a lot easier if I just checked the settings in the Maven settings in IntelliJ. So, thats what I did.
I selected this icon:
Then got this settings panel:
I overrode the maven home page and supplied my own maven home path as follows (see the path set above?):
[javasscript]
/usr/share/maven
[/javascript]
Note, your maven install directory may be different. As soon as I set this, I could run maven from within IntelliJ.
The sad fact of the matter is that I didn’t look here first. The error message supplied by IntelliJ sent me off into a rabbit hole. Thankfully it only cost me 20 minutes.
Manfred Moser says
The better way to have access to M2_HOME on the Mac in command line and launched application is to set it in /etc/launchd.conf. Then you dont have to maintain it in intellij since it will pick it up nicely..
Bhuvaneswari LakshmiNarayanan says
I tried that but some how it still does not seem to recongnise it ๐
server emule says
Can I just say what a relief to find someone who actually knows what theyre talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I cant believe youre not more popular because you definitely have the gift.
very nice post, i certainly love this website, keep on it
outsourcing india drupal says
I would be very thankful if you continue with quality what you are serving right now with your blog…I really enjoyed it…and i really appreciate to you for this….its always pleasure to read so….Thanks for sharing!!!
outsourcing web developers | outsourcing joomla web development
Inder Pall says
thanks this did help me.
– Inder
Register domain India says
Good application. Surely I will try this method in my profile. If any doubt, I will ask to you…
hosting server says
Very informative article you have got here. I love reading this kind of stuff. This is truly a great read for me. I hope to see more articles from you.ย
styple says
Air Jordan 2009
Nike Air Jordan IV Force Fusion Blue White
Nike Air Jordan Retro VII Black Blue
Nike Air Jordan Retro VII Black Blue Brown
Nike Air Jordan Retro VII Black Citrus Varsity Red
Nike Air Jordan Retro VII Black Green Yellow
Nike Air Jordan Retro VII black grey
Nike Air Jordan Retro VII Black Litte White
Nike Air Jordan Retro VII Black Red Green
Nike Air Jordan Retro VII Black Yellow
Nike Air Jordan Retro VII Black Yellow Blue
Nike Air Jordan Retro VII Blue Black
Nike Air Jordan Retro VII Blue White
Nike Air Jordan Retro VII Blue White Litte Yellow
Nike Air Jordan Retro VII Cardinals White Black Cardinal Red Bro
Nike Air Jordan Retro VII Dark Charcoal True Red
Nike Air Jordan Retro VII Hare White True Red White
Nike Air Jordan Retro VII Miro Olympic OC
Nike Air Jordan Retro VII Olympic White Metallic Gold Midnight N