Steps to go through fixing Maven dependency in IntelliJ -
- Check the POM - see if the dependency is defined properly
- Go to File --> Project Structure... and see if which Library is throwing up error
- Navigation to the Class file that the Library is pointing to, e.g. (in your Maven dir)
[user_dir]/.m2/repository/[dependency]/[dependency_version]/...
- Delete the Library with error in Project Structure.
- In command prompt, navigate to the directory of the project/Intellij module, run
mvn install
to force download the dependencies
- In IntelliJ, top left hand corner, go to "Packages" view
- Right-click on the module --> Maven --> Reimport
- Go to File --> Project Structure... to see if error persist
No comments:
Post a Comment