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

Build failure #12

Open
wioxjk opened this issue Dec 3, 2020 · 7 comments
Open

Build failure #12

wioxjk opened this issue Dec 3, 2020 · 7 comments

Comments

@wioxjk
Copy link

wioxjk commented Dec 3, 2020

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.998 s
[INFO] Finished at: 2020-12-03T14:49:30+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Minetrix: Could not resolve dependencies for project net.rrerr.minetrix:Minetrix:jar:0.1.0-SNAPSHOT: Failed to collect dependencies at de.msrd0.matrix:matrix-client:jar:1.1: Failed to read artifact descriptor for de.msrd0.matrix:matrix-client:jar:1.1: Could not transfer artifact de.msrd0.matrix:matrix-client:pom:1.1 from/to nextgenenergy (https://maven.nextgenenergy.co.nz/artifactory/maven/): maven.nextgenenergy.co.nz: Unknown host maven.nextgenenergy.co.nz -> [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/DependencyResolutionException

Is there a way around this? Can I fetch the dependencies from other hosts?
Is it possible that you can distribute prebuild .jar files in the future? :)

@ScumbagDog
Copy link

Here's the missing dependency: https://github.com/msrd0/matrix-client/

Here are the jarfiles for both projects with all dependencies

Don't know if either works
Good Luck.

@wioxjk
Copy link
Author

wioxjk commented Dec 3, 2020

Thank you @ScumbagDog !
I am not familliar with maven and building software with it, but I think that I need to find another repository for the https://github.com/msrd0/matrix-client/ "libary?", since the listed one (maven.nextgenenergy.co.nz) is dead

@ScumbagDog
Copy link

If you want to continue to use maven to build with, yeah. I looked in the build script for the matrix-client project, and it had a task for publishing to the now-dead repo. If you set up a new server (or find a public to host it at), it should be as easy as redirecting the publish target in the matrix-client project and the repo in the Minetrix project (in the build.gradle and pom.xml respectively).

Alternatively, you could do what I did, which is clone both projects, make a "fat jar" (jar with dependencies included) of matrix-client, then just plop it in the Minetrix project folder and reroute the dependency to be local instead. It's a bit hacky (and besides, I already did that for you), so don't do this if you plan on developing the project further.

@wioxjk
Copy link
Author

wioxjk commented Dec 4, 2020

Just a FYI - it does not work with Paper for 1.16.3.
I have no idea why :)

[21:05:20 ERROR]: Could not load 'plugins/matrix-client-1.0-SNAPSHOT-all.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:162) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:148) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.craftbukkit.v1_16_R2.CraftServer.loadPlugins(CraftServer.java:389) ~[patched_1.16.3.jar:git-Paper-246]
        at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:204) ~[patched_1.16.3.jar:git-Paper-246]
        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939) ~[patched_1.16.3.jar:git-Paper-246]
        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.3.jar:git-Paper-246]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 7 more
[21:05:21 WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
[21:05:25 WARN]: Legacy plugin dynmap v3.1-beta4-421 does not specify an api-version.
[21:05:25 ERROR]: Could not load 'plugins/Minetrix-0.1.0-SNAPSHOT-jar-with-dependencies.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: de/msrd0/matrix/client/listener/EventQueue
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:141) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.craftbukkit.v1_16_R2.CraftServer.loadPlugins(CraftServer.java:389) ~[patched_1.16.3.jar:git-Paper-246]
        at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:204) ~[patched_1.16.3.jar:git-Paper-246]
        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939) ~[patched_1.16.3.jar:git-Paper-246]
        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.3.jar:git-Paper-246]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NoClassDefFoundError: de/msrd0/matrix/client/listener/EventQueue
        at net.rrerr.minetrix.Main.<init>(Main.kt:26) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
        at java.lang.Class.newInstance(Class.java:584) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:80) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[patched_1.16.3.jar:git-Paper-246]
        ... 7 more
Caused by: java.lang.ClassNotFoundException: de.msrd0.matrix.client.listener.EventQueue
        at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:171) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[patched_1.16.3.jar:git-Paper-246]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
        at net.rrerr.minetrix.Main.<init>(Main.kt:26) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
        at java.lang.Class.newInstance(Class.java:584) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:80) ~[patched_1.16.3.jar:git-Paper-246]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[patched_1.16.3.jar:git-Paper-246]
        ... 7 more

@ScumbagDog
Copy link

Ok, I just checked the jarfile myself, and for some reason, the maven jar assembler decided to not include local dependencies when it made the all-dependencies version of the jar (this is some real galaxy-brain logic <.<).

I tried my hand at merging it manually, let me know if it works.
Minetrix-0.1.0-SNAPSHOT-jar-with-dependencies.zip

@wioxjk
Copy link
Author

wioxjk commented Dec 4, 2020

Thank you @ScumbagDog!
This did indeed solve the issue :)
I am however getting this error, and I do not think that it has something to do with the .jar file at all. Maybe the package needs to be updated since stuff has change quite alot in the matrix-ecosystem lately:

[11:44:39 ERROR]: [Minetrix] got a Unknown login type: uk.half-shot.msc2778.login.application_service error while setting up Matrix :-(
[11:44:39 WARN]: java.lang.IllegalArgumentException: Unknown login type: uk.half-shot.msc2778.login.application_service
[11:44:39 WARN]:        at de.msrd0.matrix.client.LoginType$Companion.fromString(auth.kt:41)
[11:44:39 WARN]:        at de.msrd0.matrix.client.MatrixClient.auth$matrix_client(client.kt:289)
[11:44:39 WARN]:        at de.msrd0.matrix.client.MatrixClient.auth(client.kt:247)
[11:44:39 WARN]:        at de.msrd0.matrix.client.MatrixClient.auth(client.kt:254)
[11:44:39 WARN]:        at net.rrerr.minetrix.Main.setupMatrixClient(Main.kt:92)
[11:44:39 WARN]:        at net.rrerr.minetrix.Main.onEnable(Main.kt:43)
[11:44:39 WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[11:44:39 WARN]:        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380)
[11:44:39 WARN]:        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[11:44:39 WARN]:        at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugin(CraftServer.java:501)
[11:44:39 WARN]:        at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugins(CraftServer.java:415)
[11:44:39 WARN]:        at net.minecraft.server.v1_16_R2.MinecraftServer.loadWorld(MinecraftServer.java:468)
[11:44:39 WARN]:        at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:237)
[11:44:39 WARN]:        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939)
[11:44:39 WARN]:        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[11:44:39 WARN]:        at java.base/java.lang.Thread.run(Thread.java:834)

@ScumbagDog
Copy link

I found this repo of matrix-client, maybe it is updated to work with the application_service api:
https://gitlab.com/mextrix/matrix-client
Otherwise, you may be able to specify a legacy version of the api to be used.
But your guess is as good as mine.

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

No branches or pull requests

2 participants