溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

maven下載依賴失敗問(wèn)題如何解決

發(fā)布時(shí)間:2023-04-15 14:45:21 來(lái)源:億速云 閱讀:100 作者:iii 欄目:開(kāi)發(fā)技術(shù)

這篇“maven下載依賴失敗問(wèn)題如何解決”文章的知識(shí)點(diǎn)大部分人都不太理解,所以小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細(xì),步驟清晰,具有一定的借鑒價(jià)值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來(lái)看看這篇“maven下載依賴失敗問(wèn)題如何解決”文章吧。

    1. 問(wèn)題1

    描述

    This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyunmaven has elapsed or updates are forced

    詳細(xì)

    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Detecting the operating system and CPU architecture
    [INFO] ------------------------------------------------------------------------
    [INFO] os.detected.name: windows
    [INFO] os.detected.arch: x86_64
    [INFO] os.detected.classifier: windows-x86_64
    [INFO]
    [INFO] -------< org.apache.pulsar:kafka-connect-avro-converter-shaded >--------
    [INFO] Building Apache Pulsar :: Kafka Connect Avro Converter shaded 2.8.0
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  1.415 s
    [INFO] Finished at: 2021-10-21T09:22:45+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project kafka-connect-avro-converter-shaded: Could not resolve dependencies for project org.apache.pulsar:kafka-connect-avro-converter-shaded:jar:2.8.0: Failed to collect dependencies at io.confluent:kafka-connect-avro-converter:jar:5.3.2: Failed to read artifact descriptor for io.confluent:kafka-connect-avro-converter:jar:5.3.2: io.confluent:kafka-schema-registry-parent:pom:5.3.2 was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyunmaven has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    2. 問(wèn)題2

    描述

    Could not find artifact io.confluent:kafka-connect-avro-converter:jar:5.3.2 in aliyunmaven
    The POM for io.confluent:kafka-connect-avro-converter:jar:5.3.2 is missing, no dependency information available

    詳細(xì)

    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Detecting the operating system and CPU architecture
    [INFO] ------------------------------------------------------------------------
    [INFO] os.detected.name: windows
    [INFO] os.detected.arch: x86_64
    [INFO] os.detected.classifier: windows-x86_64
    [INFO]
    [INFO] -------< org.apache.pulsar:kafka-connect-avro-converter-shaded >--------
    [INFO] Building Apache Pulsar :: Kafka Connect Avro Converter shaded 2.8.0
    [INFO] --------------------------------[ jar ]---------------------------------
    [WARNING] The POM for io.confluent:kafka-connect-avro-converter:jar:5.3.2 is missing, no dependency information available
    Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/io/confluent/kafka-connect-avro-converter/5.3.2/kafka-connect-avro-converter-5.3.2.jar
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  2.427 s
    [INFO] Finished at: 2021-10-21T10:39:36+08:00
    [INFO] ------------------------------------------------------------------------
    [WARNING] The requested profile "confluent" could not be activated because it does not exist.
    [ERROR] Failed to execute goal on project kafka-connect-avro-converter-shaded: Could not resolve dependencies for project org.apache.pulsar:kafka-connect-avro-converter-shaded:jar:2.8.0: Could not find artifact io.confluent:kafka-connect-avro-converter:jar:5.3.2 in aliyunmaven (https://maven.aliyun.com/repository/public) -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    3. 原因分析

    雖然阿里云不存在這個(gè)jar包,但我們手動(dòng)放到了maven的本地庫(kù)中,重新打包后還是提示抄不到pom文件。

    如下:

    maven下載依賴失敗問(wèn)題如何解決

    猜測(cè)可能是lastUpdate的問(wèn)題,但是刪除后仍然不能成功。

    經(jīng)過(guò)各種嘗試,下面方法可行。

    4. 解決辦法

    刪除_remote.repositories和pom文件。

    4.1 原始狀態(tài)

    目錄文件:

    maven下載依賴失敗問(wèn)題如何解決

    錯(cuò)誤日志:

    [WARNING] The requested profile "confluent" could not be activated because it does not exist.
    [ERROR] Failed to execute goal on project kafka-connect-avro-converter-shaded: Could not resolve dependencies for project org.apache.pulsar:kafka-connect-avro-converter-shaded:jar:2.8.0: io.confluent:kafka-connect-avro-converter:jar:5.3.2 was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyunmaven has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    4.2 刪除_remote.repositories

    目錄結(jié)構(gòu):

    maven下載依賴失敗問(wèn)題如何解決

    錯(cuò)誤日志:

    [WARNING] The requested profile "confluent" could not be activated because it does not exist.
    [ERROR] Failed to execute goal on project kafka-connect-avro-converter-shaded: Could not resolve dependencies for project org.apache.pulsar:kafka-connect-avro-converter-shaded:jar:2.8.0: Failed to collect dependencies at io.confluent:kafka-connect-avro-converter:jar:5.3.2: Failed to read artifact descriptor for io.confluent:kafka-connect-avro-converter:jar:5.3.2: io.confluent:kafka-schema-registry-parent:pom:5.3.2 was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyunmaven has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    4.3 刪除pom文件

    目錄結(jié)構(gòu):

    maven下載依賴失敗問(wèn)題如何解決

    錯(cuò)誤日志:

    [INFO] Replacing original artifact with shaded artifact.
    [INFO] Replacing F:\code\tmp\pulsar\kafka-connect-avro-converter-shaded\target\kafka-connect-avro-converter-shaded.jar with F:\code\tmp\pulsar\kafka-connect-avro-converter-shaded\target\kafka-connect-avro-converter-shaded-2.8.0-shaded.jar
    [INFO] Dependency-reduced POM written at: F:\code\tmp\pulsar\kafka-connect-avro-converter-shaded\dependency-reduced-pom.xml
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  12.882 s
    [INFO] Finished at: 2021-10-21T16:21:55+08:00
    [INFO] ------------------------------------------------------------------------
    [WARNING] The requested profile "confluent" could not be activated because it does not exist.

    以上就是關(guān)于“maven下載依賴失敗問(wèn)題如何解決”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望小編分享的內(nèi)容對(duì)大家有幫助,若想了解更多相關(guān)的知識(shí)內(nèi)容,請(qǐng)關(guān)注億速云行業(yè)資訊頻道。

    向AI問(wèn)一下細(xì)節(jié)

    免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

    AI