From 738a73d408e748c35b4960aafefe05670d701357 Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Wed, 28 Apr 2021 11:02:34 +0300 Subject: [PATCH] Fix payara windows image --- smoke-tests/matrix/src/main/docker/payara/launch.bat | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/smoke-tests/matrix/src/main/docker/payara/launch.bat b/smoke-tests/matrix/src/main/docker/payara/launch.bat index e2b3837ee5df..c33d52396073 100644 --- a/smoke-tests/matrix/src/main/docker/payara/launch.bat +++ b/smoke-tests/matrix/src/main/docker/payara/launch.bat @@ -1 +1,8 @@ -java %JVM_ARGS% -jar glassfish/lib/client/appserver-cli.jar start-domain --verbose domain1 +:: server is run through a launcher process, to add jvm arguments we need to add them to configuration file +:: firstly split JVM_ARGS environment variable by space character and put each argument into tag +:: after that place options into configuration xml after -server +SET IN_CONF_FILE=/server/glassfish/domains/domain1/config/domain.xml +SET OUT_CONF_FILE=/server/glassfish/domains/domain1/config/domain.xml +powershell -command "$opts='' + $env:JVM_ARGS + ''; $opts=$opts -replace ' ', ''; (gc $env:IN_CONF_FILE) -replace '-server', ('-server' + $opts) | sc $env:OUT_CONF_FILE" +:: --verbose starts server in foreground mode where output is printed to console +java -jar glassfish/lib/client/appserver-cli.jar start-domain --verbose domain1