当前位置: 首页 > 知识库问答 >
问题:

Artifactory忽略来自远程(maven central)的库版本?

阎功
2023-03-14

我有以下Artifactory(6.12.1)设置

远程存储库:

  • 中央:https://repo.maven.apache.org/maven2
  • JBoss:https://repository.jboss.org/nexus/content/groups/public/
  • JCenter https://jcenter.bintray.com
  • jvnet-nexus-staging:http://maven.java.net/content/repositories/staging/
  • rabbit-milestone:https://dl.bintray.com/rabbitmq/maven-milestones
  • repository.spring.milestone:https://repo.spring.io/milestone
  • repository.spring.snapshot:https://repo.spring.io/snapshot
  • sonatype-oss-snapshots:https://oss.sonatype.org/content/repositories/snapshots/
    null
<profile>
  <id>artifactory</id>

  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>libs-release</name>
      <url>https://artifactory.secret.com/artifactory/libs-release</url>
    </repository>
    <repository>
      <snapshots />
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
    </repository>

    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>spring-milestone</id>
      <name>libs-release</name>
      <url>https://artifactory.secret.com/artifactory/libs-release</url>
    </repository>
    <repository>
      <snapshots />
      <id>spring-snapshot</id>
      <name>libs-snapshot</name>
      <url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
    </repository>

    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>rabbit-milestone</id>
      <name>libs-release</name>
      <url>https://artifactory.secret.com/artifactory/libs-release</url>
    </repository>
  </repositories>

 <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>libs-release</name>
      <url>https://artifactory.secret.com/artifactory/libs-release</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots />
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
    </pluginRepository>

    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>spring-milestone</id>
      <name>libs-release</name>
      <url>https://artifactory.secret.com/artifactory/libs-release</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots />
      <id>spring-snapshot</id>
      <name>libs-snapshot</name>
      <url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
    </pluginRepository>
  </pluginRepositories>

  <activation>
    <activeByDefault>true</activeByDefault>
  </activation>
</profile>

我已经验证了所有的工作和我们的项目安装依赖正确。这应该都没问题。

现在spring-boot项目在root pom.xml中有了存储库定义,但我的设置覆盖了它,这意味着maven正在尝试从我们的Artifactory下载(按预期)。

但它被这种依赖所困住了

