Current WinHTTP proxy settings: Direct access (no proxy server) in windows machine. And in settings.xml as . But, jars are not getting downloaded and getting below error.
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor fo
r org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: con nect -> [Help 1]
If you run Maven and it fails to download your required dependencies it's likely to be caused by your local firewall & HTTP proxy configurations. See the Maven documentation for details of how to configure the HTTP proxy.
Force maven to fetch dependencies from the remote repository while building the project. We can use -U/–update-snapshots flag when building a maven project to force maven to download dependencies from the remote repository.
As per maven documentation we have to add some settings.xml
with setting in it mentioned here Guide to proxies .
<settings>
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.example.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
.
.
</settings>
Another way to do download dependencies quickly is as follows
mvn clean install -DproxySet=true -DproxyHost=myproxy.com -DproxyPort=YourPort
the second one works fine for me. Hope atleast one of above solution will work for you hoping your network doesn't have any blocked servers from maven repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With