jaxb-facets icon indicating copy to clipboard operation
jaxb-facets copied to clipboard

Any plans into getting facets into JDK's JAXB?

Open schrepfler opened this issue 9 years ago • 5 comments

It seems no-one loves XML anymore. Is there any hope this will land in JAXB someday?

schrepfler avatar May 08 '16 20:05 schrepfler

@schrepfler , we've been trying hard to push this into JDK's JAXB as you remember from this conversation: https://java.net/jira/browse/JAXB-917 Unfortunately the response so far has been that jaxb-facets will not be added to JAXB RI "in some visible time". If you would be willing to take the lead in another attempt to push this through, I'd be more than happy to support you! Many thanks

whummer avatar May 08 '16 23:05 whummer

I've left them (Oracle) another comment on JAXB-917 in hope they'll reconsider adding it to their release train. Pretty shameful not only because this adds facets but Documentation and Annotations to the metamodel. For example, Jersey REST services would get documentation for free in their generated xsd schemas.

schrepfler avatar May 08 '16 23:05 schrepfler

I totally agree with you. Thanks!

whummer avatar May 09 '16 02:05 whummer

This is a very cool project.

I wonder, does it need to be added to the core JDK? It seems like Oracle is moving in the opposite direction where things are being taken out of the JDK. I believe this applies to JAXB too.

Some possibilities:

  1. Merge this into the jaxb-ri (https://github.com/javaee/jaxb-v2).
  2. Merge this into EclipseLink (http://www.eclipse.org/eclipselink/)
  3. Treat this project as a separate project that can work with any JAXB implementation. This would mean moving the annotations out of the javax.xml namespace. It would also mean providing a separate schemagen application/Maven plugin that is aware of these annotations.

I'm actually thinking #3 is the way to go. Merging this into JAXB will be a big pain and take a long time because it involves making a change to the core spec. As a separate project -- a jaxb plugin -- this could be immediately useful to several projects, some of which are using jaxb-ri and some of which are using EclipseLink.

A way forwards might be:

  1. Move all the annotations out of javax.xml into org.w3c.xsd.bind.
  2. Make the schemagen available as an independent application and maven plugin.

What do others think?

buko avatar Jun 09 '18 09:06 buko

There's already a ticket on jaxb-ri https://github.com/javaee/jaxb-v2/issues/917 as it was I think previously submitted upstream and IIRC @whummer also signed the contributor agreement, I don't see too much activity on the repo a part from @Tomas-Kraus

schrepfler avatar Jun 09 '18 11:06 schrepfler