Maven error: "Cannot resolve com.github.ConnorLinfoot:ActionBarAPI:1.5.4"
Maven error: "Cannot resolve com.github.ConnorLinfoot:ActionBarAPI:1.5.4"
我正在创建一个 minecraft spigot 插件,我必须包含来自 GitHub 的 API。
我使用 jitpack.io 获取从 GitHub 获取存储库所需的代码,但出现错误:"Cannot resolve com.github.ConnorLinfoot:ActionBarAPI:1.5.4".
我的pom.xml代码:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ecohub</groupId>
<artifactId>DeathSwap</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.ConnorLinfoot</groupId>
<artifactId>ActionBarAPI</artifactId>
<version>1.5.4</version>
</dependency>
</dependencies>
</project>
可能是什么导致了这个问题?
似乎依赖项 ActionBarAPI 没有发布,也没有在您放置在 pom.xml 上的 public 存储库中发布任何版本。
使用 jitpack.io, in cases like this, you can place the commit version of the git project that you are looking for. In your case, checking the github page of ActionBarAPI 时,该项目还没有发布。如果您决定在没有任何 public 版本的情况下使用,使用 jitpack,您可以将最后一次提交哈希引用为您的依赖项的版本。换句话说,这应该有效:
<dependency>
<groupId>com.github.ConnorLinfoot</groupId>
<artifactId>ActionBarAPI</artifactId>
<version>5b2d642d3df240cfd2545effcdcacec38405f9cf</version><!-- Replace with the last commit hash that you are looking for -->
</dependency>
我正在创建一个 minecraft spigot 插件,我必须包含来自 GitHub 的 API。
我使用 jitpack.io 获取从 GitHub 获取存储库所需的代码,但出现错误:"Cannot resolve com.github.ConnorLinfoot:ActionBarAPI:1.5.4".
我的pom.xml代码:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ecohub</groupId>
<artifactId>DeathSwap</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.ConnorLinfoot</groupId>
<artifactId>ActionBarAPI</artifactId>
<version>1.5.4</version>
</dependency>
</dependencies>
</project>
可能是什么导致了这个问题?
似乎依赖项 ActionBarAPI 没有发布,也没有在您放置在 pom.xml 上的 public 存储库中发布任何版本。 使用 jitpack.io, in cases like this, you can place the commit version of the git project that you are looking for. In your case, checking the github page of ActionBarAPI 时,该项目还没有发布。如果您决定在没有任何 public 版本的情况下使用,使用 jitpack,您可以将最后一次提交哈希引用为您的依赖项的版本。换句话说,这应该有效:
<dependency>
<groupId>com.github.ConnorLinfoot</groupId>
<artifactId>ActionBarAPI</artifactId>
<version>5b2d642d3df240cfd2545effcdcacec38405f9cf</version><!-- Replace with the last commit hash that you are looking for -->
</dependency>