We have a similar issue with the new <waitForChild/> feature of maven-jetty-plugin 7.6.5 version<https://jira.codehaus.org/browse/JETTY-991> .
Whenever we run "mvn jetty:run-forked" from command line the new forked JVM process remains running after Maven process ends. If we run the same Maven task within Jenkins the new forked JVM process starts but also ends when Maven process ends. I think this is a consequence of https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller acting upon Maven process termination but the "BUILD_ID=dontKillMe" workaround is nor working in our case.- El lunes, 13 de febrero de 2012 16:31:40 UTC+1, Laird Nelson escribió: > > Hello; thanks for a great product. > > I am using my h2-maven-plugin (http://github.com/ljnelson/h2-maven-plugin) > project to spawn long-lived H2 server processes. Doing this from the > command line works great: after I run mvn > com.edugility:h2-maven-plugin:1.0:spawn, I get a new H2 server listening on > port 9092. > > The internals of the Maven plugin effectively launch a new JVM by using > ProcessBuilder and Process#start(). > > When I bake this invocation into a Jenkins build, the process is > terminated as soon as the build completes. That's not what I want. > > My (Jenkins) question is: does Jenkins--when spawning Maven--do something > explicit to kill the entire process tree when it is completed? Because in > my case, I want my long-lived H2 process to continue after the Maven JVM > that invoked it is killed. > > I freely recognize this may just be one of those cases where it's Just Not > Going To Work but I thought I'd ask to see if Jenkins is doing anything > specific to kill the entire tree of processes that might have been spawned > as a result of a Maven job. > > Thanks, > Laird > > -- > http://about.me/lairdnelson > >