Maven- Not Downloading New Added Dependency in Pom.Xml File

maven- not downloading new added dependency in pom.xml file

I resolved this issue by following steps:

1). Remove concerned jar from local /m2 folder.
2). Run mvn eclipse:eclipse command
3). And last run: mvn clean install

Now I am looking for concerned jar in my project class path!

Maven not downloading dependencies in Eclipse

Solution 1:

Set correct proxy:

<proxy>
<id>optional</id>
<active>false</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>172.27.171.91</host>
<port>8080</port>
</proxy>

Solution2 :

just delete

lastupdated extension files from folder

and try updating maven.

[Most of the times this solution will work]

Maven not downloading dependencies

You cannot just run a jar on the command line without a proper classpath. Maven downloads the artifacts to .m2/repository in your home directory and uses them for the build, but it does not copy them to target or add them to the produced jar.

Most jars are used as libraries and for them, the behaviour is just fine. If you want to run a jar from the command line, it is better to create a jar with dependencies:

How can I create an executable JAR with dependencies using Maven?

Missing Maven dependencies in Eclipse project

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.



Related Topics



Leave a reply



Submit