I'm using groovy+gmaven+maven to automate/construct build procedure.
When I using ant sshexec task from within groovy script, which, in turn, executed from the gmaven plugin section, I've got some log info came from sshexec. I wonder if it is possible to write NO output while using ant.sshexec() from within groovy script? I have the following script:
def ant = new AntBuilder()
ant.sshexec(host: host,
port: port,
trust: true,
username: user,
password: pass,
command: "if test -d ${installDir}; then echo true; else echo false; fi",
outputproperty: 'doesInstallDirExist')
And the output is:
[sshexec] Connecting to 192.168.56.101:22
[sshexec] cmd : if test -d /mango/tomcat7/webapps; then echo true; else echo false; fi
Can I suppress/hide it?
Or, have you tried:
ant.project.buildListeners.firstElement().messageOutputLevel = 0