Skip to content

Commit

Permalink
Set wildcard classpath for windows start batch (#371)
Browse files Browse the repository at this point in the history
The generated start script for Windows consists of a huge classpath.
This classpath was too long, resulting in an error when executing the start
script. Using wildcard to include libraries shortens the classpath so that now
error occurs when executing the start script.
  • Loading branch information
dr0i committed Oct 29, 2024
1 parent 8ea116a commit ffa5b7a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions metafix-runner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ plugins {
id 'application'
}

application
startScripts {
doLast {
def winScriptFile = file getWindowsScript()
def winFileText = winScriptFile.text
winFileText = winFileText.replaceAll('set CLASSPATH=.*', 'rem original CLASSPATH declaration replaced, see https://github.com/metafacture/metafacture-fix/issues/371:\nset CLASSPATH=%APP_HOME%\\\\lib\\\\\\*')
winScriptFile.text = winFileText
}
}

dependencies {
implementation project(':metafix')

Expand Down

0 comments on commit ffa5b7a

Please sign in to comment.