0

Using Intellij 15.0.1 I am trying to build a project using Maven. However, it is not resolving any dependencies. For example using the dependency below in my pom.xml:

<dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-core_2.10</artifactId> <version>1.3.1</version> </dependency> 

I see a message at the bottom of Intellij saying Cannot Resolve Dependency. The folder ~/.m2/repository/org/apache/spark/spark-core_2.10/1.3.1 is still created in my maven repo, but there is no jar there. Just the files_maven.repositories spark-core_2.10-1.3.1.pom spark-core_2.10-1.3.1.pom.sha1.

This behaviour is happening with any new dependency I add to the pom.

1
  • Some good troubleshooting steps here. stackoverflow.com/questions/15727356/… You may also want to post your pom, and a picture of your Intellij maven configuration screen. Also a picture of the project view of your project with the folders expanded. Commented Dec 5, 2015 at 5:37

1 Answer 1

1

Was able to fix the problem. Some of the directories in ~/.m2/repository were owned by root (probably from using sudo at some point). Was also seeing an error along the lines of Can't create directory at location ~/.m2/... when running mvn package from the command line.

sudo chown -R myuser:myuser ~/.m2/repository/ 

After running this, Maven works in Intellij once again.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.