From 7c517035c05eba616958003ebae08efa2e3fed8f Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Wed, 28 Apr 2021 13:26:26 +0300 Subject: [PATCH] Fix payara windows image (#2880) --- 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