Maven not Building项目(连接问题)

时间:2012-05-24 23:07:59

标签: java maven

尝试使用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

3 个答案:

答案 0 :(得分:3)

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

HERE是MIRRORS http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories

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

答案 1 :(得分:3)

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

答案 2 :(得分:1)

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

相关问题