Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.56 KB

File metadata and controls

37 lines (26 loc) · 1.56 KB

jaxb-tolerant-reader-plugin-test-person

Test project to demonstrate usage of Tolerant Reader Plugin.

Table of Contents

Execution

This test project is part of maven-invoker-plugin integration tests. It contains configuration placeholders and it is therefore not executable as-is.

Run mvn integration-test on jaxb2-tolerant-reader to generate an executable project from this project.

The invoker plugin filters resources and creates an executable project below target/it/person. That project can also be imported into an IDE.

Execution Results

Note that the generated Person class has no getExtra and setExtra methods. That is the effect of the tolerant-reader configuration in src/main/wsdl/bindings.xjb, which does not include the extra property of Person:

<jxb:bindings schemaLocation="Person.xsd">
	<tr:include packageRoot="com" bean="Person"
		properties="name age shippingAddress"/>       <-- no 'extra' property
	...
</jxb:bindings>

The maven-jaxb2-plugin has an Eclipse lifecycle integration, therefore you can immediately see the effect of the tolerant-reader plugin by editing the bindings.xjb file. For instance, if you remove the shippingAddress property:

<jxb:bindings schemaLocation="Person.xsd">
	<tr:include packageRoot="com" bean="Person"
		properties="name age"/>                       <-- shippingAddress removed
	...
</jxb:bindings>

Then the Person class below target/generated-sources/xjc will be updated accordingly, i.e. the getShippingAddress and setShippingAddress will be removed.