I would like to run a main method using Maven's exec command. I can set it up to run just fine, but the output of my class is surrounded by Maven's text.
[INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [WARNING] ... (actual program output) ... [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.351s [INFO] Finished at: Fri Apr 01 11:38:15 PDT 2011 [INFO] Final Memory: 50M/452M [INFO] ------------------------------------------------------------------------
Is there a way to just capture just the program output and not the Maven output? Or do I need to rewrite my software to write to a file (not ideal)?
Execute mvn
with the -q
flag to silence Maven's output.
There's no good solution to this. It's just how the exec plugin works. You could use the exec goal and run a shell script that redirected the output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With