码迷,mamicode.com
首页 > 其他好文 > 详细

Maven错误recv failed

时间:2014-11-11 20:53:49      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   ar   os   java   sp   

问题:

    从SVN上检出了一个Maven项目,在执行clean命令时,出现如下错误:
java.net.SocketException:Software caused connection abort: recv failed

分析:

    从日志中发现,Maven是在一个国外网站下载东西,我意识到这是遇到了传说中的Creat Firewall。

解决方案:

    通过Maven的设置代理来访问国外技术网站。Windows系统中,Eclipse中方式如下:
bubuko.com,布布扣
当前用户目录\.m2,下找到或新建setting.xml,主要是proxy标签。
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository />
    <interactiveMode />
    <usePluginRegistry />
    <offline />
    <pluginGroups />
    <servers />
    <mirrors />
    <proxies>
        <proxy>
            <id>optional</id>
            <active>true</active>
            <protocol>http</protocol>
            <username></username>
            <password></password>
            <host>127.0.0.1</host>
            <port>8087</port>
            <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
        </proxy>
    </proxies>
    <profiles />
    <activeProfiles />
</settings>  




Maven错误recv failed

标签:style   blog   http   io   color   ar   os   java   sp   

原文地址:http://www.cnblogs.com/feiqihang/p/4090193.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!