Mirror of Apache CXF

Clone this repo:
  1. e339672 Bump org.apache.maven.plugins:maven-jar-plugin from 3.5.0 to 3.5.1 (#352) by dependabot[bot] · 7 days ago main
  2. 827f27e Bump github/codeql-action from 4.37.0 to 4.37.3 (#353) by dependabot[bot] · 7 days ago
  3. 59603e6 Bump github/codeql-action from 4.36.2 to 4.37.0 (#350) by dependabot[bot] · 3 weeks ago
  4. 9557e17 Bump org.apache:apache from 38 to 39 (#348) by dependabot[bot] · 5 weeks ago
  5. d114446 Bump org.javassist:javassist from 3.31.0-GA to 3.32.0-GA (#347) by dependabot[bot] · 5 weeks ago

Apache CXF XJC Utils

A collection of XJC (JAXB XML-to-Java compiler) plugins and utilities for use with Apache CXF. These extensions augment CXF's code generation pipeline when compiling XML Schemas and WSDL files into Java.

Modules

ModuleDescription
bug671Fix for XJC bug 671 — corrects generated code for certain schema patterns
bug986Fix for XJC bug 986 — corrects generated code for certain schema patterns
dvData validation plugin — annotates generated classes with Bean Validation (JSR-303) constraints derived from XML Schema facets (e.g. minLength, maxOccurs, pattern)
tsType substitution plugin — enables proper handling of xsi:type substitution in generated code
wsdlextensionWSDL extension utilities — supports additional WSDL processing during CXF code generation

Usage

The plugins are applied via the cxf-codegen-plugin Maven plugin. Add the desired artifact as a plugin dependency:

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <dependencies>
    <dependency>
      <groupId>org.apache.cxf.xjcplugins</groupId>
      <artifactId>cxf-xjc-dv</artifactId>
      <version>${cxf-xjc-utils.version}</version>
    </dependency>
  </dependencies>
</plugin>

Then activate the plugin in your wsdl2java configuration:

<configuration>
  <defaultOptions>
    <extraargs>
      <extraarg>-xjc-Xdv</extraarg>
    </extraargs>
  </defaultOptions>
</configuration>

Requirements

  • Java 11+
  • Maven 3.x
  • Apache CXF 4.x (for the matching release line)

Building from Source

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

License

Apache License, Version 2.0. See LICENSE for details.