[INFO] -------------< org.springframework.boot:spring-boot-docs >--------------
[INFO] Building Spring Boot Docs 2.2.0.BUILD-SNAPSHOT                   [80/88]
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.pom
Downloaded from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.pom (737 B at 12 kB/s)
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
Downloading from snapshots: https://artifactory.secret.com/artifactory/libs-snapshot/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.pom
Downloaded from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.pom (2.6 kB at 20 kB/s)
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_2.0_spec/1.0-alpha-2/geronimo-jms_2.0_spec-1.0-alpha-2.pom
Downloaded from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_2.0_spec/1.0-alpha-2/geronimo-jms_2.0_spec-1.0-alpha-2.pom (4.3 kB at 73 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Spring Boot Build 2.2.0.BUILD-SNAPSHOT:
[INFO] 
[INFO] Spring Boot Docs ................................... FAILURE [  0.486 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:32 min
[INFO] Finished at: 2019-08-31T17:55:28+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spring-boot-docs: Could not resolve dependencies for project org.springframework.boot:spring-boot-docs:jar:2.2.0.BUILD-SNAPSHOT: Failed to collect dependencies at org.apache.activemq:activemq-jms-pool:jar:5.15.9 -> org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1: Failed to read artifact descriptor for org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1: Could not find artifact org.apache.geronimo.specs:specs:pom:1.1 in central (https://artifactory.secret.com/artifactory/libs-release) -> [Help 1]

我尝试从Artifactory缓存和本地maven缓存中清除整个org.apache.geronimo树,但它仍然只看到1.4版本。

是否有其他缓存我应该尝试刷新?或者是一个Artifactory bug?谢谢

共有1个答案

荣声
2023-03-14

多亏了@drorbereznitsky,我才得以找出问题的原因

使用有帮助的?trace作为

curl -v -u 'user:password' 'https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom?trace'

我获得了以下日志

Request ID: 9f425b1c
Repo Path ID: libs-release:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
Method Name: GET
Time: 2019-09-05T15:41:07.877Z
Steps: 
2019-09-05T15:41:07.877Z Received request
2019-09-05T15:41:07.877Z Executing any BeforeDownloadRequest user plugins that may exist
2019-09-05T15:41:07.877Z Retrieving info from virtual repository 'libs-release' type Maven
2019-09-05T15:41:07.877Z Consulting the virtual repo download strategy
2019-09-05T15:41:07.877Z Trying to retrieve resource info from the local storage
2019-09-05T15:41:07.879Z Unable to find resource in libs-release:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.879Z Intercepting cached virtual resource with 'MavenMetadataInterceptor'
2019-09-05T15:41:07.879Z Intercepting cached virtual resource with 'PomInterceptor'
2019-09-05T15:41:07.879Z Searching for info in aggregated repositories
2019-09-05T15:41:07.879Z Preparing list of aggregated repositories to search in
2019-09-05T15:41:07.879Z Appending the nested virtual repository 'libs-release'
2019-09-05T15:41:07.879Z Appending collective local repositories
2019-09-05T15:41:07.879Z Appending collective local cache repositories
2019-09-05T15:41:07.879Z Appending collective remote repositories
2019-09-05T15:41:07.879Z Appending collective remote repositories
2019-09-05T15:41:07.879Z Appending collective remote repositories
2019-09-05T15:41:07.879Z Appending collective remote repositories
2019-09-05T15:41:07.879Z Appending collective remote repositories
2019-09-05T15:41:07.879Z Intercepting info request with 'MavenMetadataInterceptor'
2019-09-05T15:41:07.879Z Intercepting info request with 'PomInterceptor'
2019-09-05T15:41:07.879Z Processing request as a release resource
2019-09-05T15:41:07.879Z Searching for the resource within libs-release-local
2019-09-05T15:41:07.879Z Unable to find resource in libs-release-local:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.879Z Searching for the resource within central-cache
2019-09-05T15:41:07.880Z Unable to find resource in central-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.880Z Searching for the resource within repository.spring.milestone-cache
2019-09-05T15:41:07.881Z Unable to find resource in repository.spring.milestone-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.881Z Searching for the resource within jcenter-cache
2019-09-05T15:41:07.881Z Unable to find resource in jcenter-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.881Z Searching for the resource within jboss-cache
2019-09-05T15:41:07.882Z Unable to find resource in jboss-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.882Z Searching for the resource within rabbit-milestone-cache
2019-09-05T15:41:07.882Z Unable to find resource in rabbit-milestone-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.882Z Searching for the resource within central
2019-09-05T15:41:07.883Z Unable to find resource in central-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.883Z Executing any AltRemotePath user plugins that may exist
2019-09-05T15:41:07.883Z Appending matrix params to remote request URL
2019-09-05T15:41:07.883Z Using remote request URL - https://repo.maven.apache.org/maven2/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.883Z Executing HEAD request to https://repo.maven.apache.org/maven2/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.906Z Found remote resource with last modified time - Wed Jun 28 09:19:33 UTC 2006
2019-09-05T15:41:07.906Z Found remote resource with ETag - "9bef270e593bf6dcc37a4e3014b5f94a"
2019-09-05T15:41:07.906Z Found remote resource with content length - 13452
2019-09-05T15:41:07.913Z Found remote resource with checksums - [ChecksumInfo{type=SHA-1, original='5274e75bb357203fbc61c529b7bfc174357dbff8', actual='null'}, ChecksumInfo{type=MD5, original='9bef270e593bf6dcc37a4e3014b5f94a', actual='null'}]
2019-09-05T15:41:07.913Z Returning found remote resource info
2019-09-05T15:41:07.913Z Resource was found in central
2019-09-05T15:41:07.913Z Resource is an exact match - returning
2019-09-05T15:41:07.913Z Returning resource as found in the aggregated repositories
2019-09-05T15:41:07.913Z Intercepting found resource with 'MavenMetadataInterceptor'
2019-09-05T15:41:07.913Z Intercepting found resource with 'PomInterceptor'
2019-09-05T15:41:07.913Z The requested resource isn't pre-resolved
2019-09-05T15:41:07.913Z Target repository isn't virtual - verifying that downloading is allowed
2019-09-05T15:41:07.913Z Creating a resource handle from 'central'
2019-09-05T15:41:07.913Z Target repository is configured to retain artifacts locally - resource will be stored and the streamed to the user
2019-09-05T15:41:07.913Z Remote repository is online
2019-09-05T15:41:07.914Z Unable to find resource in central-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.914Z Found expired cached resource but remote is newer = false. Cached resource: 0, Remote resource: 1151486373000
2019-09-05T15:41:07.914Z Force expiration on the cached resource = false
2019-09-05T15:41:07.914Z Resource isn't cached and isn't expired = true
2019-09-05T15:41:07.914Z Asserting valid deployment path
2019-09-05T15:41:07.915Z Creating a resource handle from 'central-cache:org/apache/geronimo/specs/specs/1.1/specs-1.1.pom'
2019-09-05T15:41:07.915Z Unable to find the resource - throwing exception
2019-09-05T15:41:07.916Z Unable to find cached resource stream handle, continuing with actual remote download.
2019-09-05T15:41:07.916Z Found no cached resource - starting download
2019-09-05T15:41:07.916Z Downloading and saving
2019-09-05T15:41:07.916Z Eager source JAR fetching enabled = true
2019-09-05T15:41:07.916Z Eager JAR fetching enabled = false
2019-09-05T15:41:07.916Z Valid Maven artifact info = true
2019-09-05T15:41:07.916Z Artifact has classifier = false
2019-09-05T15:41:07.916Z Eager JAR and source JAR fetching is not attempted
2019-09-05T15:41:07.916Z Remote property synchronization enabled = false
2019-09-05T15:41:07.916Z Received remote checksums headers - [ChecksumInfo{type=SHA-1, original='5274e75bb357203fbc61c529b7bfc174357dbff8', actual='null'}, ChecksumInfo{type=MD5, original='9bef270e593bf6dcc37a4e3014b5f94a', actual='null'}]
2019-09-05T15:41:07.916Z Executing any AltRemoteContent user plugins that may exist
2019-09-05T15:41:07.916Z Received no alternative content handle from a user plugin
2019-09-05T15:41:07.916Z Received no alternative content, received remote checksums headers and searching for existing resources on download is enabled
2019-09-05T15:41:07.916Z Searching for existing resource with SHA-1 '5274e75bb357203fbc61c529b7bfc174357dbff8'
2019-09-05T15:41:07.916Z Received no alternative content or existing resource - downloading resource
2019-09-05T15:41:07.916Z Appending matrix params to remote request URL
2019-09-05T15:41:07.916Z Using remote request URL - https://repo.maven.apache.org/maven2/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.916Z Executing any BeforeRemoteDownload user plugins that may exist
2019-09-05T15:41:07.916Z Executing GET request to https://repo.maven.apache.org/maven2/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
2019-09-05T15:41:07.919Z Downloading content
2019-09-05T15:41:07.919Z Saving resource to central-cache
2019-09-05T15:41:07.975Z Failed to download: Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\n    `\n    <p... @91:7) .
2019-09-05T15:41:07.975Z Executing any AfterRemoteDownload user plugins that may exist
2019-09-05T15:41:07.975Z Executed all AfterRemoteDownload user plugins
2019-09-05T15:41:07.975Z Error occurred while downloading artifact: Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\n    `\n    <p... @91:7) .
2019-09-05T15:41:07.976Z Requested resource is found = false
2019-09-05T15:41:07.976Z Request is HEAD = false
2019-09-05T15:41:07.976Z Request is for a checksum = false
2019-09-05T15:41:07.976Z Target repository is not remote or doesn't store locally = false
2019-09-05T15:41:07.976Z Requested resource was not modified = false
2019-09-05T15:41:07.976Z Responding with unfound resource
2019-09-05T15:41:07.976Z Setting default response status to '404' reason to 'Resource not found'
2019-09-05T15:41:07.976Z Response is an instance of UnfoundRepoResourceReason
2019-09-05T15:41:07.976Z Configured to hide un-authorized resources = false
2019-09-05T15:41:07.976Z Original response status is auth related = false
2019-09-05T15:41:07.976Z Using original response status of '404' and message 'Failed to transform pom file: Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\n    `\n    <p... @91:7) .'
2019-09-05T15:41:07.976Z Sending error with status 404 and message 'Failed to transform pom file: Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\n    `\n    <p... @91:7) .'
2019-09-05T15:41:07.976Z Executing any AfterDownloadErrorAction user plugins that may exist
2019-09-05T15:41:07.976Z Response code wasn't modified by the user plugins
2019-09-05T15:41:07.976Z Sending response with the status '404' and the message 'Failed to transform pom file: Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\n    `\n    <p... @91:7) .'
Error occurred while downloading artifact:
Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom':
expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\n    `\n    <p... @91:7) .
 类似资料:
  • Im使用django通道来实现我的项目中的即时消息应用程序。消息框不占用整个屏幕,所以我尝试使用ajax实现它。Im面临的问题是ajax中的url字段是以http://locahost为前缀的。我不想这样做,因为Im使用ASGI和django通道来实现ws:// 我尝试在url前面加上“/” 我希望url为ws://localhost:8000/messages/ 我现在得到的是 http://l

  • JFrog artifactory看到了远程存储库的树,但没有看到其工件。 选择高级远程存储库设置中的“本地存储工件”设置。

  • Git作为分布式版本库控制系统,每个人都是本地版本库的主人,可以在本地的版本库中随心所欲地创建分支和里程碑。当需要多人协作时,问题就出现了: 如何避免因为用户把所有的本地分支都推送到共享版本库,从而造成共享版本库上分支的混乱? 如何避免不同用户针对不同特性开发创建了相同名字的分支而造成分支名称的冲突? 如何避免用户随意在共享版本库中创建里程碑而导致里程碑名称上的混乱和冲突? 当用户向共享版本库及其

  • logback-test 16:47:03.689[http-bio-8080-exec-5]调试org.jboss.Logging-日志提供程序:org.jboss.Logging.slf4JLoggerProvider logback-test 16:47:04.244[http-bio-8080-exec-5]DEBUG o.h.cfg.annotations.entityBinder lo

  • 我正在为多人游戏实现简单的网络服务器。我只是想搞清楚Netty 我通过telnet测试服务器。我所做的是向所有频道广播信息。工作很顺利。此外,我从地图上删除通道关闭事件,这是罚款。 但问题是,如果其中一个客户端意外断开连接,则在关闭回调之前,MessageRec的回调调用其发送方断开连接的信道。 如何正确忽略来自断开连接的客户端的消息?我在中使用,但用于也不是正确的字符串。在断开连接的通道结束时,

  • 我们最近将一些数据移植到MongoDB,现在正在考虑运行日常备份,最好是从cron作业,并将其中一个备份恢复到辅助mongo数据库。 我们的系统设置如下: 服务器1:开发mongo数据库 服务器2:两个mongo数据库,一个用于暂存数据,一个用于生产 服务器3:是我们运行所有cron作业/批处理脚本的地方 (我尝试了将用户名和密码连接到主机,但没有将用户名和密码连接到主机) 我收到以下信息: Mo