ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: how to "echo" exec command
Date Fri, 06 Mar 2009 17:38:46 GMT
I take it you're a Windows person. The "echo on" and "echo off"
parameters are really part of the CMD.EXE "DOS" shell on Windows. It's
not a feature of Ant or of the OS.

When you use the <exec> command, you are running the command without the shell.

What you can do, if you really want to do this is run the command
through "cmd.exe" instead of doing it directly. That way, you get the
full power of the shell. Of course, it is slower, but it might get
what you want.

Something like this:

<exec executable="cmd.exe"
    failifexecutionfails="false">
    <arg line="/C VBoxManage controlvm {vbox.vmname} poweroff"/>
</exec>


<target name="vbox" depends="-init-run">
>        <exec executable="VBoxManage" failifexecutionfails="false">
>            <arg line="controlvm ${vbox.vmname} poweroff"/>
>        </exec>


On Fri, Mar 6, 2009 at 9:44 AM, viet nguyen <viet.atx@gmail.com> wrote:
>
> how do I "echo" or display the full command exec is about to run?  In my
> example I should see
> [exec] VBoxManage controlvm vm poweroff
> but nothing is shown.
>
> ant version=1.7 os = fedora 10 shell=bash, jdk=1.5.8
>
>    <target name="vbox" depends="-init-run">
>        <exec executable="VBoxManage" failifexecutionfails="false">
>            <arg line="controlvm ${vbox.vmname} poweroff"/>
>        </exec>
>     ....
>
> vbox:
>     [exec]
>     [exec] VirtualBox Command Line Management Interface Version 2.1.4
>     [exec] (C) 2005-2009 Sun Microsystems, Inc.
>     [exec] All rights reserved.
>
> --
> View this message in context: http://www.nabble.com/how-to-%22echo%22-exec-command-tp22373827p22373827.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message