无法将外部 jar 下载到 Artifactory
我正在使用 Jfrog 的 Artifactory,并且已将 repo1.maven.org/maven2 作为远程存储库包含在内,但是当我从 IDE 请求特定工件时,artifactory 不会将其从远程服务器下载到缓存中?知道我在这里缺少什么吗?
编辑:
artifactory.log 显示以下错误消息
2012-01-09 13:08:10,814 [pool-1-thread-15] [INFO ] (o.a.c.h.HttpMethodDirector:445) - Retrying request
2012-01-09 13:08:11,814 [pool-1-thread-15] [WARN ] (o.a.r.RemoteRepoBase:323) - jfrog-libs: Error in getting information for 'opensymphony/quartz/1.6.5/quartz-1.6.5.pom' (Failed retrieving resource from http://repo.jfrog.org/artifactory/libs-release-local/opensymphony/quartz/1.6.5/quartz-1.6.5.pom: Connection refused: connect).
2012-01-09 13:08:13,408 [pool-1-thread-16] [INFO ] (o.a.c.h.HttpMethodDirector:439) - I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
,下面是项目 pom.xml
<distributionManagement>
<repository>
<id>COMPANY_INTERNAL</id>
<name>COMPANY internal repository</name>
<url>http://artifactoryserver:18081/artifactory/company</url>
</repository>
<snapshotRepository>
<id>COMPANY_INTERNAL_SNAPSHOTS</id>
<name>companyinternal snapshot repository</name>
<url>http://artifactoryserver:18081/artifactory/company</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>COMPANY_PUBLIC</id>
<name>COMPANY internal and external repository</name>
<url>http://artifactoryserver:18081/artifactory/repo</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>COMPANY_PLUGINS</id>
<name>Maven Plugin Repository</name>
<url>http://artifactoryserver:18081/artifactory/plugins-releases</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
屏幕截图
的一部分1) 本地存储库 2)远程存储库 3) 虚拟存储库 4) 存储库浏览器
还包括下面的 request.log 内容,
20120110094113|3735|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|311
20120110094114|63|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094114|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/jts-1.12-SNAPSHOT.pom|HTTP/1.1|304|461
20120110094116|2422|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|326
20120110094116|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094116|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/hibernate-spatial-1.0-SNAPSHOT.pom|HTTP/1.1|304|1761
20120110094117|0|REQUEST|SERVER_IP_HIDDEN|admin|GET|/webapp/systemlogs.html|HTTP/1.1|200|0
20120110094118|2406|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-maven/1.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|332
20120110094118|15|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-maven/1.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094119|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-maven/1.0-SNAPSHOT/hibernate-spatial-maven-1.0-SNAPSHOT.pom|HTTP/1.1|304|8144
20120110094121|2281|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|317
20120110094121|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094121|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/companylib_service_hibernate-5.0.0-SNAPSHOT.pom|HTTP/1.1|304|4224
20120110094123|2297|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_domain_parent/5.0.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|313
20120110094123|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_domain_parent/5.0.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094123|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_domain_parent/5.0.0-SNAPSHOT/companylib_domain_parent-5.0.0-SNAPSHOT.pom|HTTP/1.1|304|13997
20120110094126|2406|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|333
20120110094126|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094126|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/hibernate-spatial-oracle-1.0-SNAPSHOT.pom|HTTP/1.1|304|1779
20120110094127|15|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/hibernate-spatial-1.0-SNAPSHOT.jar|HTTP/1.1|304|77589
20120110094127|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/jts-1.12-SNAPSHOT.jar|HTTP/1.1|304|755797
20120110094127|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/companylib_service_hibernate-5.0.0-SNAPSHOT.jar|HTTP/1.1|304|77835
20120110094127|15|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/hibernate-spatial-oracle-1.0-SNAPSHOT.jar|HTTP/1.1|304|62943
20120110094127|15|REQUEST|SERVER_IP_HIDDEN|admin|GET|/webapp/systemlogs.html|HTTP/1.1|200|0
20120110094137|0|REQUEST|SERVER_IP_HIDDEN|admin|GET|/webapp/systemlogs.html|HTTP/1.1|200|0
I am using Jfrog's Artifactory and i have included repo1.maven.org/maven2 as a remote repository but when i request for a particular artifact from my IDE, the artifactory doesnt download it to the cache from the remote server? any idea what i am missing here?
Edit:
the artifactory.log is displaying the below error message
2012-01-09 13:08:10,814 [pool-1-thread-15] [INFO ] (o.a.c.h.HttpMethodDirector:445) - Retrying request
2012-01-09 13:08:11,814 [pool-1-thread-15] [WARN ] (o.a.r.RemoteRepoBase:323) - jfrog-libs: Error in getting information for 'opensymphony/quartz/1.6.5/quartz-1.6.5.pom' (Failed retrieving resource from http://repo.jfrog.org/artifactory/libs-release-local/opensymphony/quartz/1.6.5/quartz-1.6.5.pom: Connection refused: connect).
2012-01-09 13:08:13,408 [pool-1-thread-16] [INFO ] (o.a.c.h.HttpMethodDirector:439) - I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
below is part of the project's pom.xml
<distributionManagement>
<repository>
<id>COMPANY_INTERNAL</id>
<name>COMPANY internal repository</name>
<url>http://artifactoryserver:18081/artifactory/company</url>
</repository>
<snapshotRepository>
<id>COMPANY_INTERNAL_SNAPSHOTS</id>
<name>companyinternal snapshot repository</name>
<url>http://artifactoryserver:18081/artifactory/company</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>COMPANY_PUBLIC</id>
<name>COMPANY internal and external repository</name>
<url>http://artifactoryserver:18081/artifactory/repo</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>COMPANY_PLUGINS</id>
<name>Maven Plugin Repository</name>
<url>http://artifactoryserver:18081/artifactory/plugins-releases</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
Screenshots
1) Local Repository
2)Remote Repository
3) Virtual Repository
4) Repository Browser
Also including the request.log contents below,
20120110094113|3735|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|311
20120110094114|63|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094114|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/jts-1.12-SNAPSHOT.pom|HTTP/1.1|304|461
20120110094116|2422|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|326
20120110094116|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094116|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/hibernate-spatial-1.0-SNAPSHOT.pom|HTTP/1.1|304|1761
20120110094117|0|REQUEST|SERVER_IP_HIDDEN|admin|GET|/webapp/systemlogs.html|HTTP/1.1|200|0
20120110094118|2406|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-maven/1.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|332
20120110094118|15|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-maven/1.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094119|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-maven/1.0-SNAPSHOT/hibernate-spatial-maven-1.0-SNAPSHOT.pom|HTTP/1.1|304|8144
20120110094121|2281|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|317
20120110094121|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094121|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/companylib_service_hibernate-5.0.0-SNAPSHOT.pom|HTTP/1.1|304|4224
20120110094123|2297|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_domain_parent/5.0.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|313
20120110094123|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_domain_parent/5.0.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094123|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_domain_parent/5.0.0-SNAPSHOT/companylib_domain_parent-5.0.0-SNAPSHOT.pom|HTTP/1.1|304|13997
20120110094126|2406|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|200|333
20120110094126|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120110094126|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/hibernate-spatial-oracle-1.0-SNAPSHOT.pom|HTTP/1.1|304|1779
20120110094127|15|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial/1.0-SNAPSHOT/hibernate-spatial-1.0-SNAPSHOT.jar|HTTP/1.1|304|77589
20120110094127|16|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/com/vividsolutions/jts/1.12-SNAPSHOT/jts-1.12-SNAPSHOT.jar|HTTP/1.1|304|755797
20120110094127|0|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/company/companylib_service_hibernate/5.0.0-SNAPSHOT/companylib_service_hibernate-5.0.0-SNAPSHOT.jar|HTTP/1.1|304|77835
20120110094127|15|REQUEST|SERVER_IP_HIDDEN|non_authenticated_user|GET|/repo/org/hibernatespatial/hibernate-spatial-oracle/1.0-SNAPSHOT/hibernate-spatial-oracle-1.0-SNAPSHOT.jar|HTTP/1.1|304|62943
20120110094127|15|REQUEST|SERVER_IP_HIDDEN|admin|GET|/webapp/systemlogs.html|HTTP/1.1|200|0
20120110094137|0|REQUEST|SERVER_IP_HIDDEN|admin|GET|/webapp/systemlogs.html|HTTP/1.1|200|0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在您附加的response.log中看到Artifactory返回一个 所请求的快照工件的 HTTP 304(未修改) 响应状态(条目右侧的第二列)。
这意味着请求的工件已存在于本地计算机的缓存中,并且在 Artifactory 中找不到更新的版本。
无论您使用什么工具,都会请求此工件,并根据本地版本的上次修改时间(即 "最后修改时间" 和 "If-Modified-Since");由于无法找到更新的版本,因此重新下载相同的工件是没有意义的,这就是为什么您在 Artifactory 的缓存存储库中看不到它。
I see in the response.log you've attached that Artifactory returns an HTTP 304 (Not Modified) response status (second column to the right of the entry) for the requested snapshot artifacts.
This means that the requested artifact already exists in your local machine's cache and that no newer version could be found in Artifactory.
Whatever tool you're using requested this artifact with a conditional headers based on the local version's last modified time (namely, "Last-Modified" and "If-Modified-Since"); since no newer version could be found, re-downloading the same artifact is pointless, which is why you don't see it in Artifactory's cache repo.
您公司的网络是否要求您使用代理访问外部互联网?如果是这样,您需要在 Artifactory 的管理/配置/代理屏幕中设置该代理,然后对于 Artifactory 充当代理的每个外部存储库,您需要在存储库的“高级设置”选项卡上指定此代理。
Does your company's network require you use a proxy to access the external internet? If so, you need to set that proxy in Artifactory's Admin/Configuration/Proxies screen, then for each external repo Artifactory is acting as a proxy for, you need to specify this proxy on the repo's "Advanced Settings" tab.
我今天遇到了同样类型的错误,但它仅在 GET 请求上(没有像原始海报那样部署)。
在我的例子中,用户的 ~/.m2/settings.xml 取自一个模板文件,该模板文件具有:
稍后在他们使用凭据复制和修改的 settings.xml 模板中是存储库 url。
这导致了他们可以访问服务器并发出请求,但永远不会尝试进行身份验证的行为。
他们收到身份验证被拒绝的消息,并且“non_authenticated_user”在 request.log 中显示为发出 GET 请求。
一旦我们用服务器的实际 id 替换了伪造/未定义的 ${server-id} ,它就开始工作了。
I had a fun experience with this same type of error today, but it was on a GET request only (no DEPLOY like the original poster).
In my case the user's ~/.m2/settings.xml was taken from a template file that had:
Later in the settings.xml template that they had copied and modified with their credentials was the repository url.
This caused the behavior that they could hit the server and make the request, but it would never try to authenticate.
They got the authentication denied message, and a "non_authenticated_user" showed up as making a GET request in the request.log.
Once we replaced the bogus/undefined ${server-id} with the server's actual id it started working.