maven error not update dependency jar

I am trying to set up a project using Maven (m2eclipse), but I get this error in Eclipse:

A number of times eclipse not update the m2 folder. Because of the cache problem.

First, you have try the below step:

 

This worked for me in Windows as well.

  1. Locate the {user}/.m2/repository (Using Juno /Win7 here)
  2. In the Search field in the upper right of the window, type ".lastupdated". Windows will look through all subfolders for these files in the directory. (I did not look through the cache.)
  3. Remove them by Right-click > Delete (I kept all of the last updated.properties).
  4. Then go back into Eclipse, Right-click on the project and select Maven > Update Project. I selected to "Force Update of Snapshots/Releases". Click Ok and the dependencies finally resolved correctly.

If Solution not getting use the command line & follow the below command for Linux.

find ~/.m2  -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;

For Windows:

cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i

Then right-click on your project in eclipse and choose Maven->" Update Project ...", make sure "Update Dependencies" is checked in the resulting dialog and click OK.

Related Articles

post a comment