How to include dependencies in jar?

I faced a similar issue where I wanted to include just one of the dependencies. Using shadow was not an option because it bundled ALL dependencies. I used plain Groovy script to include just one dependency in the final jar.

Here is the thread → How to include selective dependencies in fat jar?

I was excited about Java 9’s new JPMS, Java Package Management System w/ it’s in the root the project to require and export java classes to reduce the surface vulnerability area of attack vectors.

And, possibly putting all the module dependencies in there own module and building with Gradle to assemble everything.

So, when I started getting warnings about my JavaFX giving me “no named module” warnings I though I would take the step to resolve these warnings.

I would have no idea on how difficult that that would end up being.

These projects that require the use of Java 9’s module system themselves, do not support the current Gradle, Plugins, and JDKs to build there projects.

If there were one part of the client side Java world that would want to show the ease of using Java’s modules system this would be it.

And, how to incorporate Gradle and JPMS to build a single Jar artifact to deploy an OpenJFX client side application (with all dependencies in a single jar artifact).

So, to use OpenJFX you have to work with and around the JPMS with non-standard solutions.