0

In Intellij IDEA I created a Maven project and added dependencies to the pom.xml file. However when I run the project using ALT + SHIFT + F10, as with 'plain' projects, I get ClassNotFoundExceptions.

My question is: is that the proper way to run a Maven project, and have all the dependencies been downloaded? Or is there another way?

Qiu
  • 5,461
  • 10
  • 48
  • 56
Aviv Cohn
  • 13,385
  • 22
  • 55
  • 111

2 Answers2

0

Reload all dependencies: CTRL+SHIFT+A and input "reimport" as an action. You will find the "Reimport All Maven Projects" option. Afterwards, rebuild the project.

Sebi
  • 3,733
  • 13
  • 56
  • 99
-1

I am more experienced with setting it up on Eclipse but I believe the Intellij plugin should also offer some option to Update Maven Dependencies, which should download the jars you are missing.

In fact, a quick search I just did directed me at this post Force Intellij IDEA to reread all maven dependencies

Good luck!

Community
  • 1
  • 1
Roy Shahaf
  • 494
  • 5
  • 10