ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Bhatia" <NBha...@sapient.com>
Subject Deploying to multiple servers
Date Fri, 07 Mar 2003 21:10:40 GMT
I need to write an ant script to deploy to multiple servers. The number
of servers and their properties should be configurable.

For example, I may want to specify that
1) We need 3 servers: server1, server2 and server 3
2) The servers listen on ports 5000, 6000 and 7000
3) Each server needs a log4j.xml file that should be copied from a
template log4j.xml file, except that the log file name within this
template should be replaced with <server-name>.log. For example,
server1.log.

What is the best way to do this? I started off by using Ant properties
and <foreach> to loop through the servers, but my solution does not look
very elegant:

servers=server1,server2,server3
server1.port=5000
server2.port=6000
server3.port=7000
...

Thanks.
Naresh

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