i cloned a maven project from git hub. But in the pom file it shows error.git hub project don't have any errors. Because it is working perfectly in another machine.And i'm not behind any proxy servers. I tried most of the sollutions in the stackoverflow. But i could not overcome from that issue.
ERROR
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.10 from http://
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.plugins:maven-surefire-plugin:pom:2.10 from/to central (http://
repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/
plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom
What i have done so far?
Nothing works for me. Plz help me.....
Go to your local repo (usually it is under .m2), and search for org/apache/maven/plugins/maven-surefire-plugin directory. You will find there a "placeholder" - try to delete this directory and try to re-build.
Then, I suggest to build the project from command-line , and not from any other tool such as eclipse, because all IDEs may faces issues, so first let's make sure the project compiles successfuly from command line, and only then we will try to solve IDEs issues.
In addition, @ben is correct - you can run mvn -U clean install
to force maven to download a fresh copy.
try
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \\; -print -exec rm {} \\;
Try disabling Maven nature and again enable Maven.
Try is this works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.