johnpoth/jshell-maven-plugin

Add non-interactive mode

jycr opened this issue · 0 comments

jycr commented

it would be interesting to add a "non-interactive" mode to run scripts during build phases.

Cf. JShell documentation:

To accept input from standard input and suppress the interactive I/O, enter a hyphen (-) for load-files. This option enables the use of the jshell tool in pipe chains.

I don't know if it is better to add an option/parameter to the existing run goal, or if it is better to create another specific goal...

NB: According to the tests that I have been able to do, passing the scripts via stdin by indicating '-' as an argument, makes it possible not to have to add the /exit command at the end of the script