Cannot run maven tasks in Intellij - maven home not valid
intellij-idea, maven, windows
Solution
You have to specify the maven directory where all the executables are. Go to Project -> Settings -> Maven "Maven home directory". For me this is F:\programme\apache-maven-3.0.5. Maven will then download all dep. to the m2 directory.
Problem
I'm running IntelliJ on windows, and am trying to run a task on a maven plugin. Whenever I do so ('Run Maven Build' from the right-click menu), I get an error saying No valid Maven installation found. Either set the home directory, or set the M2_HOME env variable. I already have maven dependencies downloaded into `%userprofile%\.m2`. If I set the home directory to `%userprofile%\.m2`, I get another error: <dir> is not a valid Maven home directory. What is a valid Maven home directory, and how do I get one on windows?