You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dan Vint <dv...@dvint.com> on 2007/09/27 07:16:25 UTC

Finding the command from exec task

I have a situation where I'm using the exec task to run a program. The 
underlying program is sensitive to the use of double or single quotes. At 
the command line without Ant I can get two different results from the 
program I'm calling. When I put this call into Ant I get the result from 
having used the single quotes. So I ave tried an argument that looks like 
this:

argument="-a 'test'" and I have tried argument='-a "test"'

both are accepted by Ant, but I get the same result from the underlying 
program in both cases. It's liek the quotes are being normalized to some 
standard. What I would like to see is the actual command as it is executed 
with the program and its arguments.

There aren't any parameters to this task to capture that information, any 
idea how I might get this information?

..dan

---------------------------------------------------------------------------
Danny Vint

Specializing in Panoramic Images of California and the West
http://www.dvint.com

Voice:510:522-4703
FAX: 801-749-3229

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


Re: Finding the command from exec task

Posted by Peter Reilly <pe...@gmail.com>.
Also,
remember that after this the command line arguments gets passed to java's
Process class and on WINDOWS the arguments get processed futher - especially
with regards to " and '.

Peter

On 9/27/07, Kevin Jackson <fo...@gmail.com> wrote:
> Hi
>
> > There aren't any parameters to this task to capture that information, any
> > idea how I might get this information?
> >
>
> try ant -debug, it should list the entire command line
>
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Re: Finding the command from exec task

Posted by Kevin Jackson <fo...@gmail.com>.
Hi

> There aren't any parameters to this task to capture that information, any
> idea how I might get this information?
>

try ant -debug, it should list the entire command line

Kev

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