I am developing an application using Java modules. when i try to run it using exec:java it seems the exec-plugin adds all dependencies to the classpath. i verified this using the -X option. the behavior expected is the modularized dependencies should be added to the module path. i am using plugin version 3.1.0.
how its impacting me: I am using ServiceLoader to load some services and it cannot find any services because the dependencies end up on classpath instead of modulepath. according to this post: https://github.com/mojohaus/exec-maven-plugin/issues/90 the plugin should support modulepath but it does not seem like so. I also tried using exec:exec with -Dexec.args="%modulepath" as described here <https://www.mojohaus.org/exec-maven-plugin/examples/example-exec-for-java-programs.html> but that gives exception. also read this: https://stackoverflow.com/questions/70250835/maven-exec-plugins-modulepath-does-not-appear-to-work can someone explain me how to run a modularized application using the exec plugin? also related: https://issues.apache.org/jira/browse/MNG-7855 (this is for the compiler plugin but mentioning fyi)