maven的代理访问

公司设置了代理上网,maven 下载jar包时报:
could not be retrieved from repository:
transferring file:central due to an error: Connection timed out: connect
错误。

解决方案:首先查看IE的代理上网服务器地址。然后修改maven 解压目录的conf下的settings.xml

 <proxy>
      <id>optional</id>    
      <active>true</active>
      <protocol>http</protocol>
      <username></username>
      <password></password>
      <host>172.X.X.X</host>
      <port>80</port>
      <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
    </proxy>


另参考; http://blog.itpub.net/post/9783/69766
再次运行mvn命令吧,将有收获令人振奋的结果.......

猜你喜欢

转载自javatomcat.iteye.com/blog/1216287
今日推荐