Closed Tikkle closed 1 year ago
Run the compilew.bat
or .sh
script directly first, before using the IDE. The said artifact doesn't exist in an online repo, you need to successfully build the Libs
module first. Note that the compile scripts just run mvn clean package
for the parent project. So, doing this should actually work with your IDE too, but you must ensure to actually run these phases for the parent project the first time you compile it.
Got an error when running compilew.bat
:
C:\Minecraft\3plugin-dev-environment\Projects\RayTraceAntiXray-main>call mvnw.cmd clean package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Libs [pom]
[INFO] RayTraceAntiXray-Parent [pom]
[INFO] RayTraceAntiXray [jar]
[INFO]
[INFO] ----------------------< com.vanillage.libs:libs >-----------------------
[INFO] Building Libs 1.0.0-SNAPSHOT [1/3]
[INFO] from Libs\pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ libs ---
[INFO] Deleting C:\Minecraft\3plugin-dev-environment\Projects\RayTraceAntiXray-main\Libs\target
[INFO]
[INFO] --- dependency:3.5.0:unpack (unpack) @ libs ---
[INFO] Configured Artifact: io.papermc.paper:dev-bundle:1.19.4-R0.1-SNAPSHOT:zip
[INFO] Unpacking C:\Users\Benjamin\.m2\repository\io\papermc\paper\dev-bundle\1.19.4-R0.1-SNAPSHOT\dev-bundle-1.19.4-R0.1-SNAPSHOT.zip to C:\Minecraft\3plugin-dev-environment\Projects\RayTraceAntiXray-main\Libs\target with includes "" and excludes ""
[INFO]
[INFO] --- exec:3.1.0:exec (exec) @ libs ---
Minecraft 1.19 requires running the server with Java 17 or above. Download Java 17 (or above) from https://adoptium.net/
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:1000)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:947)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:471)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:260)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:172)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:100)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:821)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:270)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Libs 1.0.0-SNAPSHOT ................................ FAILURE [ 3.465 s]
[INFO] RayTraceAntiXray-Parent 1.10.4 ..................... SKIPPED
[INFO] RayTraceAntiXray 1.10.4 ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.568 s
[INFO] Finished at: 2023-03-25T11:16:18-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.0:exec (exec) on project libs: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [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/MojoExecutionException
I figured it out, apparently using Zulu OpenJDK is incompatible? I switch to using Adoptium to see if that would do it and it compiled correctly.
New problem related to my JDK (most likely) import sun.misc.Unsafe;
cannot be found.
Using Adoptium 17.0.6.10 version
Edit I found it in the jdk.unsupported library root, but for some reason when I try to build project it throws that error
Zulu OpenJDK is incompatible?
It just tries to run Mojang mapped Paperclip, so I assume it should work fine. Maybe your environment variables weren't setup correctly (pointed to another outdated jdk)? I don't know but the message Minecraft 1.19 requires running the server with Java 17 or above. Download Java 17 (or above) from https://adoptium.net/
is from Paperclip.
New problem related to my JDK (most likely)
import sun.misc.Unsafe;
cannot be found.
I can (and should) probably get rid of the Unsafe
stuff and use normal reflection instead, since the server's packages aren't affected by Java's module system anyway afaik. Does it compile correctly with compilew.bat (i.e. maven only, without IDE)?
However, I think I can't provide further help with your IDE here. Therefore, I'll close this.
I can (and should) probably get rid of the Unsafe stuff and use normal reflection instead, since the server's packages aren't affected by Java's module system anyway afaik.
Done.
I went to compile the plugin in Intellij IDEA and got a maven error:
I ran it with -U to force an update and the same error occurred. So then I checked papermc's maven repo and saw that there's no "io.papermc.paper.paper-server" directory.
Am stupid or can i compile without worry?