ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Re[2]: loading before other properties when it does n't exist before building ...
Date Mon, 09 Sep 2002 22:17:57 GMT
The point is sometime hard to decipher from posts on ant-user ;-)

If I understand the point correctly now, you want users to override be able
to override properties!? I also want something like that, but I also want
users to check in these under CM control. That's why I have the scheme below
which loads many properties files from various locations (it's OK for the
file to be non-existant), with the most often used one being
${basedir}/users/${}. You can have properties specific to a
particular project / machine, or your own global properties.

Hope that helps. --DD

PS: What below is part of my common.xml entity included everywhere.

PS2: <import> is part of the embed proposal, which is compatible with Ant
1.5 (I believe).

  <!-- Provides access to env. vars using ${env.VARNAME} -->
  <property environment="env" />

  <!-- Global and local config files locations. -->
  <property name="global.userconfdir"
            location="${env.COM_LGC_USERS_BUILD_CONFIG_DIR}" />
  <property name="local.userconfdir"
            location="users/${}" />

  <!-- Global, project-specific, and system-project-specific config files.
  <property name="user.configs4" value="" />
  <property name="user.configs3"
value="${}-${user.configs4}" />
  <property name="user.configs2"
value="${env.COMPUTERNAME}-${user.configs4}" />
  <property name="user.configs1"
value="${env.COMPUTERNAME}-${user.configs3}" />

  <!-- Load user-specific (possibly project-specific) configs,
       first from the global location (if any), then the local one. -->
  <property file="${global.userconfdir}/${user.configs1}" />
  <property file="${global.userconfdir}/${user.configs2}" />
  <property file="${global.userconfdir}/${user.configs3}" />
  <property file="${global.userconfdir}/${user.configs4}" />

  <property file="${local.userconfdir}/${user.configs1}" />
  <property file="${local.userconfdir}/${user.configs2}" />
  <property file="${local.userconfdir}/${user.configs3}" />
  <property file="${local.userconfdir}/${user.configs4}" />

  <!-- Projects own default properties, if any. -->
  <property name="" location="" />
  <property file="${}" />

  <!-- Note that all the property definitions below can be overriden
       in any one of the properties files loaded above!!!

-----Original Message-----
From: Jacob Kjome [] 
Sent: Monday, September 09, 2002 5:06 PM
To: Ant Users List
Subject: Re[2]: loading before other properties when it
does n't exist before building ...

Hello Dominique,

Thanks for the suggestion, but that solution misses the point.  


But the point of the is that each person may
have their own.  Each person can add/change/remove properties from
their own copy of but we always want to have a
reference available for the standard stuff that goes in hence the copy from sample.* to * only if * doesn't


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

View raw message