Maven 无法下载依赖项

Maven fails to download dependencies

[artifact:dependencies] Transferring 20K from abc
[artifact:dependencies] Downloading: javax/xml/bind/jaxb-api-parent/2.3.1/jaxb-api-parent-2.3.1.pom from repository abc at http://example.com:8081/repository/public/
[artifact:dependencies] Transferring 8K from abc
[artifact:dependencies] Downloading: org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-runtime-2.3.1.pom from repository abc at http://example.com:8081/repository/public/
[artifact:dependencies] Transferring 8K from abc
[artifact:dependencies] Downloading: com/sun/xml/bind/mvn/jaxb-runtime-parent/2.3.1/jaxb-runtime-parent-2.3.1.pom from repository abc at http://example.com:8081/repository/public/
[artifact:dependencies] Transferring 3K from abc
[artifact:dependencies] Downloading: com/sun/xml/bind/mvn/jaxb-parent/2.3.1/jaxb-parent-2.3.1.pom from repository abc at http://example.com:8081/repository/public/
[artifact:dependencies] Transferring 40K from abc
[artifact:dependencies] Downloading: com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom from repository releases.java.net at http://maven.java.net/content/repositories/releases/
[artifact:dependencies] Transferring 0K from releases.java.net
[artifact:dependencies] [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '8b9bea8c8373e3f0386e14134443c1873e3cf219'; remote = '<html>
[artifact:dependencies] <head><title>301' - RETRYING
[artifact:dependencies] Downloading: com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom from repository releases.java.net at http://maven.java.net/content/repositories/releases/
[artifact:dependencies] Transferring 0K from releases.java.net
[artifact:dependencies] [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '8b9bea8c8373e3f0386e14134443c1873e3cf219'; remote = '<html>
[artifact:dependencies] <head><title>301' - IGNORING
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
[artifact:dependencies]  Diagnosis:
[artifact:dependencies] 
[artifact:dependencies] Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'org.glassfish.jaxb:jaxb-runtime:jar': Cannot find parent: com.sun.xml.bind:jaxb-bom-ext for project: com.sun.xml.bind.mvn:jaxb-parent:pom:null for project com.sun.xml.bind.mvn:jaxb-parent:pom:null
[artifact:dependencies]   org.glassfish.jaxb:jaxb-runtime:jar:2.3.1
[artifact:dependencies] 
[artifact:dependencies] from the specified remote repositories:
[artifact:dependencies]   central (http://repo1.maven.org/maven2),
[artifact:dependencies]   abc (http://example.com:8081/repository/public/)
[artifact:dependencies] 
[artifact:dependencies] Path to dependency: 
[artifact:dependencies]     1) org.apache.maven:super-pom:pom:2.0
[artifact:dependencies]     2) org.hibernate:hibernate-core:jar:5.3.15.Final
[artifact:dependencies] 
[artifact:dependencies] 
[artifact:dependencies] Not a v4.0.0 POM. for project com.sun.xml.bind:jaxb-bom-ext at c:\gitviews\.m2\repository\com\sun\xml\bind\jaxb-bom-ext.3.1\jaxb-bom-ext-2.3.1.pom
[artifact:dependencies] 
BUILD FAILED

我们正在将 WildFly 升级到版本 19。出现上述我不太理解的错误。 有人可以解释错误吗?我是新来的。

首先要意识到错误是关于

Cannot find parent: com.sun.xml.bind:jaxb-bom-ext for project: com.sun.xml.bind.mvn:jaxb-parent:pom:null

所以我想说,即使我不知道那个 bubblegateway 是什么,这个 POM 也不在您的本地存储库中。要在 Eclipse 中查找您的本地存储库,例如查看 Maven 设置,应该指定一个路径。

在此存储库中,文件夹就像您的错误消息中的名称一样。所以文件夹结构应该是这样的

com/sun/xml/bind/2.3.1

“:”后面是artifactId。这是您的 .pom 或 .jar 文件的重要名称部分。

所以他要找的文件应该是:jaxb-bom-ext.pom

我敢打赌他找不到。你自己看看吧,我可能记错了。

现在获取方式:

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
bubbleGateway (http://example.com:8081/repository/public/)

他正在查看您的预定义存储库,我想您确实在 maven 设置文件中设置了它们,但您也可以在其他地方设置它们。 重点是,调用 http://repo1.maven.org/maven2 wont help anymore because it moved some time ago to the secure site https://repo1.maven.org/maven2 .

在浏览器中查看,第一个会给你一个 501。而后者应该给你一个 运行 存储库,你可以在其中找到你的 pom。

所以基本上你所要做的就是,如果我没记错的话,找到你定义存储库的地方,然后添加 "s" ;)

祝你好运。