ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shunhui Zhu" <>
Subject parsing targets
Date Wed, 23 May 2001 21:56:21 GMT
Hi, I have a few applications,  say "foo1" and "foo2", all needs to be
build in the .war directory structure. I'd like to be able to type
"build foo1.compile", "build foo2.clean", etc. Since the tasks are all
the same, I managed to create a general "app.compile" target that relies
on the
property "" to be set. But in order to do the above, I have the
following block in build.xml

 <target name="foo1.compile">
    <antcall target="app.compile">
      <param name="" value="foo1"/>

 <target name="foo2.compile">
    <antcall target="app.compile">
      <param name="" value="foo2"/>

and similarly for other targets and applications. This is fine, but I'm
wondering whether ant can parse the target when I type "build
foo.compile", it automatically extracts the app name as "foo" and make a
call to 
	<antcall target="app.compile">
      <param name="" value="foo"/>

I can write the parsing in the build.bat/, but can one do it
inside ant?



View raw message