title: How to make ant put a package directive in several source files?
body: <p>I'm using Antlr4 to build a parser and I'm using Netbeans as an IDE and <code>ant</code> as a build system. Ant runs Antlr which generates a <code>parser.java</code> and <code>lexer.java</code> in the project's <code>src/</code> directory. </p>
  
  <p>They both need a package directive, and so I have to add it by hand. </p>
  
  <p>Is there a way to prepend a line of text to all source files in a directory with Ant? Or are there any other solutions to this? (Maybe with Antlr?)</p>