ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: rexec and setting env variables on remote host
Date Mon, 28 Jan 2008 10:39:56 GMT
Z W wrote:
> Hi
> I tried using rexec task to invoke a shell script.
> <rexec userid="${aname}"
>            password="${apass}"
>            server="${host}"
>            command="cd ${i_dir}; echo $A_HOME $JDK_HOME" />
> The output is as follows:
>     [rexec] /af/gord
>     [echo]
> But when I check the local host of this unix box, the variables are set in
> .profile. When echoed, they are displayed.
> How do I make sure the shell sets these variables in Ant script using rexec
> ? source command isn't available on the unix box.

You've just dropped out of the ant world into the remote linux world.

* You only get stuff in .profile, .cshrc or whatever if you get  a login 
prompt, and by default SSH prompts and other remote connections arent.

* I think its an SSH option to turn this back on. Otherwise run bash 
-login to run bash as a login

Steve Loughran        
Author: Ant in Action 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message