path\logfile", the arguments to your program end at "2>". File redirection is an operation ..." />

Apache Ant command line arguments without double quotes - is it possible?

When you run "myprogram --param1 --param2 path\somefile 2> path\logfile", the arguments to your program end at "2>". File redirection is an operation of your shell, which isn't being used from within ant. If you look at the docs for the ant exec task you'll see that it supports redirection via the output attribute.

When you run "myprogram --param1 --param2 path\somefile 2> path\logfile", the arguments to your program end at "2>". File redirection is an operation of your shell, which isn't being used from within ant. If you look at the docs for the ant exec task, you'll see that it supports redirection via the output attribute.

Thanks, this seems like the general way to do it (I see there's an error attribute, too, if you want to difference between stdout and stderr). – schnaader Oct 21 '09 at 18:35.

I think this should work. – Tempus Oct 21 '09 at 18:30 Thanks, this works! I noticed the "line" variant, but the Apache Ant manual doesn't explain the difference between it and "value" well, so I thought it would just be kind of an alias.

– schnaader Oct 21 '09 at 18:33 1 From the Ant docs: It is highly recommended to avoid the line version when possible. Ant will try to split the command line in a way similar to what a (Unix) shell would do, but may create something that is very different from what you expect under some circumstances. Ant.apache.Org/manual/using.

Html#arg – Yishai Oct 21 '09 at 18:35.

The ant exec task has an output parameter where you could specify the log file without requiring the command line piping, combined with the parameter append to determine if the output file should be overwritten or appended to.

I had an equal problem as the topic starter did. On a java execution command line I needed to add source files as separate arguments, not as one argument with quotes around them. I used the tag, but using the as nullptr suggested solved my problem.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions