18

I'm using IntelliJ with both Maven plugins enabled. Where is maven installed on my computer though, and how do I find out which version IntelliJ uses?

4 Answers 4

14

You can find bundled maven version in Project Settings -> Build execution and deployment -> Build Tools -> Maven, under Maven home directory.

enter image description here

10

Go to File -> Settings and use the search bar to find maven settings.

There you can find the maven version (usually against the field "Maven home directory" ).

6

By default IntelliJ uses the Maven defined by your M2_HOME system variable although you can change this in the preferences.

To find where it is installed run this on the command line:

mvn -version
5
  • 4
    Good to know. However, mvn returns "command not found" (osx). env shows no M2_HOME variable. Locate/find don't find a mvm or maven binary anywhere. Despite this, maven somehow works in IntelliJ.
    – DiePartei
    Sep 17, 2014 at 11:59
  • @DieParti By this you mean that you are running Maven goals like clean and install? The documentation says that you must have Maven installed on your computer.
    – Mardoz
    Sep 17, 2014 at 12:18
  • Admittedly not, atm I'm using it for dependency management, but I suppose it's possible the IntelliJ plugin does this without actually using maven.
    – DiePartei
    Sep 17, 2014 at 12:30
  • Settings > Maven: there you can see the maven home directory, where mvn is installed.
    – Darek Kay
    Sep 17, 2014 at 12:59
  • @DiePartei You're correct. Maven is for building, it doesn't itself make the artifacts visible to your IDE. Once you want to build your project you'll have to install Maven on your machine.
    – Mardoz
    Sep 17, 2014 at 13:37
0

I'm also using IntelliJ with both Maven plugins enabled.

Check which version IntelliJ is currently using:

Open Project Settings and search 'Maven' or Go to Project Settings -> Build, execution, deployment -> Build Tools -> Maven

For Mac Users:

Open Preferences and search 'Maven' or Go to Preferences -> Build, execution, deployment -> Build Tools -> Maven

You can see both the current version that IntelliJ is using and the bundled maven version.

enter image description here

Check where maven is installed:

Use the following command in Terminal:

mvn -v or mvn -version

It shows you the installed version and location like below if mvn is installed, otherwise you'll get command not found error.

Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T20:36:16+05:30)
Maven home: /Users/anbansal/apache-maven-3.6.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.