This Maven 2 plugin wraps the JAXB 2.x XJC compiler and provides the capability to generate java sources from schemas.
Questions tagged [maven-jaxb2-plugin]
325 questions
2
votes
1 answer
jaxb2-maven-plugin generates invalid source for doubles with default value =INF
I have a problem where the jaxb2-maven-plugin generates invalid source code when the XSD file contains default values for doubles.
I use the jaxb2-maven-plugin (org.codehaus.mojo) version 1.5:
org.codehaus.mojo
…

reto
- 9,995
- 5
- 53
- 52
2
votes
1 answer
Unable to generate JAXB artifacts due to WSDL import
I am having a WSDL (lets say one.wsdl ) from which I want to generate JAXB artifacts using maven plugin. one.wsdl imports another wsdl (two.wsdl ) . When I am running the maven plugin to generate the JAXB artifacts , looks like its not recognizing…

KBR
- 464
- 1
- 7
- 24
2
votes
1 answer
jaxb, xsd import not recognized
I have a big problem with jaxb plugin. I have a project A where I have src/main/resources/xsd/common.xsd file. In this project I use cxf-xjc-plugin
to generate java classes. I have also my episod file under src/main/resources/META-INF called…

Unyx
- 97
- 2
- 8
2
votes
1 answer
packagename doesnt contain ObjectFactory.class or jaxb.index
While deploying my project to a tomcat-server, I get constantly this exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshaller': Invocation of init method failed; nested exception is…

Kornelito Benito
- 1,067
- 1
- 17
- 38
2
votes
1 answer
JAXB marshalling CDATA with Maven plugin
This is my general problem: I want everything to be automated as much as it can be.
This is my specific problem: I want to marshal/unmarshal CDATA. I know that I can specify my own adapter as here. For building process I use Maven and its…

Martin D
- 667
- 1
- 10
- 25
2
votes
0 answers
jaxb2-maven-plugin generate only a select few classes
I have a XSD file that contains many many types, most of which I do not need. However, I do not have the ability to currently trim it down to just what I need. So that being said, Is there a way to tell the jaxb2-maven-plugin to only generate a…

Super_user_one
- 77
- 1
- 1
- 6
2
votes
1 answer
JAXB separate episodes with annox customizations fails : SAXParseException2
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…

Nelson G.
- 5,145
- 4
- 43
- 54
2
votes
2 answers
How to add custom repository to maven-jaxb2-plugin
I'm using a maven-jaxb2-plugin (org.jvnet.jaxb2.maven2) to generate resources and xjb bindings to add annotations to generated beans.
Those annotations have to be included into plugin's classpath so I'm using dependencies section.
If some of those…

Azee
- 1,809
- 17
- 23
2
votes
2 answers
Issue with generate JAXB classes with value constructors
I have to generate classes from XML Schema file using JAXB in Ant script. When I did it in default way, everything went good. Later I realized that I need value constructor for each class. I tried to use value-constructor plugin for XJC but when I…

Paweł
- 31
- 1
- 6
2
votes
1 answer
How to inherit Maven plugin entry in child POM
I added the following plugin in my child POM and its working correctly.
If i add the same plugin in my parent POM its not working and i want this to be added in my parent POM and inherit this in my child POM.
Can you please help how to do…

sea
- 113
- 8
2
votes
1 answer
Not able to generate annotation through maven jaxb plugin
I am trying to add javax.persistence.Id as an annotation to a filed and generate as Java objects through Maven JAXB plugin. However I run into class not found exception for javax.persistence.id I did make sure that the javax.persistence is included…

lazyguy
- 963
- 1
- 13
- 33
2
votes
2 answers
JAXB generate classes from xsds always have @XmlElement(required=true)
I have my xml schema defined as below

davy_wei
- 139
- 13
2
votes
0 answers
Missing create methods for generated classes in ObjectFactory
We use jaxb2-plugin to generate some classes and we depend on Object factory while creating JaxbContext.
org.jvnet.jaxb2.maven2
maven-jaxb2-plugin
…

karephul
- 1,473
- 4
- 19
- 36
2
votes
2 answers
How to generate beans with persistence mapping from xsd`s?
I would like to ask such question, I have XML xsd`s, which generate beans with org.jvnet.jaxb2.maven2 ,
but now I need to add to these beans java.persistence mapping.
Which is the best way?
here is example of xsd:
...

Gytis
- 403
- 1
- 4
- 14
1
vote
0 answers
Enforcement of attribute order in JAXB value constructor
I'm using the Maven jaxb2 plugin to generate a default value constructor for my generated JAXB classes. The problem that I'm having is that the ordering of the attributes/fields changes on different calls to generate-sources, and this changes the…

Jaryn C.
- 65
- 1
- 6