I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install
, it gives me exception. I h
I faced the same issue but, in my case, I had only to point my project to a JDK instead of the JRE in the build path then it solved the issue and I was able to import all maven dependencies with no problem!
You need to clear your Maven repository to solve this issue.
I faced a similar issue. Try to follow the below steps: Manually delete the .m2 folder. Refer to the settings.xml file and check if the repository details are proper, like id and url tags. Also make sure you are connected to same network and check if the URL is accessible from browser. And lastly keep maven projects in /home/User/.
refering to Deepak Vishwakarma's answer, I tried with that and was facing same problem with the url-problem. I installed maven-3.6.3
and inside .m2
folder I found a
settings.xml.bak
file and from that copied that mirror link and just changed url what @Deepak did. It worked like charm! Mirror link I got from that .bak file
http://local.maven.repo:9081/nexus/content/groups/public
Then executed :
mvn clean
mvn clean install
Think to change JDK used in your project. For me I changed JDK from 1.6 to 1.8 and I updated maven.
I faced the same Maven connection timeout issue and resolved by disabling/whitelisting the anti-virus & firewall setting.
The issue got resolved immediately:
org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:239)