Solved Failure to find org.bukkit:craftbukkit:jar:1.11.2-R0.1-SNAPSHOT

Discussion in 'Spigot Plugin Development' started by KleinDev, Jun 2, 2017.

  1. Hey There,
    I have an Problem with my IDE (intelliJ IDEA)
    I couldn't use the craftbukkit Maven Repository
    Here the pom.xml File
    Code (Text):
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns=""



            <!--Spigot API-->
            <!--Bukkit API-->
            <!--Vault API-->


    Here the Error
    [WARNING] The POM for org.bukkit:craftbukkit:jar:1.11.2-R0.1-SNAPSHOT is missing, no dependency information available

    [ERROR] Failed to execute goal on project Minecron-Utils: Could not resolve dependencies for project de.minecron:Minecron-Utils:jar:1.31: Failure to find org.bukkit:craftbukkit:jar:1.11.2-R0.1-SNAPSHOT in was cached in the local repository, resolution will not be reattempted until the update interval of spigot-repo has elapsed or updates are forced -> [Help 1]
  2. remove the word craft, its just org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT
  3. The craftbukkit jar is not hosted on the repo because it would technically infringe on Mojangs copyright. You have to run BuildTools.jar on your computer, when you do so it will add it to the local repo so you can compile with it.
    #3 oskar3123, Jun 2, 2017
    Last edited: Jun 2, 2017
  4. One Problem, I want to use NMS and CraftPlayer
    But "spigot-api" and "bukkit" doesn't contains this..

    Can you tell me how?
    I had run the BuildTools, but how is the craftbukkit dependency in my Project?
    How can I use it?
  5. When you run buildtools, a file should pop up in %me%\.m2\repository\org\bukkit\bukkit\1.11.2-R0.1-SNAPSHOT
    I have made a user variable called %me% so i save some time. %me%\ is the user home directory
  6. Thank You, I have found the Folder

    And now, I want to intergrate it in my Project..
    I see in the Modules, the craftbukkit.jar is added but not available.
    in the Folder (/home/%me%/.m2/repository/org/bukkit/craftbukkit/1.11.2-R0.1-SNAPSHOT/) are only 3 Files:
    - craftbukkit-1.11.2-R0.1-SNAPSHOT.jar.lastUpdated
    - craftbukkit-1.11.2-R0.1-SNAPSHOT.pom.lastUpdated

    But IntelliJ IDEA wants:
    - craftbukkit-1.11.2-R.01-SNAPSHOT.jar
    - craftbukkit-1.11.2-R.01-SNAPSHOT-sources.jar
    - craftbukkit-1.11.2-R.01-SNAPSHOT-javadoc.jar
  7. FYI %USER% is a built in variable that goes to that IIRC...
  8. It is easy for me to go to user home. I made it last year and it has paid off (especially with most of my workspaces for eclipse in there)
    ME helps.PNG
  9. IDK too large 4 me to remember. I had to get that website when I made this RSA encryption project that saved RSA keys in AES/ECM/NoPadding or whatever shit it's put in
  10. Is there any way to add the BuildTools manually in the Project?
    Adding an Repository with an URL to the Folder?
  11. I can add an external jar to my project
    And now, I can import the classes for NMS
    But one Problem, the compiler doesn't use the external jar, So it gives me an error:
    Today i tried it with the spigot-1.11.2-R.01-SNAPSHOT.jar, because it cointains the "recentTps" Method
    Code (Text):
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Minecron-Utils: Compilation failure: Compilation failure:
    [ERROR] /home/XXXX/Dokumente/Development/Workspace/Minecron Utils/src/main/java/de/minecron/Utils/Events/[3,37] package net.minecraft.server.v1_10_R1 does not exist
    [ERROR] /home/XXXX/Dokumente/Development/Workspace/Minecron Utils/src/main/java/de/minecron/Utils/Functions/TabList/extras/[7,37] package net.minecraft.server.v1_10_R1 does not exist
    [ERROR] /home/XXXX/Dokumente/Development/Workspace/Minecron Utils/src/main/java/de/minecron/Utils/Functions/TabList/extras/[9,46] package org.bukkit.craftbukkit.v1_10_R1.entity does not exist
    [ERROR] /home/XXXX/Dokumente/Development/Workspace/Minecron Utils/src/main/java/de/minecron/Utils/Functions/TabList/extras/[28,28] cannot find symbol
    [ERROR] symbol:   variable MinecraftServer
    [ERROR] location: class de.minecron.Utils.Functions.TabList.extras.HEADERandFOOTER
    [ERROR] /home/XXXX/Dokumente/Development/Workspace/Minecron Utils/src/main/java/de/minecron/Utils/Functions/TabList/extras/[32,30] cannot find symbol
    [ERROR] symbol:   class CraftPlayer
    [ERROR] location: class de.minecron.Utils.Functions.TabList.extras.HEADERandFOOTER
    [ERROR] -> [Help 1]
  12. I solved the Problem, here the Solution

    Here is the Repository, change the "[Path to Directory]" to your Directory with the jar files
    Code (Text):
                <url>file://[Path to Directory]</url>
    Then add these dependency (here I used spigot)

    Code (Text):
    Here the Directory-Tree
    [1] --- org
    [2] --- --- spigotmc
    [3] --- --- --- spigot
    [4] --- --- --- --- 1.10.2
    [5] --- --- --- --- --- spigot-1.10.2.jar
    because the groupId in the dependency is org.spigotmc
    So it switch to the following directories "org" and than "spigotmc"
    Your artifactId is spigot, so it switch from the directory "spigotmc" in "spigot"
    your version is 1.10.2, it switch from "spigot" to "1.10.2"
    It search for a jar file with the Name "spigot-1.10.2.jar" because the ArtifactId is "spigot" and the version ist "1.10.2"

    ~ Sorry 4 my bad Englisch, im a german human with non-perfect Englisch