Eclipse does not recognize existing resolved Maven dependencies
Solution 1
I removed check from "Do not automatically update dependencies from remote repositories" option and that made the trick.
Solution 2
Eclipse produces quite a lot of problems when it comes to M2. What I do to get rid of this problems is to clean the project(Project > Clean...), use an external maven (Window > Preferences > Installations > ...) for building purposes and from the maven settings of a project I Update Project configuration (Right click on the project > Maven > Update project ...).
Hope this helps.
Solution 3
Eclipse will sometimes need a kick like user503413 says (and a restart), but sometimes it's also right: make sure that in $HOME/.m2/repository/
you indeed have the dependencies you want (that's where maven, and therefore m2eclipse through maven) will put them. If they are there, make sure the pom makes sense. Fix if needed, and... then clean up and restart eclipse just in case ;)
![mico](https://i.stack.imgur.com/bYP6E.jpg?s=256&g=1)
Comments
-
mico about 4 years
I have m2 plugin in Ecplipse 3.8.0 and a project that has maven dependencies inside. Local .m2 folder has the correct version of the dependency, pom.xml looks correctly but Dependencies tab when opening the pom.xml in Eclipse tells "Failed to read artifact descriptor.." error. Also I get missing artifact error on the Problems section on Eclipse.
Where does the m2-plugin or Eclipse read those dependencies, if they show up correctly on pom.xml and the correcponding jar is at .m2 folder?
-
mico over 11 yearsI removed check from "Do not automatically update dependencies from remote repositories" option and that made the trick. Was this the tap you meant?
-
Olimpiu POP over 11 yearsGlad to hear that you found a solution. Not exactly sure I know what tap you refer to, though.
-
mico over 11 yearsThanks @user503413 about pointing me on correct direction when answering about check for settings. My +1 came for that.
-
ishanbakshi about 8 yearsI did all this, didn't work, but then i closed the project(right click on project >> close project) in eclipse and opened it back again and it worked. Seems like an eclipse bug.
-
dustytrash about 3 yearsWhere is that option?
-
mico about 3 years
Window -> Preferences -> Maven -> Do not automatically update dependencies from remote repositories