ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inger, Matthew" <>
Subject RE: APT processor
Date Mon, 19 Jul 2004 13:43:23 GMT
It's possible.  The reason I extended Javac was that Apt has all of the same
command line flags and parameters, and adds a few of it's own to boot.
What i did was to ignore to the compiler attribute:

public Apt() {

public void setCompiler(String compiler) {
   log("Ignoring compiler attribute for the APT task, as it is fixed",

public void setFork(boolean fork) {
   if (fork)

public void execute() throws BuildException {
   if (! JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_5)) {
       throw new BuildException("Apt task requires Java 1.5+");

I will attach the diffs as is to the enhancement request I have
already created.  I'll look into the refactoring if you feel it's

-----Original Message-----
From: Dominique Devienne []
Sent: Monday, July 19, 2004 9:40 AM
To: 'Ant Users List'
Subject: RE: APT processor

> From: Inger, Matthew []
> I've created a task for running the APT processor.  It extends the
> existing javac task, and adds on a few additional attributes which are
> specific to APT. Shall I post the source code changes?

Of course ;-) I think it will take a little time before people wrap their
heads around APT and put it to good use, but I guess so far with JDK 1.5
still being in beta, only a few bleeding edge developers are toying with it.

Please open a BugZilla enhancement, and post there.

Note though that Javac may not be the best candidate to extend, with its
extra Compiler Adapter complexity? Maybe we need an abstract JdkTool base
class? --DD

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

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

View raw message