jaxb-tools icon indicating copy to clipboard operation
jaxb-tools copied to clipboard

Should fail if bindings file isn't found

Open pauloneves opened this issue 8 years ago • 4 comments
trafficstars

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.

pauloneves avatar Apr 26 '17 22:04 pauloneves

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.

highsource avatar Apr 27 '17 07:04 highsource

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 .

pauloneves avatar Apr 27 '17 17:04 pauloneves

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.

highsource avatar Apr 27 '17 20:04 highsource

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.

DrPeroxide avatar Nov 01 '18 16:11 DrPeroxide