Custom module class imported package class not found

The same way. You package all dependencies inside the module.

To do that automatically, you can use the maven-shade-plugin, as VASL does: https://github.com/vasl-developers/vasl/blob/develop/pom.xml