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

Make JAXB and java.sql dependencies optional #182

Open
axelfontaine opened this issue Jan 28, 2023 · 1 comment
Open

Make JAXB and java.sql dependencies optional #182

axelfontaine opened this issue Jan 28, 2023 · 1 comment

Comments

@axelfontaine
Copy link

jOOX is a very nice way to deal with XML on the JVM. It is also almost dependency free. Besides the obviously required dependencies on java.base and java.xml, it also unfortunately comes with hard dependencies on JAXB and java.sql.

A quick look at the code indicates that these dependencies are rather shallow. I would therefore propose replacing them with reflection and making them optional. I did this in Flyway for all kinds of third party dependencies and it worked great.

@lukaseder
Copy link
Member

Thanks for your report.

I don't disagree, it would be better this way, on a modern JDK. In the past, both of these "dependencies" weren't special as the JDK was a big lump of APIs (including JAXB!). Suddenly, folks were interested in making things more modular and now these things have become actual dependencies.

Reflection isn't going to make everyone happy. While the "small footprint" folks might be happy, the AOT folks might not be (e.g. in Quarkus, reflection can be painful again).

Much rather, the way forward would be to extract functionality in extension modules via SPIs. Though, I don't see this as a very high priority task.

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