The Apache CXF XJC-Utils subproject provides a bunch of utilities for working with JAXB to generate better or more usable code.

Currently, it consists of the following modules:

cxf-xjc-plugin

Provides a maven wrapper around the JAXB XJC utility

cxf-xjc-dv

Initialize fields mapped from elements/attributes with their default values

cxf-xjc-ts

Implements the toString() method

cxf-xjc-boolean

Generate getters named getXXX() for Booleans instead of isXXX()

cxf-xjc-wsdlextension

Adds extensions methods to allow generated beans to be used as WSDL4J extensors

cxf-xjc-bug671

Provides a workaround for

https://jaxb.dev.java.net/issues/show_bug.cgi?id=671

- Not needed for JAXB >=2.1.12

In CXF versions prior to 2.3.0, the xjc plugins were shaded directly into the big cxf bundle jar. In 2.3.0, they were removed from the jar and are placed individually into the lib directory of the distribution. The xjc plugins are only code generation utilities and not used at all at runtime which is why they were pulled out.

The source code can be checked out anonymously over HTTP by doing:

git clone https://github.com/apache/cxf-xjc-utils.git

or

git clone https://gitbox.apache.org/repos/asf/cxf-xjc-utils.git

Building is similar to the build instructions for the main CXF project.

  • No labels

0 Comments