Nexus 镜像(带有 maven)不起作用

Nexus 镜像(带有 maven)不起作用

我使用 Nexus 作为 Maven Central 的镜像,并想添加其他存储库。如果我像这样添加

   <repositories>
        <!-- org.spigotmc.spigot-api -->
        <repository>
            <id>papermc</id>
            <url>https://papermc.io/repo/repository/maven-public/</url>
        </repository>    
        <!-- co.aikar.acf-paper -->
        <repository>
            <id>aikar</id>
            <url>https://repo.aikar.co/content/groups/aikar/</url>
        </repository>
    </repositories>

在我pom.ymlsettings.xml

  <mirrors>
    <mirror>
      <id>dio-maven-registry</id>
      <url>${MAVEN_REPO_URL}</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>

我可以构建我的 Jar。现在我将每个存储库作为 Nexus 代理添加到中央组。我使用相同的 URL 并替换central*。代理设置与中央代理的设置类似,但我无法访问 maven 包:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for io.digon.xpaper:xcore:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. @ line 80, column 17
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[WARNING] The POM for com.destroystokyo.paper:paper-api:jar:1.16.5-R0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for co.aikar:acf-paper:jar:0.5.0-SNAPSHOT is missing, no dependency information available
[ERROR] Failed to execute goal on project XX: Could not resolve dependencies for project XX.XX.XX:XX:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: com.destroystokyo.paper:paper-api:jar:1.16.5-R0.1-SNAPSHOT, co.aikar:acf-paper:jar:0.5.0-SNAPSHOT: Could not find artifact com.destroystokyo.paper:paper-api:jar:1.16.5-R0.1-SNAPSHOT in dio-maven-registry (XXXX) -> [Help 1]

经过几个小时的搜索,有人能给我一点提示吗......你好,Kokos Bot。

相关内容