The attached patch adds support for a new "nowarn" attribute to the Ant task, for controlling whether -nowarn should be passed to the JDK compiler (analog to the attribute of the javac task with the same name).
As a user, you're often not interested in warnings in generated code. In my case I wanted to suppress
[ant:xmlbean] warning: [options] bootstrap class path not set in conjunction with -source 1.4
but I think the option to pass -nowarn is generally useful.