I’m working on a Java application that builds up its class path at runtime and should simply be started as a jar file, that is:
java -jar MyApp.jar
I’d like to modify the start scripts generated by the “application” plugin to start my application this way. From the docs I came up with code like the following in my “build.gradle”:
task createStartScripts(type: CreateStartScripts) {
unixStartScriptGenerator.template = resources.text.fromFile('customUnixStartScript.txt')
windowsStartScriptGenerator.template = resources.text.fromFile('customWindowsStartScript.txt')
}
Sadly, this does not work. No matter where I place my template files they are ignored without any error or warning message.
Does anybody know, what I’m doing wrong here?