Should maven generate jaxb java code or just use java code from source control?
Posted
by
Peter Turner
on Programmers
See other posts from Programmers
or by Peter Turner
Published on 2014-06-11T17:38:53Z
Indexed on
2014/06/11
21:38 UTC
Read the original article
Hit count: 367
We're trying to plan how to mash together a build server for our shiny new java backend. We use a lot of jaxb XSD code generation and I was getting into a heated argument with whoever cared that the build server should
- delete jaxb created structures that were checked in
- generate the code from XSD's
- use code generated from those XSD's
Everyone else thought that it made more sense to just use the code they checked in (we check in the code generated from the XSD because Eclipse pretty much forces you to do this as far as I can tell).
My only stale argument is in my reading of the Joel test is that making the build in one step means generating from the source code and the source code is not the java source, but the XSD's because if you're messing around with the generated code you're gonna get pinched eventually.
So, given that we all agree (you may not agree) we should probably be checking in our generate java files, should we use them to generate our code or should we generate it using the XSD's?
© Programmers or respective owner