jaxb-tools
jaxb-tools copied to clipboard
Should fail if bindings file isn't found
If you hardcode a xjb filename and it isn't found, the compilation should fail.
I've put a wrong path and suffered to understand why my generated files were not correct.
How did you define your bindings? Please post your pom.xml (or a fragment).
bindingIncludes and likes are patterns, not file names, so this works as designed/documented.
I've put just the name of the fine.
If a pattern is specified and nothing is found, I think it is an error. It should at least inform the user that something is strange.
I wouldn't have spent so much time with a Simple problem
Paulo Eduardo Neves
Em 27 de abr de 2017 4:26 AM, "Alexey Valikov" [email protected] escreveu:
How did you define your bindings? Please post your pom.xml (or a fragment).
bindingIncludes and likes are patterns, not file names, so this works as designed/documented.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/highsource/maven-jaxb2-plugin/issues/123#issuecomment-297633889, or mute the thread https://github.com/notifications/unsubscribe-auth/AANfnN37qkxrSiSarTe8DSa8ddzsURqSks5r0EM-gaJpZM4NJgIX .
If a pattern is specified and nothing is found, I think it is an error. It should at least inform the user that something is strange.
A pattern is actually always specified (convention over configuration) and it's OK not to have any binding files so it should not be an error if nothing is found.
I'm sorry it took you too much time. But you seem to choose not to follow conventions. It is fine, but then it's your responsibility to make sure things work.
I agree with Paulo, if you define a binding, that implies you expect it to exist and be taken into account. If the plugin cannot find it, then it should display a warning, if not bring the plugin to a halt entirely. Of course, this could also be a configurable property, something like <failOnMissingBinding> would work pretty nicely.