无法解决人工快照中的插头依赖性

时间:2019-10-30 21:03:51

标签: maven pom.xml artifactory bukkit

我想将我的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>

1 个答案:

答案 0 :(得分:0)

我只是忘记添加远程存储库。