jbang
jbang copied to clipboard
Add support for multiple scripts in maven plugin
It would be cool, if maven plugin could execute multiple scripts and not just one. Something like this maybe?
<configuration>
<scripts>
<script>
<path>hello1.java</path>
<args>
<arg>--option1=foo</arg>
</args>
</script>
<script>
<path>hello2.java</path>
<args>
<arg>--option2=bar</arg>
</args>
</script>
</scripts>
</configuration>
BTW, Thank you for jbang! it's amazing!
Thanks for the nice words.
I'm not convinced this is a good common approach as you'll then need to consider What exit code means for build fails will mean.
@aalmiray thoughts ?
I'd expect, if one of the scripts fails, the subsequent ones would not be executed and the build would fail with the exit code of the failed script. The log would indicates which scripts where successful and which one is failed
Allowing multiple scripts sounds like a good option to me, as the current alternative is to register a profile per script which leads to additional configuration and verbosity. If this feature were to be added to the Maven plugin then it should be added to the Gradle plugin as well, to keep up with feature parity.