2

尝试使用 Maven 进行全新安装时出现此错误:

[INFO] Scanning for projects...
Downloading: http://xxx/repository/com/fusionone/device/d
evice-parent/3.5.0-BA-CLIENT-SNAPSHOT/maven-metadata.xml
Downloading: http://xxx/repository/com/fusionone/device/device-pare
nt/3.5.0-BA-CLIENT-SNAPSHOT/maven-metadata.xml
Downloading: http://xxx/repository/com/fusionone/devic
e/device-parent/3.5.0-BA-CLIENT-SNAPSHOT/maven-metadata.xml
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the tar
get host: Permission denied: connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
May 24, 2012 5:55:56 PM org.apache.maven.wagon.providers.http.httpclient.impl.cl
ient.DefaultRequestDirector tryConnect
INFO: Retrying connect
[WARNING] Could not transfer metadata com.xxx.device:device-parent:3.5.0-B
A-CLIENT-SNAPSHOT/maven-metadata.xml from/to maestro-project-server (http://xxx): Permission denied: connect
[WARNING] Could not transfer metadata com.xxx.device:device-parent:3.5.0-B
A-CLIENT-SNAPSHOT/maven-metadata.xml from/to xxx-xxx-repo (http://xxx): Permission denied: connect
[WARNING] Could not transfer metadata com.xxx.device:device-parent:3.5.0-B
A-CLIENT-SNAPSHOT/maven-metadata.xml from/to re-repo (http://xx.xx.x.xxx:xxx/re
pository): Permission denied: connect
4

3 回答 3

3

我对 Maven 也有同样的问题。我通过向 maven setting.xml 文件添加镜像来解决这个问题

这里是镜像http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories

和文档http://maven.apache.org/settings.html#Mirrors

于 2012-11-04T21:29:15.473 回答
3

当 Maven 获取依赖项和父项目时,它会抛出一个Permission denied: connect错误。
我发现该问题可能与 JDK 1.7 和 Windows 7 中的一个已知错误有关。该问题可能与不完全支持 IPv6 的应用程序有关,或者与不完全支持 IPv6 的网络/防火墙有关。解决方法是-Djava.net.preferIPv4Stack=true在 Java 或 Maven 命令行参数中进行设置。

于 2015-09-15T14:14:09.007 回答
1

这很明显:“权限被拒绝”。而已。您正在使用的存储库(其中之一)需要您在访问之前进行身份验证和授权。如果您真的无权访问或将您的登录名/密码例如放入您的settings.xml文件中,您应该停止使用此存储库,这样Maven 可以将您介绍给服务器:)。

于 2012-05-25T07:25:12.337 回答