You can use exec-maven-plugin to run a shell script that will start your process and disconnect from it (letting the process run in the background). Something like that:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>start-server</id> <phase>pre-integration-test</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>src/test/scripts/run.sh</executable> <arguments> <argument>{server.home}/bin/server</argument> </arguments> </configuration> </execution> </executions> </plugin>
If run.sh might be like this (for the U * nix platform):
#! /bin/sh $* > /dev/null 2>&1 & exit 0
That should do the trick.
maximdim
source share