gpt4 book ai didi

java - 屏幕记录器在 Artifact 中找不到 pom.xml

转载 作者:行者123 更新时间:2023-12-02 11:33:12 24 4
gpt4 key购买 nike

我想通过 Maven 使用屏幕录像机。

<dependency>
<groupId>org.monte</groupId>
<artifactId>screen-recorder</artifactId>
<version>0.7.7</version>
</dependency>

我有多个存储库:

<repository>
<id>jenkins-releases</id>
<url>http://repo.jenkins-ci.org/releases/</url>
</repository>
<repository>
<id>sonatype-releases</id>
<url>https://oss.sonatype.org/content/repositories/releases</url>
</repository>
<repository>
<id>maven.oracle.com</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>https://maven.oracle.com</url>
<layout>default</layout>
</repository>

当我有 Maven 设置.xml 时,对我来说没问题,但对其他人来说就不行了。

21:30:45 Downloading: http://repo.jenkins-ci.org/releases/org/monte/screen-recorder/0.7.7/screen-recorder-0.7.7.pom
21:30:46
Downloading: https://oss.sonatype.org/content/repositories/releases/org/monte/screen-recorder/0.7.7/screen-recorder-0.7.7.pom
21:30:46
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/monte/screen-recorder/0.7.7/screen-recorder-0.7.7.pom
21:30:51
Downloading: https://maven.oracle.com/org/monte/screen-recorder/0.7.7/screen-recorder-0.7.7.pom
21:30:54
[INFO] ------------------------------------------------------------------------
16:30:54 [INFO] BUILD FAILURE
16:30:54 [INFO] ------------------------------------------------------------------------
21:30:54 [ERROR] Failed to execute goal on project foo: Could not resolve dependencies for project com.comp:foo:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.github.fii:fuu:jar:1.1.0 -> org.monte:screen-recorder:jar:0.7.7: Failed to read artifact descriptor for org.monte:screen-recorder:jar:0.7.7: Could not transfer artifact org.monte:screen-recorder:pom:0.7.7 from/to maven.oracle.com (https://maven.oracle.com): Not authorized , ReasonPhrase:Authorization Required. -> [Help 1]


http://repo.jenkins-ci.org/releases/org/monte/screen-recorder/0.7.7/screen-recorder-0.7.7.pom do not return a real 404:

{
"errors" : [ {
"status" : 404,
"message" : "File not found."
} ]
}

我的构建崩溃了,因为它尝试访问 Oracle 存储库,但我希望加载 http://repo.jenkins-ci.org/releases/org/monte/screen-recorder/0.7.7/screen-recorder-0.7.7.jar 上的 jar 文件。

我该如何配置?

最佳答案

您的构建崩溃了,因为它正在尝试下载 Artifact 的 pom(元数据文件):

Could not transfer artifact org.monte:screen-recorder:pom:0.7.7

位于存储库中(只有 .jar 文件驻留在其中)。

我建议从 https://github.com/stephenc/monte-screen-recorder 手动下载该 Artifact 。

并将其安装在本地存储库中。

Maven:

<dependency>
<groupId>com.github.stephenc.monte</groupId>
<artifactId>monte-screen-recorder</artifactId>
<version>0.7.7.0</version>
</dependency>

关于java - 屏幕记录器在 Artifact 中找不到 pom.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49135244/

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