Closed igler closed 11 years ago
put minOccurs="0" into xsd
The problem is that the XSD files are auto-generated out of COBOL copybooks. Cannot influence that. As I have the source code in my workspace I have uncommented the @NotNull generating lines. Fixes the problem for now...
It would be easy to implement an additional parameter:
same way
was done
Have implemented the corresponding lines in JaxbValidationsPlugins.java. But if I add ':generateNotNullAnnotations=false' to -XJsr303Annotations then no System.out.println(...) are made any more. Same when only adding 'JSR_349=true'. In both cases no @Size etc. are generated any more.
upload it to github.
OK, have uploaded it (or so my Eclipse says). Commit is d99b274b7e2f0be0baf19c3dea2ffc6a1dbe900a.
you have to create a fork, and upload it there - and make sure you upload it to some new branch and not master
OK, forked, branched and committed the code.
nice, now create a pull request https://help.github.com/articles/creating-a-pull-request
OK, done.
Thanks! I will look at it in few hours. Was you able to make it work?
No, the System.out.println(...) are not made. Please take a look where the culprit is or where I have forgotten to implement a feature.
well you had it right, I only changed a default value and some minor things... you can look at https://github.com/krasa/krasa-jaxb-tools-example
your changes are now in snapshot repository
by the way, important thing is to run clean, because otherwise nothing will be regenerated.
How can I merge this into my fork? Or shall I delete my fork again and use yours?
do not delete it. https://help.github.com/articles/syncing-a-fork
so it would be: git remote add upstream https://github.com/krasa/krasa-jaxb-tools.git git fetch upstream git checkout master git merge upstream/master
As I use the Eclipse/Git Plugin and I am new to git: Is everything merged correct now?
it seems so.
Shall I delete my branch 'igler' again?
it is up to you
ok, deleted it. I can re-branch when I have new suggestions.
A piece of generated Java code looks like this: @XmlElement(required = true) @NotNull @Digits(integer = 5, fraction = 2) protected BigDecimal mask02Mgbeitrag;
Is it possible to suppress the @NotNull generation? It's because JSF complains that the 'mask02Mgbeitrag' is null. But as it is used for a form-based-query, it may be null.