无法从Nexus获得正确的包裹? “ MVN帮助:有效分配”中的错误

StackOverflow https://stackoverflow.com/questions/2870327

  •  03-10-2019
  •  | 
  •  

我使用Nexus OpenSource版本Maven 2.2.1

当我键入“ MVN帮助:有效插图”时,我在下面收到错误

[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 Server怎么了?我无法轻易找到Nexus的支持信息。

任何提示

有帮助吗?

解决方案

肯定是布莱恩所说的。您可能只有镜像存储库,而无需进行黑客设置配置文件,就像Nexus Documentation所说的那些Bogus Central URL所说。如果您在调试模式下运行Maven,您会看到“跳过残疾存储库中心”之类的东西。 - 残疾人指的是适用于特定工件的政策。


因为您想要可能具有相关政策的快照伪像 <snapshots> <enabled>true</enabled> Maven Central有 <snapshots> <enabled>false</enabled> 没有Nexus文档中的黑客攻击,它行不通。


镜像仅替换URL,它不会更改原始存储库的政策,但是对于回购经理来说,通常要重定向发行和快照伪影请求

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

其他提示

看来您可能会设置设置。xml配置错误。尝试设置喜欢 , ,如果您仍然有麻烦,请问我们 Nexus-user 列表,我们将从那里走。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top