Wednesday, 14 August 2013

IntelliJ - fix Maven dependency

Steps to go through fixing Maven dependency in IntelliJ -


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


No comments:

Post a Comment