[SOLVED] build fail due to 'package net.minecraft.server.v1_15_R1 does not exist'

Discussion in 'Programming' started by RuthlessJailer, Jan 30, 2020.

  1. EDIT:
    Solution: Build BuildTools and it should add a Maven repo to your computer, then add this to pom.xml:
    Code (Text):
    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot</artifactId>
        <version>1.15.2-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    (remove -api from spigot-api)

    I have this project for a few weeks now and yesterday, it spontaneously stopped working. This has happened to me before and making a new project and copying over the classes worked, and I even tried that this time, but to no avail. I have built craftbukkit buildtools, but the same thing happens.


    My IDE shows no errors, except for the build failure (I used a theme plugin for those who wonder =P):
    ide.png

    Here are my libraries:
    info.png
     
    #1 RuthlessJailer, Jan 30, 2020
    Last edited: Feb 2, 2020
  2. Are you building your project with maven or with your IDE integrated builder?
     
  3. Don't just use RMS directly, you might need to have some wrapper to handle reflections... xD
     
  4. I'm pretty sure I'm using Maven. I don't know of any other ways to build it.


    What do you mean by RMS? I'm using public methods, so do I really need it?

    Thanks for your responses!
     
  5. Use reflections can support multiple versions and build without Minecraft dependency directly.
     
    • Agree Agree x 1
  6. Then the problem is that "spigot-1.15.2" is not a part of your maven project. Could you send me your pom.xml?
     
  7. Code (Text):

    <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot-api</artifactId>
                <version>1.15.2-R0.1-SNAPSHOT</version>
                <scope>provided</scope>
    </dependency>
     
    Full POM:
    https://pastebin.com/atBvNAbV


    Thanks, I'll consider that!
     
    #8 RuthlessJailer, Feb 2, 2020
    Last edited: Feb 2, 2020
  8. Change "spigot-api" to "spigot". You will need to run BuildTools for 1.15.2 on your machine before building your plugin!
     
    • Useful Useful x 2
  9. Thank you so much! This resolved my issue!

    EDIT: Do I change the title to SOLVED ... or do I just close the thread and it will automatically?
     
    #10 RuthlessJailer, Feb 2, 2020
    Last edited: Feb 2, 2020
  10. Just add the label SOLVED to the thread ;) and no need to close it, future users may need help with this ^^