ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Curt Arnold" <>
Subject Re: preprocessing java source
Date Sun, 08 Sep 2002 06:00:29 GMT
didge wrote:

> Essentially, I subclassed the Javac ant task, and used Velocity to
> preprocess each file as if they were template files. Then, I let Javac
> continue to compile just the preprocessed files.


> On the bummer side, you must use ant to build effectively.  This is
> mitigated a bit by the fact that most IDEs now let you execute your ant
> targets directly, but you have to be smart about debugging.  You can no
> longer debug against the original source, you now have to go against the
> source in the temporary directory, unless your java-commented VTL is very
> carefully written.

What would be the disadvantage as doing the preprocessing as a distinct task
before the current <javac> task?

You may still be able to IDE develop if you worked on the preprocessed file
and then merged the new preprocessed file with the original source file
using the preprocessed version of the original file as the base to create a
new version of the source.  It might be a good companion task that would
incorporate changes in the preprocessed code into the source tree using
CVS's merge utility.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message