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,651
  • 10
  • 49
  • 56
Aviv Cohn
  • 15,543
  • 25
  • 68
  • 131

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
  • 4,262
  • 13
  • 60
  • 116
-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