It would be nice if the antlr task created the output directory automatically or had an option allowing you to do so. At the moment if the output directory doesn't exist you get a build failure which is a shame.
e.g., <javac> doesn't do this. Why should the (barely-supported) ANTLR task?
javac is very different. The packages themselves do get created by the java compiler. Antlr on the other hand doesen't understand packages even though it is most commonly used to create files in a package. That is why the output directory has to be specified all the way including the package. Antlr is either supported or it isn't? If it is supported I don't see why it would be too much to ask to enhance it a little.
Did you attach a patch with your desired enhancement?
Created attachment 18076 [details] patch to create output directory
I have now attached a patch
In all honesty, I looked into this when the issue was first raised, but found that this task has a testcase that explicitly tests that output dirs are not created. I will reopen and if I or some other committer takes a notion to make the change _and_ augment the junit test, who knows?