fix: error when running start scripts

This commit is contained in:
Tobi Schäfer 2020-03-17 18:30:14 +01:00
parent 56e9f6793b
commit 2da9bcf00b

View file

@ -10,11 +10,20 @@ allprojects {
targetCompatibility = JavaVersion.VERSION_1_6
}
// FIXME: start scripts are not working, yet
startScripts {
mainClassName = 'helma.main.launcher.Main'
applicationName = 'helma'
classpath = files('launcher.jar')
classpath = files('../launcher.jar')
mainClassName = 'helma.main.launcher.Main'
defaultJvmOpts = [jettyLogLevel]
doLast {
// Work-around to make the classpath above work (launcher.jar is located outside of `lib` dir)
// See https://discuss.gradle.org/t/classpath-in-application-plugin-is-building-always-relative-to-app-home-lib-directory/2012
def unixScriptFile = file getUnixScript()
def windowsScriptFile = file getWindowsScript()
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib', '$APP_HOME')
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib', '%APP_HOME%')
}
}
task processSource(type: Sync) {