on Windows, when maven build launching wisdom terminates, the chameleon.sh continues its execution, which is quite a pain, since it locks the port used by Wisdom and prevents any re-execution.
Could it possible, in such a case, to register a JVM shutdown hook that will, when invoked, terminate the chameleon run ?
It seems to me that launching is done in WisdomExecutor#executeInBackground(...).
More precisely, the line
Runtime.getRuntime().exec(cmdLine.toStrings(), null, mojo.getWisdomRootDirectory()); //NOSONAR see comment
creates a process, but never connects to it, which prevents its proper termination.
As a side note, i know that this works on MacOS/Linux, but not everybody wants to use these platforms :-)
on Windows, when maven build launching wisdom terminates, the chameleon.sh continues its execution, which is quite a pain, since it locks the port used by Wisdom and prevents any re-execution.
Could it possible, in such a case, to register a JVM shutdown hook that will, when invoked, terminate the chameleon run ?
It seems to me that launching is done in
WisdomExecutor#executeInBackground(...)
. More precisely, the linecreates a process, but never connects to it, which prevents its proper termination.
As a side note, i know that this works on MacOS/Linux, but not everybody wants to use these platforms :-)