ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Another Oddity with Anthill OS
Date Thu, 18 Jan 2007 10:07:12 GMT
Res Pons wrote:
> Asking this question again.  Is there anyway to force-load a diffrent 
> property file in Anthill project property sheet even the build.xml loads 
> one by default?
> 
> In the build.xml file I already tell it to load .build.properties and on 
> a DOS cmnd line I can supercede it by doing ant -propertyfile 
> c:\.build.properties.xyz and it works perfectly but I'm not sure how to 
> do this in Anthill.
> 
> The 2 prop files have a lot of common values except 2 values having 
> different paths destined for different platforms
> 

You could pass down the name of a property file to the build, and have 
that loaded on demand. If you use <loadfile> the build will fail if the 
file is missing: (from diary/core/chapter7.xml btw)

<target name="ftp-init" depends="init">
   <fail unless="server">Set the "server" property!</fail>
   <property name="ftp.propfile" location="secure/${server}.properties" />
   <loadproperties srcFile="${ftp.propfile}" />
</target>

set a project up with a default server, and override on the command line 
with a different one. Most IDEs and CI tools yet you define new properties.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message