ArgumentProcessor is a parser of command line argument which is
then call before and after the build file is being parsed. Third party
libraries may then be able to have custom argument line argument which modify
ArgumentProcessor is called each time Ant parse an unknown
ArgumentProcessor doesn't take precedence over Ant to
parse already suported options. It is then recommended to thrid party
ArgumentProcessor implementation to chose specific 'enough'
argument name, avoiding for instance one letter arguments.
It is also called at the different phases so different behaviour can be
implemented. It is called just after every arguments are parsed, just
before the project is being configured (the build file being parsed),
and just after. Some of the methods to be implemented return a boolean:
true is returned, Ant will terminate immediatly, without
Being called during all these phases, an
can just print some specific system properties and quit (like
-diagnose), or print some specific properties of a project after
being parsed and quit (like
-projectHelp), or just set some
custom properties on the project and let it run.
ArgumentProcessor must be an implementation of
Then to decare it: create a file
contains only one line the fully qualified name of the class of the
implementation. This file together with the implementation class need then to
be found in Ant's classpath.