ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject How to: Converting a property value into something else?
Date Wed, 03 Jul 2002 21:41:25 GMT
I have an Ant property defined in a properties file as follows:

myapp.services=\
service1 \
service2 \
service3

I start up my app using Ant, and use something like:

<java classname="myapp.Main">
  <arg value="-services"/>
  <arg line="${myapp.services}"/>
</java>

When I create the distrib, I copy a distrib-Myapp.bat file into
distrib/Myapp.bat, which is the main startup script for the application.
Until now, this script duplicated the list of services to start as defined
in the build.xml (now in a properties file as mentioned above). I would like
to replace dynamically during the copy the services to use. This is easy to
do, but I would like to format the bat files as follows:

java myapp.Main ^
-services ^
services1 ^
services2 ^
services3 ^
other options...

instead of 

java myapp.Main ^
-services ^
services1 services2 services3 ^
other options...

Since we have quite a few services, and that would make for a very long
line...
I can't figure out how to do something like that (with 1.4.1 on top of
that).

Thanks for any help. --DD



Mime
View raw message