ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: How to best create environment specific properties in an applications property file using ANT
Date Mon, 26 Feb 2007 15:29:40 GMT
I would split the properties (build.propeties, prod.propeties,, ...)
and load two of them:

<property name="system" value="prod"/> (prod,test,dev...)
<property file="${system}.properties"/>
<property file=""/> contains all properties and in the other files you could 
overwrite (that's why it's loaded first) specific values.


>-----Urspr√ľngliche Nachricht-----
>Von: Eric Wood [] 
>Gesendet: Montag, 26. Februar 2007 16:09
>An: Ant Users List
>Betreff: How to best create environment specific properties in 
>an applications property file using ANT
>I'm looking at how to best create different copies of an application
>property file using ANT.  I have a property file that contains two
>sections: one section with environment specific settings that will vary
>as it is deployed across test, QA, and production servers and one
>section that is constant.  Currently, it is versioned in our 
>source code
>repository so it works in the development environment; this way
>developers can work with it directly in their environment 
>without having
>to change it. When I build their application using ANT I would like to
>generate different versions of the file for environment that I 
>save save
>for later deployment.  I was looking at using filterreaders 
>but they are
>not really setup to substitute a block of properties located in the
>middle of the file.
>Any thoughts on how I can best do this task?

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

View raw message