I have following web project. It's a Spring and Hibernate project and i cloned it. https://github.com/thenewcircle/spring-hibernate-20120924
. But now there's an error in the pom.xml file. It says following message.
Failure to transfer org.apache.maven:maven-plugin-api:pom:2.0.6 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:maven-plugin-api:pom:2.0.6 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled.
There are several ways to fix this:
(1) Remove your local repository
You can just delete your local repository. Go into your
$home/.m2 and manually delete the folder
repository. Just know that doing so will remove all dependencies cached locally, so the next build of all your applications will take a longer time (to download all dependencies again). I put this one first, because I believe it is the most reliable. When all hell breaks loose, delete your repository.
(2) Command line - Build with force update
You may rebuild the project while forcing the update of dependencies. Open a terminal, change to your project's root folder and type:
mvn clean install -U
(3) IDE - Update project with force update dependencies
From your IDE you can update your project's configuration while forcing the update dependencies. In Eclipse/STS, do:
Right click on your project -> Maven -> Update project -> check 'Force update...' -> OK