I'm currently using cxf 2.4.0 and my code is a caller to a webservice. I was able to generate the client side java files using the cxf plugin in Maven. My question is what is the best practice for the generated files? Should I compile the generated files and package the generated class files into a single jar file or should I include all of the generated java files in the build path?
I get CXF to generate the code under target, it picks target/generated-sources/cxf by default, which is good by me. (If you're using xjc for handling a schema, it uses a similar scheme. Maven is great for conventions!)
What I sometimes do is put the generated code in its own maven module, which can sometimes simplify things; Eclipse is not entirely happy with generated source code (it doesn't like the fact that cleaning rips the source code out from under it's feet) so corralling that out of sight makes things much simpler. After all, it's just a library that happens to be generated from a WSDL document…
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With