Stefano Mazzocchi wrote, On 12/03/2003 17.27:
Nicola Ken Barozzi wrote:...
If you want to do it, make the sub-build write the infos in a fiule, and have the original build pock them up. Not pretty, but since Ant has not decided to have "returns" from subbuilds, it's the only way to do exactly what you want, the way you want.
I don't see how this can possibly work for filters. but anyway.
http://ant.apache.org/manual/CoreTasks/filter.html
" <filter filtersfile="deploy_env.properties"/>
will read all property entries from the deploy_env.properties file and set these as filters.
"
If the child file writes the filters it wants in that file, the parent can reuse them.
...
<target name="mytarget" depends="beforetarget, importedbuild.mytarget, aftertarget"/>
So I can easily "decorate" the original target I imported.
Ah, it's like calling super() in constructors?
Something like that, yes, and in fact it was called super before. But you can also call other original targets, so you can have:
<target name="mytarget" depends="beforetarget, importedbuild.mytarget, importedbuild.myothertarget, aftertarget"/>
The nice thing is that the redefined target still gets called by the dependency chain, so that means that you also import dependency chains.
anyway, thanks much for this info, it's really helpful.
I hope so. It's all part of the things that came from Centipede to make Ant better. We now have proposed Centipede to Ant, and I have high hopes that we can get a nice act together.
Good luck :)
Thanks :-)
-- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) ---------------------------------------------------------------------