Aarish Ramesh
Aarish Ramesh

Reputation: 7023

Eclipse maven project not recognising any of the dependencies

I am trying to create maven project by importing as existing maven project from eclipse workspace project but eclipse is not able to resolve any of the dependencies. Everytime I create the project, update maven dependencies or clean project the dependencies get downloaded but they are not getting referenced from the local maven repository. The build is generated when i run mvn clean install from command line

I am exhausted trying out all the fixes for the issue like enabling indexing, cleaning the project, maven -> update project

My eclipse version is

 Eclipse version - Version: 2019-03 (4.11.0)
    Build id: 20190314-1200

Java version - java 11 openjdk

Maven preferences are like below

enter image description here

Also this is my maven setting when I run mvn - X

[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /home/ramesh/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/share/maven/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/ramesh/.m2/toolchains.xml
[DEBUG] Using local repository at /home/ramesh/.m2/repository

Can someone help me understand the issue and fix ?

Upvotes: 0

Views: 1021

Answers (1)

Chirag Shah
Chirag Shah

Reputation: 373

Please check below points to get solution from any.

  1. Check if pom.xml is available in your project which you are importing.
  2. Better to create your project with spring-initializr from https://start.spring.io/ and add all required dependencies.
  3. At last, you can try to remove your .m2 directory available at home dir. and then again start eclipse and import project to re-install all jars.
  4. You should use Maven -> Update and check forced update after import.

Hope you will find solution from any above point.

Upvotes: 1

Related Questions