Hi Lennart,

I think that we should go with the jaxb (and jaxws as well) libraries and
tools that were broken out ot JDK.[1] and is now developed at Eclipse. I
started to look at this last week and was suprised about the current state
of them though. Not much developed it seems even though there are  lots of
filed issues. But I just loked briefly.
I did see that you already filed a ticket there for the schemagen issue you
talked about - good!

Wrt the mojo plugin I'd say that we foxuc on jdk 11 from now on. Bump minor
for this and leave the current minor release for JDK 8. JDK 9 and 10 is no
point in supporting as the yare EOL already. In theory we could backport
fixed for the JDK 8 version trail, but that won't happen I think. But if
someone really wants it and steps up it could happen.

So, basically your option 1 but focus on JDK 11 support but use the jaxb-ri
library that is now with Eclipse. So any bugs shouldn't be filed againt any
JDK but that library.

[1] https://github.com/eclipse-ee4j/jaxb-ri

/Anders

On Mon, Oct 8, 2018 at 6:13 PM Lennart Jörelid <lennart.jore...@gmail.com>
wrote:

> Hello all,
>
> I am pondering the future of the JAXB2 Maven plugin, following three
> rather problematic properties:
>
>
>    - The JAXB2-Maven-Plugin was implemented to delegate Java compilation
>    and XML or Schema compilation to the tools within the JDK.
>    - The JAXB support including tooling is removed from JDK 11 and
>    onwards.
>    - The tooling contains subtle but rather serious bugs which has
>    created a decently complex mess of workarounds within the plugin. For
>    example - the XML schema created from one of the integration tests within
>    the plugin generates incorrect results in JDK9+, as shown in the snippet
>    below. The JDK8 *schemagen* tool generates a schema element [including
>    child elements] with correct namespace prefix, implying that the schema
>    element correctly resides within the XMLSchema namespace. The JDK9 and
>    JDK10 *schemagen* tools incorrectly generates a schema element *without
>    a namespace prefix*, implying that the schema element is placed within
>    the targetNamespace, which is normally the target of each schemagen
>    compilation for each unique XML namespace within the compilation unit.
>
> *Snippets:*
>
> JDK 1.8 execution:
> ==================
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <*xs:schema* version="1.0" targetNamespace="http://acme.com/customer-api";
> xmlns:tns="http://acme.com/customer-api"; 
> *xmlns:xs="http://www.w3.org/2001/XMLSchema
> <http://www.w3.org/2001/XMLSchema>"*>
>
> JDK 9,10 execution:
> ================
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <*schema* version="1.0" *targetNamespace="http://acme.com/customer-api
> <http://acme.com/customer-api>"* xmlns:tns="http://acme.com/customer-api";
> xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>
> So ... We have at least 3 options here:
>
>
>    1. File a bug report against the development of JDK 9 and 10 (but if I
>    understand correctly, there is no development going on within these JDK
>    releases), and hope that this bug gets fixed.
>    2. Find another tool to generate XML Schema from JAXB annotations.
>    This seems like a better way than the JDK tooling bug approach above,
>    although it requires a more-or-less complete rewrite of the plugin's
>    internals. Question: What polyglot Annotation processors or DSL generators
>    do you recommend?
>    3. Just freeze development of JMP at JDK 8; simply put the codebase
>    into sunset. This is doable, but not really desirable.
>
> What do you think? Which way should we take?
>
> --
> You received this message because you are subscribed to the Google Groups
> "mojohaus-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojohaus-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to mojohaus-dev@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojohaus-dev/3bd959d7-c9d7-4d9d-ae8a-5034e07c25a6%40googlegroups.com
> <https://groups.google.com/d/msgid/mojohaus-dev/3bd959d7-c9d7-4d9d-ae8a-5034e07c25a6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojohaus-dev+unsubscr...@googlegroups.com.
To post to this group, send email to mojohaus-dev@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojohaus-dev/CAKDUN1uwsv%3DX3TG5C%3DyFCPgmbLbth1xaUGZk6HicqQ35QRuXOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to