Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update the version of Maven used by IntellijIdea

I try to open the Maven project in IntellijIdea. This project uses spark and scala. When I run:

mvn clean install -DskipTests

then it gives the error:

[ERROR] Failed to execute goal org.scalastyle:scalastyle-maven-plugin:0.7.0:check (default) on project spark-mllib_2.10: Failed during scalastyle execution: You have 50 Scalastyle violation(s)

I think that the problem is in the version of Maven. Indeed in IntellijIdea Settings I have the version Bundled (Maven 3) 3.0.5, while pom.xml defines <maven.version>3.3.3</maven.version> If I run mvn -version in terminal, it points Maven 3.3.3

So, how can I update the version of Maven used by IntellijIdea?

like image 774
Klue Avatar asked Apr 13 '16 15:04

Klue


People also ask

Where is Maven version in IntelliJ?

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" ).

How do I upgrade to Maven latest version?

If you want to upgrade to a newer version of Maven, you need to download it from Maven's site, or use a package manager such as apt , or whatever your distribution uses. If you would like to migrate your projects from Maven 2. x to 3.


1 Answers

  1. Install the new version of maven (If not already installed)
  2. Go to File -> Settings and use the search bar to find maven settings
  3. Edit the Maven home directory setting so it points to the installation folder of the desired version
like image 161
WirelessKiwi Avatar answered Sep 28 '22 11:09

WirelessKiwi