ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Fetzer <elstonk...@yahoo.com>
Subject Re: Build directly on machine vs. SSH to machine and start build
Date Mon, 07 May 2012 22:16:52 GMT
Thanks Simon!  I can work with that...



On May 7, 2012, at 5:41 PM, Simon Murcott <simon@flaxx.net> wrote:

> I ended up writing a custom ant task to do this. Unfortunately in both *nix and windows
you can't always rely on environment variables. On *nix you need to read the output of /bin/hostname
or on windows read the output of WScript.Network.ComputerName
> 
> 
> Regards, Simon
> 
> On 8/05/2012, at 8:28 AM, Eric Fetzer <elstonkers@yahoo.com> wrote:
> 
>> Thanks Nathan, very helpful.  This is at the top of my build file:
>> 
>>  <property name="env.HOSTNAME" value="${env.COMPUTERNAME}"/>
>> 
>> When running with -v, I get this:
>> 
>> [property] Loading Environment env.
>> Property "env.COMPUTERNAME" has not been set
>> 
>> And then the code below tries to import a property file that doesn't exist:
>> 
>>  <if>
>>    <equals arg1="${env.HOSTNAME}" arg2="buildMachine"/>
>>    <then>
>>      <import file="properties1.xml" />
>>    </then>
>>    <else>
>>      <import file="properties2.xml" />
>>    </else>
>>  </if>
>> 
>> Anyone know of a way to make this work from an ssh call?  Seems like it would be
fine because even when I'm running this from a manual login, it's after sshing from my own
machine to this build machine...
>> 
>> Thanks,
>> Eric
>> 
>> 
>> ________________________________
>> From: "Perrier, Nathan" <nperrier@ptc.com>
>> To: Ant Users List <user@ant.apache.org>; Eric Fetzer <elstonkers@yahoo.com>

>> Sent: Monday, May 7, 2012 1:17 PM
>> Subject: RE: Build directly on machine vs. SSH to machine and start build
>> 
>> Add -v in your call (or -debug):
>> 
>>    ant [-v|-d] -f build.xml
>> 
>> -----Original Message-----
>> From: Eric Fetzer [mailto:elstonkers@yahoo.com] 
>> Sent: Monday, May 07, 2012 2:12 PM
>> To: Ant Users
>> Subject: Build directly on machine vs. SSH to machine and start build
>> 
>> This is very strange to me.  Here are the 2 scenarios.
>> 
>> Scenario 1:
>> 1)  Log on to buildMachine as user builduser
>> 2)  >bash
>> 3)  >cd /my/builddir
>> 3)  >/opt/apache-ant-1.7.1/bin/ant -f build.xml -Dfull.buildnumber=3.0.2.8
>> 4)  Build succeeds without issue
>> 
>> Scenario 2:
>> 1)  From a different machine:
>>> ssh -f builduser@buildMachine ". ~/.bash_profile;cd /app/rosstr/build;/opt/apache-ant-1.7.1/bin/ant
-f build.xml -Dfull.buildnumber=3.0.2.8
>> 2)  There are 7 different apps that get built in the build.xml file.  Each get called
by the ant task.  Only one of them fails with no indication as to why it failed.
>> 
>> I've tried loads of stuff.  I echo just before it hits the ant call and the echo
outputs.  I've retyped the ant line several times without success.  I've changed the order
of this particular ant call and it doesn't matter, it fails when it gets to it.  Here's the
code that crashes:
>> 
>>      <ant antfile="BuildReports.xml"/>
>> 
>> Not exactly a tough thing to do.  Call the BuildReports.xml file in the current directory...
 Anyone have any idea what this could be or what I could do to debug this?  There is no verbose=true
on the ant task...
>> 
>> Thanks,
>> Eric
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message