Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Spigot instead of downloading it from getbukkit (since it does not work anymore) #3131

Open
DrumSlayers opened this issue Nov 1, 2024 · 4 comments

Comments

@DrumSlayers
Copy link

DrumSlayers commented Nov 1, 2024

Enhancement Type

Improve an existing feature

Describe the enhancement

EDIT : The feature already exists, mentioned here. I have edited the request considering it.

Hello,

Since download.getbukkit.org is broken for something like 10+ days (522 error), and does not offer the latest Spigot builds, maybe should you consider enabling the build from source parameter by default.

image

Actually, the docker image try to pull from getbukkit.org, but it does not work anymore.

minecraft-server-1  | [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 17 1000 1000 4096 Nov  1 12:45 /data'
minecraft-server-1  | [init] Resolving type given SPIGOT
minecraft-server-1  | [init] Downloading Spigot from https://download.getbukkit.org/spigot/spigot-1.21.jar ...
minecraft-server-1  | curl: (22) The requested URL returned error: 522
minecraft-server-1  |
minecraft-server-1  | ERROR: failed to download from https://download.getbukkit.org/spigot/spigot-1.21.jar
minecraft-server-1  |        Visit https://getbukkit.org/download/spigot to lookup the
minecraft-server-1  |        exact version or see if download site is unavailable.
minecraft-server-1  |        Click into the version entry to find the **exact** version.
minecraft-server-1  |
minecraft-server-1  | rm: cannot remove 'spigot_server-1.21.jar.1': No such file or directory

Thank you,

@itzg
Copy link
Owner

itzg commented Nov 1, 2024

There's already an option to build from source

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/server-types/bukkit-spigot/#build-from-source

Or I would suggest switching to Paper since it is supposed to compatible with bukkit/spigot plugins.

@DrumSlayers
Copy link
Author

DrumSlayers commented Nov 1, 2024

There's already an option to build from source

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/server-types/bukkit-spigot/#build-from-source

Or I would suggest switching to Paper since it is supposed to compatible with bukkit/spigot plugins.

Absolutely, this is why I edited my post.
I mainly use Paper already, but I needed Spigot to run some checks on my own plugins.

Also, actually, the docker image seems to not include JDK, making the spigot building impossible

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Spigot-API                                                         [jar]
[INFO] Spigot-Parent                                                      [pom]
[INFO] Spigot                                                             [jar]
[INFO]
[INFO] ----------------------< org.spigotmc:spigot-api >-----------------------
[INFO] Building Spigot-API 1.21.1-R0.1-SNAPSHOT                           [1/3]
[INFO]   from Spigot-API/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ spigot-api ---
[INFO]
[INFO] --- scriptus:0.5.0:describe (default) @ spigot-api ---
[INFO] Set property "describe" to "git-Spigot-API-4e4b70c"
[INFO] Set property "project.build.outputTimestamp" to "1730468799"
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ spigot-api ---
[INFO] skip non existing resourceDirectory /data/temp/Spigot/Spigot-API/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ spigot-api ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 1197 source files with javac [debug release 17] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spigot-API 1.21.1-R0.1-SNAPSHOT .................... FAILURE [  0.952 s]
[INFO] Spigot-Parent dev-SNAPSHOT ......................... SKIPPED
[INFO] Spigot 1.21.1-R0.1-SNAPSHOT ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.053 s
[INFO] Finished at: 2024-11-01T13:46:43Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project spigot-api: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[ERROR] -> [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/MojoFailureException
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /data/temp/apache-maven-3.9.6/bin/mvn, -Dbt.name=4344, clean, install]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
        at org.spigotmc.builder.Builder.runMaven0(Builder.java:936)
        at org.spigotmc.builder.Builder.runMavenServer(Builder.java:905)
        at org.spigotmc.builder.Builder.startBuilder(Builder.java:683)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
tail: spigot_build.log: file truncated

Thank,

@itzg
Copy link
Owner

itzg commented Nov 2, 2024

Be sure to select on of the image tags that includes the JDK

https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/

@DrumSlayers
Copy link
Author

Be sure to select on of the image tags that includes the JDK

https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/

Oh ok ! I already changed mine for graalvm, but i didn't saw the JDK ones. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants