We currently build our java app using ant.
My goal is to find a way to identify which file caused the build to fail.
What I could do-
- Parse for everything that has “.java” in it.
- Filter out everything that has “.java:number: warning”
- Parse that line for the file, line, and reason.
This isn’t that hard… but it seems a bit non-robust. (A better word currently escapes me. maybe “bad”)
Too bad there isn’t anyway to have it output in XML? Or maybe there is?
EDIT: One of the assumptions of this project were that we wouldn’t want to do builds on every change, but now that I’ve worked with jenkins a bit, I am thinking that this might actually be possible.
I don’t think there is. Probably one of the reasons Eclipse has its own compiler.
You can limit the problem by having your own ant task (so you have more control about output formatting and won’t have to parse the whole ant output).
If you are designing a build system pulling the sources out of a source control (you tagged jenkins), an easier option is to list the changes between the last successful build and the broken ones.
What are you trying to accomplish?