Questions tagged [jaxb2-maven-plugin]

This plugin uses JAXB2 to generate Java classes from XML Schemas (and binding files) and to create XML Schemas for existing Java classes.

The Java Architecture for XML Binding (JAXB) enables translation between Java classes and XML documents. JAXB2 is specified by JSR-222.

The JAXB-2 Maven Plugin requires Maven 2+ and JDK 1.5+ and makes use of the JAXB Binding Compiler (xjc)

The plugin defines two main goals (see official documentation for more goals)

  • jaxb2:xjc - runs the xjc compiler to generate Java classes from XML Schema(s) and binding file(s)
  • jaxb2:schemagen - generates XML Schemas from JAXB annotated Java classes
173 questions
0
votes
1 answer

Jaxb2-annotate-plugin does not work with episodes

I am trying to enforce enum validation for my generated JAXB classes, but I am having some issues with getting them bound. The basic XSD setup is: -enumsXSD -2 other XSDs that import this XSD To provent duplication of my classes I am using…
0
votes
1 answer

How to use Camel-SOAP unmarshal

Hi I am trying to use Camel-SOAP component to unmarshal a soap message, sent using MQ. But I can't figure out how to use ServiceInterfaceStrategy required by and SoapJaxbDataFormat I'm using maven-jaxb2-plugin to generated my JAXB beans, using the…
Kasper Odgaard
  • 113
  • 2
  • 10
0
votes
1 answer

JAXB2 schemagen syntax error when passing from JDK7 to 8

I'm trying to build a Confluence plugin with Java 8. It builds correctly with Java 7. It uses the jaxb2-maven-plugin, where one of the defined executions with goal "schemagen" and phase "generate-resources" is throwing this error: [ERROR] Failed to…
0
votes
2 answers

jaxb2-maven-plugin an m2e connector

After clean checkout/clone from repo, I get this error in eclipse on the execution of the jaxb2-maven-plugin xjc goal. After "Update Maven Configuration" the code is still not generated. In my neon3 eclipse(4.6.3) I have installed the m2e…
laci
  • 86
  • 1
  • 5
0
votes
1 answer

JAXB XML unmarshal with / in attribute value

I'm having an issue unmarshaling an XML file when some special characters as "/" are included inside one attribute's value like this one: I'm using the libraries woodstox-core (v5.0.3) and stax2-api…
Daniel Rodríguez
  • 548
  • 1
  • 10
  • 30
0
votes
2 answers

Unable to create java classes using codehaus.mojo jaxb2-maven-plugin

I have a spring based web application in which I am trying to consume a SOAP service. I am using jaxb2-maven-plugin(org.codehaus.mojo) for that. However I see an empty jaxb2 folder which is crated under target and I dont see any java classes in it.…
RRN
  • 61
  • 1
  • 5
  • 13
0
votes
0 answers

Generated code from xsd won't compile

I'm using this maven plugin: org.codehaus.mojo jaxb2-maven-plugin 2.3.1 and an xsd that I have been provided with. The code generation process…
Dave Richardson
  • 4,880
  • 7
  • 32
  • 47
0
votes
0 answers

jaxb2-maven-plugin 2.2 not generating package structure as per jaxb:package tag

We are using jaxb2-maven-plugin 1.3 with binding files having jaxb:package tag so that plugin can generate proper directory structure. Now we want to update it to version 2.2. Although it is generating classes package structure is not as per the…
0
votes
1 answer

Jaxb unmarshalling of abstract list in abstract class

I am using jaxb plugin (rg.jvnet.jaxb2.maven2) to generate my java classes. So ,I am using xsd which automatically generates java classes. I want my solution to be abstract. I have a XML
user2985842
  • 437
  • 9
  • 24
0
votes
1 answer

Generating classes using multiple xsd schema with duplicate class entry

I have multiple xsd schema file which contains multiple/common duplicate xs:element / class entry. I tried them converting into classes using following lines in pom.xml
Shashi Ranjan
  • 1,491
  • 6
  • 27
  • 52
0
votes
1 answer

jaxb2 simplify plugin for xs:choice having same types

I'm trying to use jaxb2 basics simplify plugin for my schema to JAXB conversion. It works fine for the complex types like below. Each element is defined inside the xs:choice has different types (type1 and type2). sample.xsd (complex choice type with…
ulab
  • 1,079
  • 3
  • 15
  • 45
0
votes
2 answers

Integration of jaxb2-maven-plugin with JUnit4

I am trying to execute a simple JUnit test in order to marshall/unmarshall some data. Here is the definition of the 'data' : @XmlRootElement(name = "data") @XmlAccessorType(XmlAccessType.FIELD) public class Data { public Data(){} …
Santana6.35
  • 198
  • 1
  • 3
  • 15
0
votes
1 answer

Using JAXB to load FpML 5.7 using Maven

I have been struggling to generate java files from FpML 5.7 recordkeeping recommendation. Any help is appriciated. I have followed http://www.stephennimmo.com/generate-java-objects-for-fpml-using-jaxb-and-maven-the-easy-way/ and FpML 5.3 JAXB…
mediumpike
  • 33
  • 7
0
votes
0 answers

Unable to find the mojo 'xjc' in the plugin 'org.codehaus.mojo:jaxb2-maven-plugin'

I've been compiling my project happily for over a year now with Maven and suddenly today I'm getting the error mentioned in the title, ie : Unable to find the mojo 'xjc' (or one of its required components) in the plugin…
Sandy
  • 547
  • 3
  • 9
  • 20
0
votes
2 answers

jaxb2-maven-plugin fails on Jenkins

The configuration below works perfectly when I build my project using the command mvn clean package, but when I run the same command on Jenkins it produces an error message (bottom). I've tried to reconfigure by changing without any…
izilotti
  • 4,757
  • 1
  • 48
  • 55
1 2 3
11
12