While creating a Spring application using Spring Initializer, I encountered the following issue during the build
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project Logger:
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test failed:
Plugin org.apache.maven.plugins:maven-surefire-plugin:2.22.2 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.22.2 ->
org.apache.maven.surefire:maven-surefire-common:jar:2.22.2:
Failed to read artifact descriptor for org.apache.maven.surefire:maven-surefire-common:jar:2.22.2:
Could not transfer artifact org.apache.maven.surefire:maven-surefire-common:pom:2.22.2 from/to central (https://repo.maven.apache.org/maven2): connect timed out
To resolve this, I verified the Maven settings located at
C:\Users<user_id>.m2
In the settings.xml file, I configured the proxy settings as follows
myproxy
true
http
your.proxy.server
8080
userid
password
localhost|127.0.0.1
even after configuring the proxy, the project failed to build and the Maven dependencies were not downloaded successfully. Finally, I performed a "Maven > Update Project" action in the IDE, which resolved the issue. After that, the project built successfully and dependencies were installed correctly.
Top comments (0)