I`m trying to run jdeps with the following command:
jdeps --module-path modules --generate-module-info out com.demo.market.jar
My com
When you execute the following:
jdeps --module-path modules --generate-module-info out com.demo.market.jar
The modules that are resolved from the directory are observable modules which in your case are not able to make it to the set of root modules.
Over the other part of the question -
jdeps --module-path modules --add-modules com.demo.client,com.demo.product,com.demo.logistic --generate-module-info . com.demo.market.jar
While on the other hand, adding them explicitly makes sure the modules are present in the set of root modules.
As an alternative(from the JEP261#Module System, you can try using the command
jdeps --module-path modules --add-modules=ALL-MODULE-PATH --generate-module-info out com.demo.market.jar
As a final special case, at both run time and link time, if is ALL-MODULE-PATH then all observable modules found on the relevant module paths are added to the root set. ALL-MODULE-PATH is valid at both compile time and run time. This is provided for use by build tools such as Maven, which already ensure that all modules on the module path are needed. It is also a convenient means to add automatic modules to the root set.
Side note there, in terms of the commands to be executed:-
jdeps
output shared in the question holds true with -verbose:class
ideally.