I also don't think you want to use spawn in this instance... I am guessing you want to see the result of the call? If so, ant won't log anything with the spawn attribute set to true. Another thing, I note you are using ls - unfortunately, with no spawn, you will get an error from sh as follows: [exec] /bin/sh: - : invalid option
    [exec] Usage:      /bin/sh [GNU long option] [option] ...
    [exec]     /bin/sh [GNU long option] [option] script-file ...
    [exec] GNU long options:
    [exec]     --debug
    [exec]     --debugger
    [exec]     --dump-po-strings
    [exec]     --dump-strings
    [exec]     --help
    [exec]     --init-file
    [exec]     --login
    [exec]     --noediting
    [exec]     --noprofile
    [exec]     --norc
    [exec]     --posix
    [exec]     --protected
    [exec]     --rcfile
    [exec]     --rpm-requires
    [exec]     --restricted
    [exec]     --verbose
    [exec]     --version
    [exec]     --wordexp
    [exec] Shell options:
[exec] -irsD or -c command or -O shopt_option (invocation only)
    [exec]     -abefhkmnptuvxBCHP or -o option
    [exec] Result: 2

I think all you really want to do is to execute the "ls" command?

Antoine Levy-Lambert wrote:
Hi,

to find out which ant you are using, simply type :

$ which ant

in your console.

To use another version of ant, for instance ant1.6.5, supposing you have
installed ant1.6.5 under /opt/apache-ant-1.6.5, set the following
environment variables :

ANT_HOME=/opt/apache-ant-1.6.5
export ANT_HOME
PATH=$ANT_HOME/bin:$PATH
export PATH

these 4 lines can be added at the end of your .kshrc or equivalent. If
you are using csh as a login shell, the syntax is slightly different.

setting ANT_HOME to the location of the ant distribution you want to use
is an absolute requirement.
setting PATH is a commodity.

Regards,

Antoine

vamsee wrote:
Hi,

I want to use spawn for exec in linux.
I have used following code in my build.xml

<exec executable="sh" spawn="true"> <arg value="-c ls" /> </exec>

but when i ran ant in shell terminal, following msg is displayed:

<exec> th task doesn't suppport spawn

please provide some solution or any workaround so that i can have same
affect as i use the command "spawn"

Also guys can you please provide information on what files i want to modify
to overwrite in built linux version with latest version of ant.

Looking for your earliset response

Regards,
vamsee


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim

Reply via email to