ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Echlin, Robert" <>
Subject RE: Build directly on machine vs. SSH to machine and start build
Date Tue, 08 May 2012 14:59:32 GMT
Hi Eric,
Since builduser has bash as the default shell, you will be in the bash shell.

You can do some testing. Remember that you can probably run ssh from the host.
  ssh -f builduser@buildMachine "echo Computername is set to: $COMPUTERNAME"

I think the script is assuming that HOSTNAME is already set on Linux boxes.
Put the following 5 lines in a script file on your host - I took most of it from your command

. ~/.bash_profile
export HOSTNAME=`hostname`
cd /app/rosstr/build
/opt/apache-ant-1.7.1/bin/ant -f build.xml -Dfull.buildnumber=

I have made a couple of assumptions here. Make sure that you get the machine name from:
  ssh -f builduser@buildMachine hostname

Line 3 sets the HOSTNAME variable, which should work. If not, try setting COMPUTERNAME.
You need to make the script executable - just in case you don't know, if the script is called
"ant.start", the command would be:
  chmod a+x ant.start

And you would run it with:
  ssh -f builduser@buildMachine ant.start

Hope this helps,

-----Original Message-----
From: Eric Fetzer [] 
Sent: Tuesday, May 08, 2012 10:10 AM
To: Ant Users List
Cc: Ant Users List
Subject: Re: Build directly on machine vs. SSH to machine and start build

Bash is this user's default shell.

On May 8, 2012, at 9:41 AM, Eric Fetzer <> wrote:

> Robert,
> Notice in my command:
>>>> ssh -f builduser@buildMachine ". ~/.bash_profile;cd /app/rosstr/build;/opt/apache-ant-1.7.1/bin/ant
-f build.xml -Dfull.buildnumber=
> that I'm sourcing my bash profile, which also runs .bashrc.  Will this not switch me
to the bash shell.  I typed in here that I bash, but that's just a habit because many of the
users I log onto systems with don't have bash as the default shell.  I'll check this one.
 If not, do you think changing his default would fix this?
> Thanks,
> Eric
> On May 8, 2012, at 9:13 AM, "Echlin, Robert" <> wrote:
>> Dfull.buildnumber=

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

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

View raw message