Issue
We have a project set up with maven for resolving dependancies. It usually works fine, but now I am trying to compile and run it on a new PC and I have problem with missing dependencies in Eclipse.
What is funny is that if I run "mvn package" in console or in eclipse, it works fine and even produces war containing all necessary jars. Only Eclipse complains with "The project was not built since its build path is incomplete. Cannot find the class file for org.slf4j.Logger...". If I compare the project with some other computer (where project works fine), I notice that there are quite a few libraries missing under "Maven dependencies" listing in Eclipse. Eventhough they are in the packaged war and they can be found also under repository folder.
So, the jar-s are there just Eclipse won't list them all under "Maven dependencies". What can I do?
Computer is running on Windows 7 with 64bit java & eclipse.
Solution
Problem solved!
I don't know what exactly solved it, but I did 4 things in Eclipse:
- Window->Preferences: Maven->Installations: Global settings -> open file and hardcoded localRepository
- Project->Clean
- right click on project: Maven->Update dependencies
- right click on project: Maven->Update project configuration
I guess it was the Update dependencies since right after first two there were no change.
Answered By - hostnik
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.