They're errors. What I meant to say was, "the ant target completes successfully", not the compile. Is there something going on with the way ant compiles java to not write classfiles to disk unless there were no errors?
Main Topics
Browse All TopicsI have a large project (read: lots of other engineers) that I'm trying to set up to use Ant. We all develop with Eclipse, and eclipse seems to have no problem compiling code from projects with broken code in them, until it tries to execute that code.
When I use the following compile job in ant:
<javac srcdir="." destdir="${output-director
<!-- some classpath, excludes would be here, I trimmed them to keep it short -->
</javac>
The compile is successful with errors, however the temp directory (they're in there so I can jar them and delete the dir later) is completely empty.
What gives?
Thanks,
-Tom
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I tried it both ways. The files are getting found and everything, and the same settings work for the other 2 build targets that work fine. It's just the one with errors that causes ant to not make the files.
I've also tried the fork="true" parameter to get it to invoke the compiler directly, but that doesn't work either (though ant reports less errors).
Well, I've figured it out...
The Eclipse internal compiler uses a line-by-line compilation method which can compile "broken" source files by just omitting the lines that have errors on them. The application only goes nuts when you try to execute the broken code.
I'm not sure whether to accept an answer and split the points (since the comments DID lead me to wonder what Eclipse's internal compiler was doing under the hood), or to ask for the question to be closed (since there really isn't a solution to this, and this question probably won't help anyone else).
Unless someone has an objection in the next 1-2 days, I'm gonna request this question be closed.
Thanks to all that helped :)
-Tom
Business Accounts
Answer for Membership
by: girionisPosted on 2005-09-30 at 09:43:20ID: 14993898
> The compile is successful with errors
What errors? If there are errors then the compilation is not successful. Are they errors or warnings?