On Sat, Jun 13, 2009 at 3:05 PM, Martin Grotzke < martin.grot...@javakaffee.de> wrote:
> I have one question: What is "sources" for? From my understanding the > sources are generated _in_ (the body of) the generate task (a file task > in this case)? In most (all?) cases the generated sources are derived from something else. For example, you may have a code generator that uses templates or you wrote a grammar for a domain-specific language and you generate lexer/parser code from this grammar (e.g. JavaCC, ANTLR, ...) or maybe you're generating POJOs from a database schema, or some web services stubs from a WSDL definition, etc. By wiring the sources as a dependency on the code generation task, if you change your template or your grammar then the generated source will be regenerated and recompiled automatically. Hope this makes sense now... alex