[
https://issues.apache.org/jira/browse/CXFXJC-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colm O hEigeartaigh updated CXFXJC-51:
--------------------------------------
Description:
The {{cxf-xjc-bug671}} plugin ({{{}-Xbug671{}}}) works around JAXB issue 671
([javaee/jaxb-v2#671|https://github.com/javaee/jaxb-v2/issues/671]).
{{NameConverter.Standard.toPackageName()}} checked for reserved words before
lowercasing each package segment. A namespace containing a keyword in mixed
case, such as {{{}http://dankulp.com/Public/api{}}}, therefore produced an
invalid package name ({{{}com.dankulp.public.api{}}}).
The fix shipped in JAXB RI 2.1.13, released in 2010. With 2.1.13 and later,
including the jaxb-xjc 4.0.x used by this project, the namespace maps to
{{com.dankulp._public.api}} without the plugin. Generated output is the same
with and without {{{}-Xbug671{}}}. Apache CXF doesn’t use the plugin.
Proposed change:
* Remove the {{bug671}} module from the build and from the README.
* Note the removal in the release notes. Users can drop {{-Xbug671}} and the
{{cxf-xjc-bug671}} dependency, and the generated code stays the same.
Sources:
* [javaee/jaxb-v2 issue 671|https://github.com/javaee/jaxb-v2/issues/671]
* [JBWS-3068 (JAXB RI 2.1.13 release
date)|https://issues.redhat.com/browse/JBWS-3068]
was:
The {{cxf-xjc-bug671}} plugin ({{{}-Xbug671{}}}) worked around JAXB issue 671.
When a namespace URI contained a Java keyword ({{{}int{}}}, {{{}class{}}},
{{{}new{}}}, ...), XJC generated invalid package names. The plugin fixed this
with a custom {{NameConverter}} that puts {{_}} in front of any package segment
that isn’t a valid Java identifier.
Current XJC fixes this without the plugin. With jaxb-xjc 4.0.9, the namespace
{{http://www.example.com/int/class/new/2.0}} maps to the package
{{com.example._int._class._new._2}} without {{{}-Xbug671{}}}. The plugin no
longer changes anything, and Apache CXF itself doesn’t use it.
Proposed change:
* Remove the {{bug671}} module from the build and from the README.
* Note the removal in the release notes. Users can drop {{-Xbug671}} and the
{{cxf-xjc-bug671}} dependency, and the generated code stays the same.
> Remove the cxf-xjc-bug671 plugin
> --------------------------------
>
> Key: CXFXJC-51
> URL: https://issues.apache.org/jira/browse/CXFXJC-51
> Project: CXF XJC Utils
> Issue Type: Improvement
> Reporter: Colm O hEigeartaigh
> Priority: Major
> Fix For: 4.3.0
>
>
> The {{cxf-xjc-bug671}} plugin ({{{}-Xbug671{}}}) works around JAXB issue 671
> ([javaee/jaxb-v2#671|https://github.com/javaee/jaxb-v2/issues/671]).
> {{NameConverter.Standard.toPackageName()}} checked for reserved words before
> lowercasing each package segment. A namespace containing a keyword in mixed
> case, such as {{{}http://dankulp.com/Public/api{}}}, therefore produced an
> invalid package name ({{{}com.dankulp.public.api{}}}).
> The fix shipped in JAXB RI 2.1.13, released in 2010. With 2.1.13 and later,
> including the jaxb-xjc 4.0.x used by this project, the namespace maps to
> {{com.dankulp._public.api}} without the plugin. Generated output is the same
> with and without {{{}-Xbug671{}}}. Apache CXF doesn’t use the plugin.
> Proposed change:
> * Remove the {{bug671}} module from the build and from the README.
> * Note the removal in the release notes. Users can drop {{-Xbug671}} and the
> {{cxf-xjc-bug671}} dependency, and the generated code stays the same.
> Sources:
> * [javaee/jaxb-v2 issue 671|https://github.com/javaee/jaxb-v2/issues/671]
> * [JBWS-3068 (JAXB RI 2.1.13 release
> date)|https://issues.redhat.com/browse/JBWS-3068]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)