ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simeon Kirov" <ski...@netxtras.net>
Subject Javac not firing BuildEvents for compile errors in JDK 1.4
Date Wed, 23 Apr 2003 02:57:15 GMT
Hi,

It seems, that BuildLogger.messageLogged(BuildEvent) method is never invoked
under JDK 1.4 when a compiler error occures.

In my specific case, I'm using JEXT editor with AntWork plugin. This
configuration worked fine under JDK 1.3, but after I switched to JDK 1.4,
the plugin stopped reporting errors. The code in the plugin, responsible for
monitoring build process looks like this:

private class AntWorkLogger implements BuildLogger {

    ....

    public void messageLogged(BuildEvent event) {
        if (event.getPriority() <= msgOutputLevel) {

            if (event.getTask() != null) {
                String name = event.getTask().getTaskName();

                if (name.compareTo("javac")==0) {

                    ....

                }
            }
        }
    }
}

After a little debugging, it appeared, that messageLogged(BuildEvent) is
never invoked, when compiler encounters errors in the code. However, the
java compiler reports errors and dumps them on System.out.

I tried to compile the project directly with ant and everything seemed to be
ok, the errors reported as they should be.

So I recompiled AntWork plugin, setting it to use
org.apache.tools.ant.DefaultLogger instead of AntWorkLogger. The result was
the same - no errors were reported by DefaultLogger.

Does anybody had the same problem? Any ideas?

Regards,
Simeon


Mime
View raw message