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

jar in jar or relocate kyori adventure #478

Open
htpnet opened this issue Jan 8, 2025 · 0 comments
Open

jar in jar or relocate kyori adventure #478

htpnet opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@htpnet
Copy link

htpnet commented Jan 8, 2025

Description

It appears that both spark and our mod using kyori adventure export the same package, net.kyori.adventure.text.serializer.gson.impl, which leads to a ResolutionException

Exception in thread "main" java.lang.module.ResolutionException: Modules net.kyori.adventure.text.serializer.gson and spark export package net.kyori.adventure.text.serializer.gson.impl to module wirelesschargers
    at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:900)
    ...

Spark only uses 2 classes from it. Use a jar-in-jar approach to include its dependencies in a way that avoids conflicts.
Relocate the conflicting package to avoid it being exported globally. ty

Reproduction Steps

Use a mod setup that includes both spark and kyori adventure dependencies.
Attempt to start the server.
Observe the crash during the module resolution phase.

Expected Behaviour

Not crash

Platform Information

  • Minecraft Version: 1.21.1
  • Platform Type: Server
  • Platform Brand: NeoForge
  • Platform Version: Latest

Spark Version

spark-1.10.109-neoforge.jar

Logs and Configs

No response

Extra Details

No response

@htpnet htpnet added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant