You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by James Bucanek <su...@gloaming.com> on 2000/12/08 18:51:40 UTC
Newbie: Bunch 'o questions
First of all, let me apologize if this is all FAQ stuff, but the FAQ
at www.jakarta.org just returns server errors, and I only get
connection errors from the list archive at archive.covalent.net.
*sigh*
(1) Is there a tutorial somewhere on doing the obvious?
The docs are great, but it's not immediately obvious how to do some
rather typical build/make things. Specifically, I've several tools
that are basically compilers. I'd like them to execute iff some of
the source files are newer than the target file(s). And
specifically, it should be executed only on those files that are
newer.
I can see where Uptodate will set a property if *any* of a set of
files have changed, but where's the file filter to give me *just* the
subset of files that have changed? Do I have to write this logic
into every Task?
I guess I would have expected some attribute to FileSet that would
filter based on modification date: <fileset dir="${src}"
newerthan="$(lib)">...
And what about the slightly more complex comparison where you've got
a set of source files (source/*.src) and you need to compare them
individually with a matching set of output files (build/obj/*.obj),
and build those that are out of date?
Again, I would have expected some modifier to FileSet to produce
these subsets automatically. Actually, what I would really have
expected was some attribute to FileSet that would pass each File
through the java.io.FileFilter object (or some Ant specific analog)
of your choice.
(2) Is there a public repository for contributed Tasks? I've already
thought of several Tasks, and I can't believe that no one else has
done some of them already.
(3) Has anyone written a simple Swing GUI for Ant that would allow
someone in our code maintenance department to simply pick a target
from a list? Possibly being prompted for a few key properties
(version number, VCS label, etc.).
(4) I'm assuming that the XML file for an Ant task isn't read until
that action is executed. Specifically, I'd like to have one target
dynamically generate the XML for another target, but these obviously
have to occur in the correct order. (Or, maybe I can just create
Target and Task objects dynamically?)
(5) Harping back to (1), we've got source files that include other
files. We have a tool that will compile a list of all of the files
that a given source file depends on. We then reformat this list and
turn it into empty dependency statements in our make file.
How can I do this in Ant? That is, how I can get Ant to compile
xyz.src only if it or any of it's included source files have changed?
Do we have to build this kind of dependency logic in to each and
every tool? Or do you just write a thousand <target> statements,
each with a custom Uptodate action and an 'if' attribute?
(6) How do you create a Task that processes a FileSet? Do you just
add the magic addFileset(FileSet) method?
Thanks for any insight,
__________________________________
James Bucanek
<ma...@gloaming.com>