|
Build scripts with Groovy and Ant : file dependencies: msg#00170lang.groovy.user
Hiall, I'd like to add a new twist to latest discussion. I think Groovy could substantially enhance ANT scripting by supplying a more decent way to "include" files. Problem: when trying to remove duplication from ANT builds, it is tricky to move the duplicated code into an external file and to do "literal" inclusions where it is used (even in ANT 1.6). Until now the only solution that I know is to use external xml enties. But those are rather awkward to use. One gets no Error in case of missing or misspelled references. Proposal: Groovy could have something like the Ruby Kernel method "load" (or "require"). Usage (adapted from the unit tests): ---- ant = new AntBuilder() load 'xdoc_path.groovy' ... --- where xdoc_path.groovy is --- value = ant.path { fileset(dir:"xdocs") { include(name:"*.wiki") } } --- This would help very much with keeping the Ant Scripts managable. cheers Mittie
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Keyword collisions (was: [groovy-user] Re: Java World: Build scripts with Groovy and Ant artcicle), Patrick Mueller |
|---|---|
| Next by Date: | embedding/closures/println, Johan Cloetens |
| Previous by Thread: | RE: Re: Java World: Build scripts with Groovy and Ant artcicle, Laforge Guillaume |
| Next by Thread: | embedding/closures/println, Johan Cloetens |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |