Maven Buildtools Import

Discussion in 'Spigot Plugin Development' started by Linda1999, May 17, 2018.

  1. Hi, I started doing basic plugins with maven a few days ago. I recognized that I can't use NMS things (Packets).

    I researched and found out, that I need to install Buildtools somehow.

    I need them for version 1.8 and simply followed this tutorial (did in on desktop in Windows 10):

    After the progress finished, I still could not use this NMS stuff. But I got 3 directories and a lot of files. (CraftBukkit, Bukkit, Spigot)

    Can someone explain me why and what to do?
  2. Build tools will add the nms/cbs to your local maven repo. You have to add this to your pom
  3. So it does not matter where I run this "java -jar BuildTools.jar"???

    And what exactly do I have to add in the pom? I have both, org.bukkit and org.spigot
  4. Nope, it will use the default .m2 directory on Windows or Linux.
    Screenshot from 2018-05-17 15-44-26.png
    #4 EODSteven, May 17, 2018
    Last edited: May 17, 2018
  5. 2008Choco

    Junior Mod

    It's best if BuildTools is run in its own folder, but yes, "java -jar BuildTools.jar" will compile the latest version of Spigot. If you want Minecraft 1.8, specify so using the "-rev" argument, "java -jar BuildTools.jar -rev version". As for what to put in your Maven pom, see the Spigot Maven wiki page
  6. What I do:

    1. Make a new folder for BuildTools
    2. Throw the jar in there
    3. Run the jar
    4. Put the following into my pom file:

    The spigot-api one will work no matter what but now the bukkit one should work aswell.

    When buildtools is run it puts the jars you need into your local maven filesystem so maven will find it and be able to use it. :D
    • Agree Agree x 1
  7. Do I really need both, Spigot AND Bukkit?
  8. Send me your whole pom.xml please, I'll edit it for you.

    Also NMS is not org.bukkit.craftbukkit
    But CraftBukkit also does not work!
  10. Nah, you don't need it.
  11. If you really wanted an easy way to do this all you would need to do is add this to your pom,
    Code (Text):
  12. Yes but he also had to run build tools because that jar isn't on the maven repo.
  13. Odd, because all I did was add that to my pom.xml and it downloaded spigot to my .m2 repository.

    Edit: I just realized it doesn't supply me with the .jar file so you are correct.
    #17 HeyItsSkay, May 18, 2018
    Last edited: May 18, 2018

Share This Page