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
Combine JAXWS and JAXB bindings
I'm customizing JAXB beans generated by an WSDL file with jaxws-maven-plugin. To customize them I'm using a binding file.
Basically I want:
Prevent the generation of JAXBElement
Customize some element names
My bindings file is:

lujop
- 13,504
- 9
- 62
- 95
2
votes
1 answer
Remove @XmlElement annotation while generating pojo from XSD
I've a requirement to bind the XML content to String attribute of my pojo, and for that I've created my custom DomHandler to extract required part, something like below
red
here is content with…

Akhil
- 1,184
- 1
- 18
- 42
2
votes
1 answer
jaxb episodic compilation with maven
I am trying to execute the maven-jaxb2-plugin-sample-episode-0.7.4 (explained here and with a download available) to try separate schema compilation. Despite it compiles the first schema (A), it fails in the second one (B) because it is not able to…

Guido
- 46,642
- 28
- 120
- 174
2
votes
0 answers
How to generate ArrayList access methods in Java classes by JAXB through XSD
I am trying to replace XMLBeans with JAXB. Currently XMLBeans generates sizeOf, new and add methods for maxoccur = unbound.
Through JAXB I am able to generate Java classes and interfaces containing getter and setter methods but ArrayList access…

Madhur
- 21
- 1
2
votes
1 answer
Two classes have the same XML type name maven jaxb plugin , Spring
I have some control over some of my schemas so my question is a little different than the ones similar to this. I have three schemas, c.xsd imports b.xsd, b.xsd imports a.xsd. All three have different namespaces.

noobjob
- 41
- 4
2
votes
1 answer
Unsupported binding namespace exception for vendor specific namespace
I have a Vendor.xsd, where the namespace definition is referencing a vendor specific namespace http://vendor.com/xjc-plugins. A snippet is given below:
...

theo
- 915
- 1
- 9
- 28
2
votes
0 answers
JAXB Unmarshalling Exception
EDITS AT THE BOTTOM
Currently experiencing one error after another. It seems I make a step forward and have to take 2 steps back :) Unfortunately I have nobody locally that I can pair with so a lot of my debugging is being done over Google and…

user1818298
- 509
- 2
- 8
- 23
2
votes
2 answers
getting error only one globalBindings customization is allowed in a whole compilation while using maven-jaxb2-plugin
I am using maven-jaxb2-plugin. Here is my plugin configuration
org.jvnet.jaxb2.maven2
maven-jaxb2-plugin
xjc-serviceoperations
…

Basit
- 8,426
- 46
- 116
- 196
2
votes
1 answer
Import JAXB binding snippet into other binding file
For a certain xsd file, I have created a corresponding binding file that does some actions. In my case, annotating ComplexTypes with annotations. Finding the type is done with an XPath expression. The following example demonstrates…

Jaims
- 1,515
- 2
- 17
- 30
2
votes
2 answers
jaxb2-annotate-plugin: Adding annotations to the XJC classpath
Is it possible to add custom annotations to the XJC classpath, while they are defined within my project itself? This when using the maven jaxb2-annotate-plugin.
The problem regards this piece of the documentation:
Annotation classes must be known…

Jaims
- 1,515
- 2
- 17
- 30
2
votes
1 answer
Multiple are defined for the target namespace when defining package
I have 3 XSD's in my project. Two in the namespace "A" and one in namespace "B".
I want to generate XSD-1, XSD-2 (same namespace) into one package.
Then generate XSD-3 in to an different package.
I am trying to do this via the bindings.xjb file.
If…

jeff porter
- 6,560
- 13
- 65
- 123
2
votes
1 answer
Getter for boolean variable with maven-jaxb2-plugin
I am working to generate stub files from xsd. However the stub files generated have boolean getters generated as isXX() instead of getXX().
public class Task{
@XmlAttribute(
name = "IsFailure"
)
protected Boolean isFailure;
public…

Nikhil Ambekar
- 110
- 2
- 9
2
votes
1 answer
maven-jaxb2-plugin not generating sources
It would be great if someone could help me with this. I am new to Maven. When executing generate-sources or compile Maven is quiet about it and nothing gets generated.
...
…

user1611728
- 446
- 6
- 13
2
votes
1 answer
maven-jaxb2-plugin maven generation sun-jaxb.episode
I want to remove comments inside generated files through maven-jaxb2-plugin.
I tried:
true
and
-no-header
It boths works for java classes, but doesn't…

RoD
- 464
- 2
- 11
- 23
2
votes
1 answer
getting error The namespace of element bindings must be from the schema namespace while using maven-jaxb2-plugin in eclipse
I have different .xsd files and I want to generate java classes from them in different packages. I configure maven maven-jaxb2-plugin as following
org.jvnet.jaxb2.maven2
…

Basit
- 8,426
- 46
- 116
- 196