>>>>> "KB" == KC Baltz <[EMAIL PROTECTED]> writes:

 >> I would like ant to have a command-line argument to simply syntax
 >> check the build.xml file(s).

 KB> I'm guessing you could get this behavior by declaring a task that
 KB> does nothing and then building it.

 KB> <task name="checkXML"> </task>

 KB> ant checkXML

This will ensure your XML file is well formed, but not that it is a
valid Ant build file.

Starting with Ant 1.2alpha3 Ant will ignore unknown tags inside a
<target> until you finally try to execute the corresponding task - so
you won't find a typo in the name of a task unless you really use it.

Similarly you won't find a typo in an attribute's name until it gets
configured - which also only happens if you execute the task starting
with 1.2alpha2.

It really gets even more complicated. If you create a directory with
mkdir and later point a fileset to it, this is perfectly valid for
Ant. A "dry run" like make -n would not really create the directory
and then FileSet.setDir would throw an Exception.

Stefan

Reply via email to