maven:传输文件时出错:连接被拒绝:连接

发布于 2025-01-05 10:26:19 字数 3737 浏览 1 评论 0原文

我在网络环境中工作。 我的互联网网络 IP 地址是:

IE->工具->互联网选项->连接->LAN 设置->使用自动配置脚本(已启用): 地址:http://autocache.abc .com/

IE 设置中未指定

端口地址。当我执行 ping autocache.abc.com 时,它给出以下 IP 地址:

settings.xml 文件中的 16.234.18.243 我已启用代理条目为:

<proxy>
         <id>genproxy</id>
         <active>true</active>
         <protocol>http</protocol>
         <host>autocache.abc.com</host>
</proxy>

在 Ie 主机上未指定任何内容,即:IE->工具->连接-> ;如果我运行 mvn install ,LAN 设置 -> 高级 ->http 显示为空,

出现以下错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building home-app
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
Downloading: https://repository.jboss.org/nexus/content/repositories/releases//org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository jboss (https://repository.jboss.org/nexus/content/repositories/releases/): Error transferring file: Connection refused: connect
Downloading: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release): Error transferring file: Connection refused: connect
Downloading: http://repository.springsource.com/maven/bundles/external/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository com.springsource.repository.bundles.external (http://repository.springsource.com/maven/bundles/external): Error transferring file: Connection refused: connect
Downloading: http://repo1.maven.org/maven2/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.springframework:spring-orm:jar:3.0.6.RELEASE

Reason: Cannot find parent: org.springframework:spring-parent for project: org.springframework:spring-orm:jar:3.0.6.RELEASE for project org.springframework:spring-orm:jar:3.0.6.RELEASE


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Wed Feb 15 11:40:32 IST 2012
[INFO] Final Memory: 11M/27M
[INFO] ------------------------------------------------------------------------

如果我在没有网络连接的情况下运行 mvn install即在我的私人互联网连接上,它工作正常,唯一的问题是网络代理。

我强烈认为这是主机问题,如果我将主机指定为 16.234.18.243 而不是 autocache.abc.com,仍然会出现相同的错误。

我尝试创建新的本地存储库(即删除现有目录),但仍然存在同样的问题。

I am working in a network environment.
my network ip address for internet is:

IE->tools->internet options->connections->LAN settings->Use Automatic configuration script(enabled): Address: http://autocache.abc.com/

port address is not specified in IE settings.

when i do ping autocache.abc.com it gives following ip address: 16.234.18.243

in settings.xml file i have enabled entry for proxy as:

<proxy>
         <id>genproxy</id>
         <active>true</active>
         <protocol>http</protocol>
         <host>autocache.abc.com</host>
</proxy>

Nothing is specified at Ie host ie: IE->tools->connection->LAN settings->advanced->http shows empty

if i run mvn install getting following error:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building home-app
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
Downloading: https://repository.jboss.org/nexus/content/repositories/releases//org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository jboss (https://repository.jboss.org/nexus/content/repositories/releases/): Error transferring file: Connection refused: connect
Downloading: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release): Error transferring file: Connection refused: connect
Downloading: http://repository.springsource.com/maven/bundles/external/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository com.springsource.repository.bundles.external (http://repository.springsource.com/maven/bundles/external): Error transferring file: Connection refused: connect
Downloading: http://repo1.maven.org/maven2/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.springframework:spring-orm:jar:3.0.6.RELEASE

Reason: Cannot find parent: org.springframework:spring-parent for project: org.springframework:spring-orm:jar:3.0.6.RELEASE for project org.springframework:spring-orm:jar:3.0.6.RELEASE


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Wed Feb 15 11:40:32 IST 2012
[INFO] Final Memory: 11M/27M
[INFO] ------------------------------------------------------------------------

If I run mvn install without network connection ie at my private internet connection, it is working fine and only problem is with network proxy.

I strongly feel it is host issue, if I give host as 16.234.18.243 instead of autocache.abc.com, still gives same error.

I tried to create new local repository( ie deleted existing directory), but still same issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浮世清欢 2025-01-12 10:26:19

1>打开IE(或任何浏览器),

2>将 url 指定为 http://autocache.abc.com/ (您有上面给出)并回车,会下载一个.pac格式的文件,保存到桌面

3>在文本板中打开 .pac 文件,识别 PROXY:

在您的编辑器中,它将类似于:

   return "PROXY web-proxy.ind.abc.com:8080; PROXY proxy.sgp.abc.com:8080"; 

4>转到 Maven settings.xml 并输入为:

<proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>          
      <host>web-proxy.ind.abc.com</host>
      <port>8080</port>          
</proxy>

5>通过命令提示符运行 mvn:install 或通过 eclipse 运行。

通过 maven-in-5-min-not-working

1> open IE(or any browser),

2> give url as http://autocache.abc.com/ ( you have given above) and enter, a file will be downloaded with .pac format, save to desktop

3> open .pac file in textpad, identify PROXY:

In your editor, it will come something like:

   return "PROXY web-proxy.ind.abc.com:8080; PROXY proxy.sgp.abc.com:8080"; 

4> go to Maven settings.xml and enter as:

<proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>          
      <host>web-proxy.ind.abc.com</host>
      <port>8080</port>          
</proxy>

5> run mvn:install through command prompt or run through eclipse.

go through maven-in-5-min-not-working

风吹短裙飘 2025-01-12 10:26:19

您指定的网址很可能包含代理自动配置 文件。您需要下载它并查看其中指定的代理设置是什么。

例如,文件内容

   function FindProxyForURL(url, host)
   {
      return "PROXY proxy.example.com:8080; DIRECT";
   }

指示您应该在端口 8080 上使用代理服务器 proxy.example.com

有关更详细的示例,请参阅 如何在自动配置的代理后面配置 Maven

The URL you specified most likely contains a Proxy auto-config file . You need to download it and see what the proxy settings specified in it are.

For instance, the file contents

   function FindProxyForURL(url, host)
   {
      return "PROXY proxy.example.com:8080; DIRECT";
   }

indicates that you should use the proxy server proxy.example.com on port 8080.

For a more elaborate example, see How to configure Maven behind an auto configured proxy .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文