ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: How to use localization with ant?
Date Thu, 29 May 2003 17:16:12 GMT
Without using antcontrib's if task:

<project name="t" default="t">

  <target name="t" depends="init">

  </target>

  <condition property="win">
    <os family="windows"/>
  </condition>

  <target name="set-win" if="win">
    <property name="my.os" value="win"/>
  </target>

  <target name="init" depends="set-win">
    <property name="my.os" value="unix"/>
    
    <property file="${my.os}.properties"/>
  </target>

</project>

Peter
On Thursday 29 May 2003 18:02, Verma, Nitin (GECP, OTHER, 529706) wrote:
> Thanx! This is a nice option but my project should build on any OS having
> ant and java.
> Anyother option?
>
> -----Original Message-----
> From: peter reilly [mailto:peter.reilly@corvil.com]
> Sent: Thursday, May 29, 2003 10:23 PM
> To: Ant Users List
> Subject: Re: How to use localization with ant?
>
>
>
> I use the following:
>
>       <property file="${os.name}.properties"/>
>
> and have a "Linux.properties" and a "SunOS.properties" file and
> one for each of the mad bad winos's as there is nearly always
> some differences between them.
>
> Peter
>
> On Thursday 29 May 2003 17:33, Verma, Nitin (GECP, OTHER, 529706) wrote:
> > <property file="build.properties" locate="win"/>
> > This loads build.properties.win
> > <property file="build.properties" locate="unix"/>
> > This loads build.properties.unix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message