[Solved] Maven Error on Eclipse/STS : Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4

This maven error generally happen when create maven based web project by using “maven-archtype-webapp” which generally try to import all library automatically.

You will see this complete error message on pom.xml

Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 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.12.4 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled. pom.xml /SpringCoreTuto line 1 Maven Configuration Problem


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <name>SpringTuto Maven Webapp</name>

Solution 1:

You need just to follow those steps:
Step 1: Right Click on your project: Run (As) -> Maven clean
Step 2: Right Click on your project: Run (As) -> Maven install
After which, if the build fails when you do Maven Install, it means there is no web.xml file under WEB-INF or some problem associated with it.

Solution 2:

Right click on project-> Maven->Click checked box ‘Force Update’->Update

2 thoughts on “[Solved] Maven Error on Eclipse/STS : Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4”