I'm trying to use Cargo (with the maven goal cargo:run) to launch a Tomcat 8 (installed mode) with spawn mode on. I was not able to do this and I get the following message:
[INFO] [en2.ContainerRunMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.6.2 for container tomcat8x
[INFO] [talledLocalContainer] Tomcat 8.x starting...
[INFO] [stalledLocalDeployer] Deploying [/home/tomcat/.m2/repository/<<****removed****>>/<<****removed****>>.war] to [/home/tomcat/<<****removed****>>/target/cargo/configurations/tomcat8x/webapps]...
[INFO] [talledLocalContainer] Tomcat 8.x started on port 
[INFO] [talledLocalContainer] spawn does not allow attributes related to input, output, error, result
[INFO] [talledLocalContainer] spawn also does not allow timeout
[INFO] [talledLocalContainer] finally, spawn is not compatible with a nested I/O <redirector>
I did some analysis through debugging and I think it's a bug, since there are many hardcoded values that the Cargo code passes to the Java Ant task (like this one, but there are many more), and these values inhibit the spawn mode, due to this and finally this.
At the moment, I think it's impossible for many containers to run with spawn mode, since this code is shared among many implementations.
Please refer to this stackoverflow question.