Running daemon with exec-maven-plugin avoiding `IllegalThreadStateException`

余生颓废 提交于 2019-11-27 21:04:41
Vykunta

Posting the answer that is discussed in the comments section of the question. This solution worked for me! Thanks Andrew Logvinov

cleanupDaemonThreads = false

Something like this in the configuration tag

<configuration> <mainClass>com.test.Startup</mainClass> <cleanupDaemonThreads>false</cleanupDaemonThreads> </configuration>

You can also pass cleanupDaemonThreads using the command line parameter:

#!/bin/bash

PARAMS="$*"

export MAVEN_OPTS=-Dfile.encoding=utf-8

mvn exec:java \ 
     -Dexec.cleanupDaemonThreads=false \ 
     -Dexec.mainClass="org.mu.App" -Dexec.args="$PARAMS"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!