ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony R. Milano" <mila...@yahoo.com>
Subject Ant and Emacs compilation
Date Mon, 24 Jul 2000 15:51:35 GMT
I have recently started using Ant for developing some code in
conjuction with Emacs.  I am impressed with Ant's features and believe
that will provide a big help to individuals/companies doing cross
platform developent.

I just subscribed to the development mailing list and I am not sure if
this topic has been brought up or not.  With the new 1.1 release of Ant
the logging or output from the <javac> Task has changed from printing
something like the following:

  ant compile
  Buildfile: build.xml
  Project base dir set to: /home/wida3m/test
  Executing Target: compile
  Compiling TEST using classpath: .:~/TEST:/pk...
  ls.jar:/fmac/users/wida3m/xml4j/xml4j.jar...
  Warning: file modified in the future: D.java
  Compiling 2 source files to /home/wida3m/test
->/home/wida3m/test/Xfer.java:5: '{' expected.
  public class Xf er {

to something like:

  ant compile
  Buildfile: build.xml
  Project base dir set to: /home/wida3m/test
  Executing Target: compile
  Compiling TEST using classpath: .:~/TEST:/pk...
  ls.jar:/fmac/users/wida3m/xml4j/xml4j.jar...
  Warning: file modified in the future: D.java
  Compiling 2 source files to /home/wida3m/test
->[Javac] /home/wida3m/test/Xfer.java:5: '{' expected.
  public class Xf er {

The name of the Task which is running is now printed out along with the
errors from the compiler.  The "[Javac]" prefix which has been added to
the output seems to disrupt Emacs' ability to jump to the corresponding
error line number within the appropriate file.  I made a small work
around in DefaultLogger.java to not print the Task name for the Javac
command but I was not sure if this was a known side effect of the new
Logging output.

I am curious to here any feedback anyone might have.  

Thanks, 
Anthony.

BTW - I believe the code is around line 136 of DefaultLogger.java:
// Filter out messages based on priority
if (event.getPriority() <= msgOutputLevel) {

    // Print out the name of the task if we're in one
    if (event.getTask() != null) {
        String name = event.getTask().getTaskName();

        String msg = "[" + name + "] ";
        for (int i = 0; i < (LEFT_COLUMN_SIZE - msg.length()); i++) {
            out.print(" ");
        }
        out.print(msg);
    }

    // Print the message
    out.println(event.getMessage());
}


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail  Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message