Is there any clearly explained and simple way to see the compiler output when running javac
through an Ant task?
Here is my javac
Ant tag:
<javac srcdir="${myproject.src}" destdir="${myproject.class}">
<!-- ... -->
</javac>
Here is the only error message I get:
/path/to/build.xml:42: Compile failed; see the compiler error output for details.
The problem is that I don't know how to see the compiler error output for details…
Few configuration elements that may help:
- Ant 1.6.5
- Windows 7 x64
- Java 1.6.0_20 x32
- Launching targets via Eclipse
I know there are some related answered questions on SO, but none of them really answers this simple questions:
- https://stackoverflow.com/a/1275552/1225328: I can't add the specific library that allows the
compile
tag; - https://stackoverflow.com/a/1264622/1225328: this manages Ant's output rather than the compiler's one;
- Compile failed; see the compiler error output for details: too vague to solve anything;
- Ant : Compile failed; see the compiler error output for details: no answer…
- etc.
Best Answer
I think you're looking for the
verbose="true"
attribute.You already mentioned in the comments that this doesn't print the cause of your error. Well I think something else is going on in your situation. I have a sample project and either way the cause of my error was printed. Here's the output with
verbose="false"
:Something strange and specific to your code is causing the bad error message. Can you create a sample project that reproduces the error?
As you mentioned,
debug="true"
is not the attribute you're looking for.You know when you get stack trace and it has line numbers in it? That's what
debug="true"
does. If it's off, you don't get line numbers.