Skip to content

Commit

Permalink
Fix payara windows image (#2880)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Apr 28, 2021
1 parent a66a13f commit 7c51703
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion smoke-tests/matrix/src/main/docker/payara/launch.bat
Original file line number Diff line number Diff line change
@@ -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 <jvm-options> tag
:: after that place options into configuration xml after <jvm-options>-server</jvm-options>
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='<jvm-options>' + $env:JVM_ARGS + '</jvm-options>'; $opts=$opts -replace ' ', '</jvm-options><jvm-options>'; (gc $env:IN_CONF_FILE) -replace '<jvm-options>-server</jvm-options>', ('<jvm-options>-server</jvm-options>' + $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

0 comments on commit 7c51703

Please sign in to comment.