Skip to content

Allow wisdom-maven-plugin to properly terminate background wisdom when maven ends #567

@Riduidel

Description

@Riduidel

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 :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions