You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears asyncDestroyOnShutdown does not work correctly; the Maven JVM exits and the JavaFX window remains open.
The underlying issue is Apache Commons Exec EXEC-121: Because the JavaFX plugin uses the async execute method, the process is launched in a separate thread and the process destroyer is registered afterwards. However, in the meantime the JVM has already exited.
Also as side note, for you async execution you should probably prefer org.apache.commons.exec.DaemonExecutor over DefaultExecutor (see also EXEC-69). I assume your current code just happens to work for async JavaFX launching because Maven seems to explicitly call System.exit at the end, but that might be an implementation detail.
However, I don't really understand the use case for asyncDestroyOnShutdown. If it was working correctly (can be achieved by delaying Maven exit after JavaFX plugin execution), then what is happening is that the JavaFX application launches and then at some arbitrary point, when Maven exits, terminates. What is the use case for that / where would that be desired?
I can mainly imagine a feature like this being useful for synchronous execution, but that currently does not exist, see #169.
Version
0.0.8
Description
It appears
asyncDestroyOnShutdown
does not work correctly; the Maven JVM exits and the JavaFX window remains open.The underlying issue is Apache Commons Exec EXEC-121: Because the JavaFX plugin uses the async
execute
method, the process is launched in a separate thread and the process destroyer is registered afterwards. However, in the meantime the JVM has already exited.Also as side note, for you async execution you should probably prefer
org.apache.commons.exec.DaemonExecutor
overDefaultExecutor
(see also EXEC-69). I assume your current code just happens to work for async JavaFX launching because Maven seems to explicitly callSystem.exit
at the end, but that might be an implementation detail.However, I don't really understand the use case for
asyncDestroyOnShutdown
. If it was working correctly (can be achieved by delaying Maven exit after JavaFX plugin execution), then what is happening is that the JavaFX application launches and then at some arbitrary point, when Maven exits, terminates. What is the use case for that / where would that be desired?I can mainly imagine a feature like this being useful for synchronous execution, but that currently does not exist, see #169.
Reproduction steps
(Might depend a bit on the machine you are performing this on, since this is essentially a race condition, see description above)
The text was updated successfully, but these errors were encountered: