Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven All-of-a-sudden Receiving Permission Denied

Tags:

maven

I have been using Maven for several months to build using Artifactory for the project's dependencies. I checked out all of the latest code from our VCS this morning (GIT) and went to compile, but Maven cannot connect. I can reach the location by telnet and through a web browser. But nothing I try helps.

Additionally, I have the jars that Maven is trying to download in my local .m2 repository, but the project in Intellij (Maven Plugin) tells me that it can't resolve the dependencies.

Any advice, thoughts, etc. would be greatly appreciated.

Downloading: http://salgs2cm01:8081/artifactory/libs-release/com/isomorphic/smartgwt-power/3.0.p20120509/smartgwt-power-3.0.p20120509.pom
May 10, 2012 9:21:44 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
May 10, 2012 9:21:44 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 10, 2012 9:21:44 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
May 10, 2012 9:21:44 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
like image 247
binarygiant Avatar asked May 10 '12 16:05

binarygiant


1 Answers

It turns out that in my case it was an IPV6 issue. On my Windows 7 environment I had to add an environment variable for MAVEN_OPTS with a value of -Djava.net.preferIPv4Stack=true (you have to restart your command line).

I hope this helps!

like image 78
binarygiant Avatar answered Nov 16 '22 12:11

binarygiant