亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Artifactory 忽略遠程(maven 中央)庫的版本?

Artifactory 忽略遠程(maven 中央)庫的版本?

慕運維8079593 2023-06-28 15:48:01
我有以下 Artifactory (6.12.1) 設置遠程存儲庫:中央:https: //repo.maven.apache.org/maven2jboss: https: //repository.jboss.org/nexus/content/groups/public/jcenter https://jcenter.bintray.comjvnet-nexus-staging:http://maven.java.net/content/repositories/staging/兔子里程碑:https://dl.bintray.com/rabbitmq/maven-milestonesrepository.spring.milestone:https://repo.spring.io/milestone存儲庫.spring.snapshot:https://repo.spring.io/snapshotsonatype-oss-snapshots:https://oss.sonatype.org/content/repositories/snapshots/虛擬存儲庫libs-release:libs-release-local、central、repository.spring.milestone、jcenter、jboss、rabbit-milestonelibs-snapshot:libs-snapshot-local、repository.spring.snapshot、jvnet-nexus-staging、sonatype-oss-snapshots我正在嘗試在本地構建 spring-boot,并且我已強制系統中的所有遠程存儲庫都通過我們的 Artifactory。所以我添加了.m2/settings.xml以下部分:我已經驗證一切正常,并且我們的項目正確安裝了依賴項。這應該沒問題。現在 spring-boot 項目在 root pom.xml 中有存儲庫定義,但我的設置覆蓋了它,這意味著 maven 正在嘗試從我們的 Artifactory 下載(按預期)。
查看完整描述

2 回答

?
小怪獸愛吃肉

TA貢獻1852條經驗 獲得超1個贊

我能夠找出問題的原因


使用有幫助的?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) .

=> 他們只是發布了一個無效的 POM,這就是 Artifactory 無法下載依賴項的原因


查看完整回答
反對 回復 2023-06-28
?
jeck貓

TA貢獻1909條經驗 獲得超7個贊

我的解決方案是簡單地下載此文件 org/apache/geronimo/specs/specs/1.1/specs-1.1.pom 并編輯它以刪除 '`' 字符,然后只需將其手動上傳到我的artifactory 本地存儲庫



查看完整回答
反對 回復 2023-06-28
  • 2 回答
  • 0 關注
  • 206 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號