2016-09-01 169 views
-1

我正在尝试构建Spigot 1.8.8插件(在IntelliJ,mavenized项目上)。一段时间以来,我一直在收到像下面那样的错误。我让我的插件开始工作的唯一方法是在我删除并重建我的项目几次之后。Spigot 1.8.8 Maven构建失败

我不确定实际上修复了什么,但修复后我开始使用插件。我在pom.xml中有一个还没有使用过的回购库,所以我在插件中添加了一个类,并最终使用了我必须从以前未使用的回购库中导入的内容。

现在,当我尝试建立我的插件,我总是得到这样的:

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 11.614 s 
[INFO] Finished at: 2016-09-01T16:26:37-05:00 
[INFO] Final Memory: 9M/200M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project PInfo: Could not resolve dependencies for project photon.PInfo:PInfo:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org:spigotmc.api:jar:1.8.8, org:spigotmc:jar:1.8.8: Could not find artifact org:spigotmc.api:jar:1.8.8 in spigot-repo (https://hub.spigotmc.org/nexus/content/groups/public/) -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

任何帮助将不胜感激。谢谢。

Current pom.xml

Build failing with full stack traces on

+0

我投票结束这个问题,因为它是由**造成的,无法复制的问题**和**以不太可能帮助未来读者的方式解决**。这通常可以通过在发布之前识别并密切检查[重现问题所需的最短程序](http://stackoverflow.com/help/mcve)来避免。 – Unihedron

+0

好的,删除。 –

回答

0

的错误中提到确切的问题

以下工件无法解析: 组织:spigotmc.api:罐子:1.8.8,ORG:spigotmc: jar:1.8.8:找不到 工件组织:spigotmc.api:jar:1.8.8 in spigot-repo (https://hub.spigotmc.org/nexus/content/groups/public/

尝试使用不同版本的承插式API的依赖,可能是

<dependency> 
     <groupId>org.spigotmc</groupId> 
     <artifactId>spigot-api</artifactId> 
     <version>1.8.8-R0.1-SNAPSHOT</version> <!-- or the latest one--> 
    </dependency> 
+0

它也不适用于其他版本。它也存在:https://hub.spigotmc.org/nexus/content/groups/public/org/spigotmc/spigot-api/ –

1

的问题是,我是用实际的图书馆有一个坏的POM。它看起来像我的不好。对于其他人来说:确保你的是正确的,然后检查你的依赖关系。