gpt4 book ai didi

maven-2 - 无法从 Nexus 获得正确的软件包?错误 "mvn help:effective-settings"

转载 作者:行者123 更新时间:2023-12-02 13:28:06 25 4
gpt4 key购买 nike

我使用nexus开源版本maven 2.2.1

当我输入“mvn help: effective-settings”时,出现以下错误

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: org.apache.maven.plugins:maven-help-plugin

Reason: Error getting POM for 'org.apache.maven.plugins:maven-help-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata.
org.apache.maven.plugins:maven-help-plugin:pom:2.2-SNAPSHOT

from the specified remote repositories:
Nexus (http://192.168.56.191:8081/nexus/content/groups/public)

for project org.apache.maven.plugins:maven-help-plugin

当我检查 ~.m2\repository\org\apache\maven\plugins\maven-help-plugin 下的本地存储库时

它有一个文件 maven-metadata-central.xml

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<versioning>
<latest>2.2-SNAPSHOT</latest>
<release>2.1.1</release>
<versions>
<version>2.0</version>
<version>2.0.1</version>
<version>2.0.2</version>
<version>2.1</version>
<version>2.1.1</version>
<version>2.2-SNAPSHOT</version>
</versions>
<lastUpdated>20100519065440</lastUpdated>
</versioning>
</metadata>

我在目录下找不到任何 jar 文件,nexus 服务器出了什么问题?我无法轻松地从 Nexus 找到支持信息。

任何提示

最佳答案

确实如布莱恩所说。您可能只有镜像存储库,而没有像 nexus 文档所述那样通过设置配置文件来设置这些虚假的中心 URL。如果您在 Debug模式下运行 Maven,您会看到类似“正在跳过禁用的存储库中心”之类的内容。 - 禁用是指适用于特定工件的策略。


因为你想要SNAPSHOT工件,它可能有相关的政策<snapshots> <enabled>true</enabled>和maven中央有<snapshots> <enabled>false</enabled>如果没有 Nexus 文档中的 hack,它就无法工作。


镜像仅替换 URL,它不会更改原始存储库的策略,但为了使存储库管理器正常工作,通常需要重定向发布和快照工件请求

希望它有助于澄清这个问题,很高兴了解它

关于maven-2 - 无法从 Nexus 获得正确的软件包?错误 "mvn help:effective-settings",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2870327/

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