You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Peter Murray-Rust <Pe...@nottingham.ac.uk> on 2000/06/13 14:40:34 UTC
Newbie question [time dependencies]
Please forgive what is probably a FAQ or misconception [I have read the ant
docs and also run some simple examples].
I wish to use ant for building transforming XML documents - for websites,
etc. - using Xalan and XSL stylesheets. I am trying to set up dependencies
such as if foo.xml is touched, the foo.xml->foo.html build needs to be
triggered. But I can't see how to make foo.html depend on foo.xml. javac
and copydir have such mechanisms - is there a way to make them more
generally available (as happens in makefiles)?
I very much like the idea of ant and am sure that XML is the right
foundation for make-like operations.
Peter
Re: Newbie question [time dependencies]
Posted by Peter Murray-Rust <Pe...@nottingham.ac.uk>.
At 14:47 13/06/00 +0200, you wrote:
> >>>>> "PM" == Peter Murray-Rust <Pe...@nottingham.ac.uk> writes:
>
> PM> But I can't see how to make foo.html depend on foo.xml. javac and
> PM> copydir have such mechanisms
>
>All tasks determine what to do and wich dependencies to use
>themselves. You best bet is to implement a custom task for your
>transformation (extending MatchingTask would be you best starting point
>I guess) and check which files need processing inside this task.
Thanks.
>I agree that a simple file to file dependency mapping like it is used
>by copydir and javac (at least at the moment) could be factored out
>into a helper class to be reused though.
>Stefan
Agreed. I suspect that potential converts from makefile - like me - would
be glad of this.
P.
Re: Newbie question [time dependencies]
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "PM" == Peter Murray-Rust <Pe...@nottingham.ac.uk> writes:
PM> But I can't see how to make foo.html depend on foo.xml. javac and
PM> copydir have such mechanisms
All tasks determine what to do and wich dependencies to use
themselves. You best bet is to implement a custom task for your
transformation (extending MatchingTask would be you best starting point
I guess) and check which files need processing inside this task.
I agree that a simple file to file dependency mapping like it is used
by copydir and javac (at least at the moment) could be factored out
into a helper class to be reused though.
Stefan