ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <Mark.Lybar...@CBC-Companies.com>
Subject RE: Using properties to customize config files
Date Mon, 29 Sep 2003 15:28:16 GMT
you config file would look like:

      <auth-method>@security.auth-method@</auth-method>

and your build.xml has the following.
    <filter token="security.auth-method" value="${security.auth-method}"/>

check out the manual for token filtering.

-----Original Message-----
From: Jörn Gebhardt [mailto:Joern.Gebhardt@ptv.de]
Sent: Monday, September 29, 2003 11:23 AM
To: user@ant.apache.org
Subject: Using properties to customize config files


Hi,

can you use Ant to replace properties in other files?

I have a build property file that might look like this:

security.auth-method=BASIC
security.domain=myDomain
...

Now I want to use these properties to customize config files. E.g. if I have
a config file template web.xml that has the following context
  <web-app>
    <login-config>
      <auth-method>${security.auth-method}</auth-method>
      <realm-name>${security.domain}</realm-name>
    </login-config>
    ...
  </web-app>
I want to replace ${security.auth-method} by "BASIC" and ${security.domain}
by "myDomain".
Does anybody know how I can do that?

Thanks for your help in advance,
Joern


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
 


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


Mime
View raw message