首页 > 解决方案 > 无法解决工件快照中的插口依赖性

问题描述

我想将我的 Maven 项目从 Gitlab 部署到我的 Artifactory 服务器,但它总是说

[main] WARNING org.codehaus.plexus.PlexusContainer - The POM for org.spigotmc:spigot-api:jar:1.14.4-R0.1-SNAPSHOT is missing, no dependency information available
Downloading from artifactory-snapshot: https://maven.***.dev/artifactory/gitlab/org/spigotmc/spigot-api/1.14.4-R0.1-SNAPSHOT/spigot-api-1.14.4-R0.1-SNAPSHOT.jar
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time:  14.005 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2019-10-30T20:53:15Z
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal on project SpigotProject: Could not resolve dependencies for project dev.***:SpigotProject:jar:2.1-BETA: Could not find artifact org.spigotmc:spigot-api:jar:1.14.4-R0.1-SNAPSHOT in artifactory-snapshot

我想我应该将插口“导入”到我的 Artifactory 服务器,但我该怎么做呢?还是我需要更改我的 pom.xml?我有这些存储库

<repositories>
    <repository>
        <id>papermc-repo</id>
        <url>https://papermc.io/repo/repository/maven-public/</url>
    </repository>
    <repository>
        <id>spigot-repo</id>
        <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
</repositories>

而这种依赖

<dependencies>
    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.14.4-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

我尝试将其添加到我的存储库中,但它也不起作用

    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray</name>
        <url>https://maven.***.dev/</url>
    </repository>

我什至删除了分发管理,但仍然没有运气

<distributionManagement>
    <repository>
        <id>central</id>
        <name>60aee0014b49-releases</name>
        <url>http://maven.***.dev/artifactory/gitlab</url>
    </repository>
</distributionManagement>

标签: mavenpom.xmlartifactorybukkit

解决方案


我只是忘了添加一个远程存储库。


推荐阅读