I turns out that a one-line addition to DefaultCompierAdapter was all that
was required to see the file names printed. If there was sufficient
interest, I could build a patch. I would add an additional attribute to
<javac>, say printcompilenames="true", or whatever, and switch the print on
that.
Thanks,
-- Chris
> -----Original Message-----
> From: Nico Seessle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 14, 2001 1:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Printing file names from javac
>
>
> ----- Original Message -----
> From: "Christopher Berry" <[EMAIL PROTECTED]>
> To: "Ant-User (E-mail)" <[EMAIL PROTECTED]>
> Sent: Wednesday, June 13, 2001 9:39 PM
> Subject: Printing file names from javac
>
>
> > I have gotten used to not seeing this with Ant, but I understand the
> desire
> > to have this information displayed. Seeing the message; "
> 22 files were
> > compiled" is not nearly as meaningful as "compiling class1.java,
> compiling
> > class2.java, ..."
> >
> > Is there a way (short of writing a custom Javac Task) to
> get this info.
> Note
> > that they do *not* want verbose output.
>
> This depends on the compiler you are using to compile your
> sources. Ant is
> only a wrapper around javac, it does not implement a compiler itself.
>
> Using javac (from JDK 1.3.1/1.4, maybe others) this could be
> done using
> the -verbose argument (which seems to be supported by Ant, see the
> documentation).
>
> But I don't think that an output like
>
> D:\temp>javac -classpath C:\VAMOS50\lib\orajdbc.jar -verbose
> HelloWorld.java
> [parsing started HelloWorld.java]
> [parsing completed 280ms]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/Object.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/String.class)]
> [checking HelloWorld]
> [loading
> C:\VAMOS50\lib\orajdbc.jar(oracle/jdbc/driver/OracleDriver.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/sql/DriverManager.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/sql/Driver.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/sql/Connection.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/util/Properties.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/Exception.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/Throwable.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/System.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/io/PrintStream.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/io/OutputStream.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/Error.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/sql/SQLException.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/RuntimeException.class)]
> [loading D:\jdk14\jre\lib\rt.jar(java/lang/StringBuffer.class)]
> [wrote HelloWorld.class]
> [total 1132ms]
>
> is really useful, especially for large projects where you
> compile more than
> one class, so you may need to write you own task (or extend
> the javac-task)
> to filter out the "useful" lines.
>
> Nico
>
>