This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch coheigea/README
in repository https://gitbox.apache.org/repos/asf/cxf-xjc-utils.git

commit 95bd4d0d760d5123330a86e74645f6e73e857ecf
Author: Colm O hEigeartaigh <[email protected]>
AuthorDate: Wed Oct 21 07:39:32 2026 +0100

    Improving README
---
 README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 54 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index 6879dfd..95b94de 100644
--- a/README.md
+++ b/README.md
@@ -4,17 +4,30 @@ A collection of XJC (JAXB XML-to-Java compiler) plugins and 
utilities for use wi
 
 ## Modules
 
-| Module | Description |
-|---|---|
-| `bug671` | Fix for XJC bug 671 — corrects generated code for certain schema 
patterns |
-| `bug986` | Fix for XJC bug 986 — corrects generated code for certain schema 
patterns |
-| `dv` | Data validation plugin — annotates generated classes with Bean 
Validation (JSR-303) constraints derived from XML Schema facets (e.g. 
`minLength`, `maxOccurs`, `pattern`) |
-| `ts` | toString plugin — adds a `toString()` to generated classes that 
prints the value of every field (using `cxf-xjc-runtime` at runtime). This 
includes any sensitive data, such as passwords or tokens, so take care when 
logging generated objects |
-| `wsdlextension` | WSDL extension utilities — supports additional WSDL 
processing during CXF code generation |
+| Module | Artifact | Description |
+|---|---|---|
+| `cxf-xjc-plugin` | `org.apache.cxf:cxf-xjc-plugin` | Maven plugin (goals 
`xsdtojava` and `xsdtojava-tests`) that runs XJC on standalone XML Schemas, 
optionally with the extensions below |
+| `dv` | `org.apache.cxf.xjcplugins:cxf-xjc-dv` | `-Xdv` — initializes fields 
mapped from elements with the schema default values |
+| `ts` | `org.apache.cxf.xjcplugins:cxf-xjc-ts` | `-Xts` — adds a `toString()` 
to generated classes that prints the value of every field (using 
`cxf-xjc-runtime` at runtime). This includes any sensitive data, such as 
passwords or tokens, so take care when logging generated objects |
+| `boolean` | `org.apache.cxf.xjcplugins:cxf-xjc-boolean` | `-Xbg` — generates 
`getXXX()` instead of `isXXX()` for `Boolean` properties; `-Xbgi` generates 
both |
+| `javadoc` | `org.apache.cxf.xjcplugins:cxf-xjc-javadoc` | `-Xjavadoc` — 
generates Javadoc from `xsd:documentation` |
+| `property-listener` | `org.apache.cxf.xjcplugins:cxf-xjc-pl` | 
`-Xproperty-listener` — adds a `PropertyChangeListener` to all set methods |
+| `wsdlextension` | `org.apache.cxf.xjcplugins:cxf-xjc-wsdlextension` | 
`-Xwsdlextension` — adds WSDL extension methods to generated root classes |
+| `bug671` | `org.apache.cxf.xjcplugins:cxf-xjc-bug671` | `-Xbug671` — maps 
package names that contain Java keywords |
+| `bug986` | `org.apache.cxf.xjcplugins:cxf-xjc-bug986` | `-Xbug986` — removes 
`@XmlSchemaType(anySimpleType)` from fields that should not have it |
+| `runtime` | `org.apache.cxf.xjc-utils:cxf-xjc-runtime` | Runtime support 
classes used by code generated with some of the plugins (e.g. `-Xts`) |
+
+Note that the artifacts use different groupIds: the Maven plugin is 
`org.apache.cxf:cxf-xjc-plugin`, while the XJC extensions are under 
`org.apache.cxf.xjcplugins`. When searching Maven Central, search by artifactId 
(e.g. `cxf-xjc-plugin`, `cxf-xjc-dv`) rather than by a single groupId.
+
+## Versioning
+
+CXF XJC Utils is released independently of Apache CXF, and its version numbers 
do **not** track CXF releases. For example, there is no XJC Utils release for 
every CXF patch release. Use the latest XJC Utils release from the same major 
line as your CXF version (4.x for CXF 4.x, which uses Jakarta XML Binding; 3.x 
for CXF 3.x, which uses `javax.xml.bind`). The available versions are listed on 
[Maven 
Central](https://central.sonatype.com/artifact/org.apache.cxf/cxf-xjc-plugin/versions).
 
 ## Usage
 
-The plugins are applied via the `cxf-codegen-plugin` Maven plugin. Add the 
desired artifact as a plugin dependency:
+### With `cxf-codegen-plugin` (WSDL to Java)
+
+Add the desired extension as a dependency of the `cxf-codegen-plugin` Maven 
plugin:
 
 ```xml
 <plugin>
@@ -42,11 +55,43 @@ Then activate the plugin in your `wsdl2java` configuration:
 </configuration>
 ```
 
+### With `cxf-xjc-plugin` (XML Schema to Java)
+
+```xml
+<plugin>
+  <groupId>org.apache.cxf</groupId>
+  <artifactId>cxf-xjc-plugin</artifactId>
+  <version>${cxf-xjc-utils.version}</version>
+  <executions>
+    <execution>
+      <id>xsdtojava</id>
+      <goals>
+        <goal>xsdtojava</goal>
+      </goals>
+      <configuration>
+        <xsdOptions>
+          <xsdOption>
+            <extension>true</extension>
+            <xsd>${basedir}/src/main/resources/schemas/foo.xsd</xsd>
+            <extensionArgs>
+              <arg>-Xdv</arg>
+            </extensionArgs>
+          </xsdOption>
+        </xsdOptions>
+        <extensions>
+          
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf-xjc-utils.version}</extension>
+        </extensions>
+      </configuration>
+    </execution>
+  </executions>
+</plugin>
+```
+
 ## Requirements
 
 - Java 11+
 - Maven 3.x
-- Apache CXF 4.x (for the matching release line)
+- Apache CXF 4.x (see [Versioning](#versioning))
 
 ## Building from Source
 

Reply via email to