Reputation: 1001
I'm using Elcipse's AntRunner to excute the Ant task. When performing the javac task,if any compilation error occurs, I'm getting the following error messge in the console
C:\build.xml:41: Compile failed; see the compiler error output for details.
What I need to do for displaying the actual compilation errors on the console? How to I can log the same in a file? . Thanks
Upvotes: 0
Views: 1178
Reputation: 1001
When Eclipse AntRunner has used, in order to show the Compilation errors on the console The
addBuildListener API can be used.
Create a class which extends the org.apache.tools.ant.DefaultLogger. For example
Class MyLogger extends DefaultLogger {
// All overridden method implementation goes here
}
// To use with AntRunner:
AntRunner antRunner = new AntRunner();
antRunner.addBuildListener(MyLogger.class.getName());
Upvotes: 0
Reputation: 895
I haven't used Ant eclipse plugin, but I think this could be caused by lack of feature within the plugin, not the Ant itself.
If you can run Ant from the terminal (or command prompt on windows), try run ant -verbose
for Ant to output more information.
Upvotes: 1