I am trying to set up a project using Maven (m2eclipse), but I get this error in Eclipse:
Description Resource Path Location Type Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from/to central (http://repo1.maven.org/maven2): No response received after 60000 ExampleProject Unknown Maven Problem
Any ideas? It would be helpful if you could show me how to check if everything is configured fine...
Remove all your failed downloads:
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 rightclick on your project in eclipse and choose Maven->"Update Project ...", make sure "Update Dependencies" is checked in the resulting dialog and click OK.
This worked for me in Windows as well.
In Eclipse: Right click the project->Maven->Update Project->Check checkbox "Force Update of Snapshots/Releases". Click OK.
Thanks for the replies, but after some more searching I was able to fix the problem. It turned out that I had to remove one of the "*.lastUpdated" which was preventing one of my plugins (Maven Surefire Plugin) from updating. I did this manually, because a maven clean wasn't doing it apparently.
The problem was that the "*.lastUpdated" file for a plugin was blocking the maven check for updates and not allowing a necessary jar to get downloaded.
Try to execute
mvn -U clean
or Run > Maven Clean and Maven > Update snapshots from project context menu in eclipse
In my case. The issues is same reason. I see the problem is on proxy and firewall.
Here my solution
Fisrt ways:
1. install Proxy for Maven and Eclipse
2. Go to Locate the {user}/.m2/repository and Remove all the *.lastupdated files
3. Go back into Eclipse, Right-click on the project and select Maven > Update Project. > Select "Force Update of Snapshots/Releases".
If the project is still exist error. example: here is my issues after all above step
Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-archiver:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect timed out
I use this solution useful for me:
1. Find repository in https://mvnrepository.com/
2. Copy dependency to my *.poml of project
example
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>2.5</version>
</dependency>
3. Build project. the dependency missing will be downloaded to local repository.
4. Go back into Eclipse, Right-click on the project and select Maven > Update Project. > Select "Force Update of Snapshots/Releases".
=>> Error is resolved
5. I remove dependencies at step 2 after finished and resolved.
Done
This worked for me in Windows:
{user}/.m2/repository
.lastupdated
". Windows will look through all subfolders for these files in the directory. .lastupdated
files. Maven > Update Project
.Force Update of Snapshots/Releases
". If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With