gpt4 book ai didi

java - Maven Central Repository 中是否可能缺少 jar?

转载 作者:搜寻专家 更新时间:2023-11-01 03:09:11 24 4
gpt4 key购买 nike

引用这个post ,

Is it possible that the jar file itself is missing from Maven Central Repository?

检查 this link

你会发现 enter image description here

下载()(0 字节)?

这是什么?

这可能吗?

为什么?

在构建那个 jar/依赖项时会不会有任何问题?

最佳答案

是的,会出现一个问题:构建将失败,因为缺少依赖项。

作为answered by Chandana来自您引用的帖子:

you need to download the JAR file and manually install it in to your local repo.

例如我想 this是有问题的jar,将其下载到某个目录,在同一目录中创建一个文件jsr173.pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>com.bea.xml</groupId>
<artifactId>jsr173-ri</artifactId>
<version>1.0</version>
</project>

然后像这样将它安装到你的本地仓库:

mvn install:install-file -Dfile=jsr173-ri-1.0.jar -DpomFile=jsr173.pom

构建将通过。文件名和pom文件名将由maven根据jsr173.pom文件中的数据重新生成。

Is this possible?

是的,JAR 文件可能从存储库中丢失。这可能是因为它是父 pom,但如果它是引用 JAR 文件的 pom,那么该依赖项实际上变得不可用,这意味着您必须使用上述过程解决它才能使用它。

Why?

License问题,是版权引用实现,见here .看起来这是相对常见的情况,请参阅 this answer .

关于java - Maven Central Repository 中是否可能缺少 jar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14101312/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com