maven - 无法解决工件快照中的插口依赖性
问题描述
我想将我的 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>
解决方案
我只是忘了添加一个远程存储库。
推荐阅读
- java - JPA / Hibernate CreationTimestamp 不适用于 PrimaryKeyJoinColumn
- vue.js - 如何将 vue-cli 与同一个项目中现有的不相关 webpack 设置集成?
- node.js - .save() 不会保存模型中的所有内容
- numpy - 使用 numpy.insert 附加 numpy 数组
- ios - 制作椭圆形导航栏
- javascript - 页面加载时自动打开模式
- angular - 在表单组反应形式中插入值
- php - 使用 AJAX 时从页面获取数据消失
- c# - MVC 在两个日期之间从数据库下载数据
- scala - Scala Future 完成后进行清理的最佳实践