JavaExec and module-path expansion


I try to mimic the auto class-path expansion that JavaExec does for ‘classpath’ file collection. Extending “JavaExec” seems not enough, as the underlying handle builder is used to gather the “all jvm” arguments.

See for a simple pitch, which suffers from the issue described above: when the task gets executed, the overriden method is not queried by the handle builder.

How do I setup such a feature correctly?

Or is it better to let the end-user provide the module-path as done in: