annox

“http://annox.dev.java.net” customizations require the “-Xannotate” switch

谁都会走 提交于 2020-01-02 06:52:52
问题 I am trying to run a real schema through hyperjaxb. I have tested the schema repeatedly using jaxb, and jaxb imports the schema correctly every time. However, when I try to get hyperjaxb to generate hibernate-annotated java classes from the same schema, I get the following error: [ERROR] Error while parsing schema(s).Location [ file:/C:/path/to/src/main/resources/schema.xsd{4,32}]. org.xml.sax.SAXParseException; systemId: file:/C:/path/to/src/main/resources/schema.xsd; lineNumber: 4;

JAXB separate episodes with annox customizations fails : SAXParseException2

泄露秘密 提交于 2019-12-20 03:07:43
问题 I have 2 maven modules. First one contains only a xsd schema to generate base POJO classes. Second on contains a xsd schema that imports first one with a catalog file and generate new POJO classes. Both generation works. Now, I add annotations to both xsd files with annox (Swagger annotations). First module compilation succeeded but seconds module compilation fails with and exceptions : [ERROR] Error while generating code.Location : com.sun.istack.SAXParseException2; systemId: jar:file:/C:

Adding annotations to package-info generated by JAXB

余生长醉 提交于 2019-12-11 12:34:28
问题 I have been using annox to add annotations on my jaxb-generated classes (through bindings files) but I can't find a way to add annotations directly on the package (package-info.java). I've been trying to do something like this in my bindings.xml: <jaxb:schemaBindings> <jaxb:package name="my.package"> <annox:annotate> <annox:annotate annox:class="my.Annotation" /> </annox:annotate> </jaxb:package> </jaxb:schemaBindings> but jaxb complains that annox:annotate is not expected to be there. Is

JAXB separate episodes with annox customizations fails : SAXParseException2

≯℡__Kan透↙ 提交于 2019-12-01 23:09:41
I have 2 maven modules. First one contains only a xsd schema to generate base POJO classes. Second on contains a xsd schema that imports first one with a catalog file and generate new POJO classes. Both generation works. Now, I add annotations to both xsd files with annox (Swagger annotations). First module compilation succeeded but seconds module compilation fails with and exceptions : [ERROR] Error while generating code.Location : com.sun.istack.SAXParseException2; systemId: jar:file:/C:/commons-0.0.1-SNAPSHOT.jar!/Commons.xsd; lineNumber: 15; columnNumber: 36; compiler was unable to honor

Suppress compiler warnings on JAXB generated classes

我的未来我决定 提交于 2019-12-01 15:59:39
This is possibly a duplicate of this question ( Avoiding Compiler warnings on code generated by xjc ) but since I am not very well versed in XJC/JAXB custom bindings idiosyncrasies, I'll presume I may have misunderstood the mentioned question. My question seems simple enough - how can I add @SuppressWarnings("all") annotation to generated JAXB class? We have 0 warning policy on our project and after JAXB generation step, we end up with 350+ warnings which are just terrible noise. I would expect either a simple flag on the XJC or at least an easy way to provide such info but I cannot find any.

Suppress compiler warnings on JAXB generated classes

可紊 提交于 2019-12-01 14:57:38
问题 This is possibly a duplicate of this question (Avoiding Compiler warnings on code generated by xjc) but since I am not very well versed in XJC/JAXB custom bindings idiosyncrasies, I'll presume I may have misunderstood the mentioned question. My question seems simple enough - how can I add @SuppressWarnings("all") annotation to generated JAXB class? We have 0 warning policy on our project and after JAXB generation step, we end up with 350+ warnings which are just terrible noise. I would expect

JAXB schema to Java Different XmlRootElement name and Class name

限于喜欢 提交于 2019-11-29 15:06:14
I have a xsd schema from which I'm generating some java classes. I'm using jaxb for the generation. I want to be able to generate a class annotated with @XmlRootElement , but I want the @XmlRootElement name property to be different than the name of the generated class. In my xsd I'm defining the following: <xs:element name="customer"> <xs:complexType> <xs:sequence> .... </xs:sequence> </xs:complexType> </xs:element> This piece of code generates the following java class: @XmlRootElement(name = "customer") public class Customer { ... } The name property of the @XmlRootElement is the same as the

How to use jaxb2-annotate-plugin with XJC in command line

两盒软妹~` 提交于 2019-11-29 14:54:24
I'm building java classes based on an xsd using "jaxb-ri" in command line (xjc.bat). I want to set a namespace in an XmlType annotation using jaxb2-annotate_plugin but I don't know how to add this plugin to xjc classpath and acitvate it. here is my external bindings.xjb file : <jxb:bindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:annox="http://annox.dev.java.net" jxb:extensionBindingPrefixes="xjc annox" version="2.1"> <jxb:bindings schemaLocation="myschema.xsd" node="/xs:schema"> <jxb:bindings

How to use jaxb2-annotate-plugin with XJC in command line

空扰寡人 提交于 2019-11-28 09:08:47
问题 I'm building java classes based on an xsd using "jaxb-ri" in command line (xjc.bat). I want to set a namespace in an XmlType annotation using jaxb2-annotate_plugin but I don't know how to add this plugin to xjc classpath and acitvate it. here is my external bindings.xjb file : <jxb:bindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:annox="http://annox.dev.java.net" jxb:extensionBindingPrefixes=

JAXB schema to Java Different XmlRootElement name and Class name

喜夏-厌秋 提交于 2019-11-27 07:53:11
问题 I have a xsd schema from which I'm generating some java classes. I'm using jaxb for the generation. I want to be able to generate a class annotated with @XmlRootElement , but I want the @XmlRootElement name property to be different than the name of the generated class. In my xsd I'm defining the following: <xs:element name="customer"> <xs:complexType> <xs:sequence> .... </xs:sequence> </xs:complexType> </xs:element> This piece of code generates the following java class: @XmlRootElement(name =