ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Gebhardt <Joern.Gebha...@ptv.de>
Subject Using properties to customize config files
Date Mon, 29 Sep 2003 15:22:58 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message