What is(are) the simpler way(s), using just "native" Apache Maven plugins, to inject a script at the beginning of a jar file to make the jar an executable file?
Actually, any way to "edit" the built jar file as a regular file concatenating it with another file may work. Like the shell cat
example down below:
$ cat ${projectRoot}/src/main/stubs/runstub.sh target/${builtJarPath} > target/${builtJarPathWithoutExtention}-autorun.jar
$ chmod +x target/${builtJarPathWithoutExtention}-autorun.jar
In case you want to know the reason to inject a shell script at the beginning of a jar file, check the internet about "converting jar file to Linux executable", example: