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

JSONassert introduces split package issues in any Java 9+ project using it #116

Open
ntherrien opened this issue Apr 19, 2019 · 3 comments

Comments

@ntherrien
Copy link

java.lang.module.ResolutionException: Modules android.json and jsonassert export package org.json to module tomcat.embed.core

Because JSONAssert has a dependency on jsonassert, and because it defines JSONString in the org.json package (same that android.json uses), using JSONAssert will always cause split package issues in any Java 9++ programs that use it.

Simple solution is to change the JSONString package name as it cannot belong to org.json.

Another solution is to move JSONString to the android.json project.

Another solution is to avoid defining or using JSONString altogether.

I have not found any workaround to this other than excluding JSONAssert from the dependencies. Any help getting our existing code to work on Java11 with JSONAssert would be appreciated.

@ntherrien
Copy link
Author

Would you guys be open to an update of this project to support Java 11? I can volunteer some time to perform the modularization.

Does your build server support Java 11 builds?

@haster
Copy link

haster commented May 15, 2019

I am running into the same issue. Right now, JSONAssert is not usable in a jigsaw context due to this split-package issue.

@zrbrown
Copy link

zrbrown commented Nov 11, 2022

I submitted a PR for this. There are some other things that would be nice in a potential new major version, like bumping the source/target version (6 doesn't even work with Maven anymore), and even adding a module-info file. I'd be happy to help with these as well!

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

3 participants