[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jaxb-impl-dev] Rename packages in jaxb-impl and split the main implementation jar
|
On 4/19/20 3:05 AM, Bill Shannon wrote:
I'm not sure what would be in each piece after the split but ideally
there would be a single jar file corresponding to all the required
components of the spec, with possibly some other jar file containing
optional features of the spec.
currently, there are 3 main files from com.sun.xml.bind group Id
(smaller components are under org.glassfish.jaxb gId):
jaxb-impl <- jaxb-xjc <- jaxb-jxc
where jaxb-impl contains the runtime, basically that is the "single jar
file corresponding to all the required components of the spec" now
which is fine. The problem, as described below, is the fact that xjc
tool has strong dependency on the existing runtime.
Now, let's take a look at MOXy, a possible alternative implementation of
the xml binding spec (it used to be certified implementation of JSR-222):
jaxb-impl <- jaxb-xjc <- org.eclipse.persistence.moxy
while org.eclipse.persistence.moxy satisfies the "single jar file
corresponding to all the required components of the spec", it has direct
dependency on xjc and thus also on jaxb-impl and in the end, it contains
2 different runtimes of the spec just because it needs the deliver some
tooling to its customers and does not want to reimplement it. After all
the tooling was part of Java SE till 8 (or 10 should we care about
unsupported versions). This does not look correct to me and this is what
this split/renaming is trying to allow resolving.
You don't want a customer to have to
assemble their own compatible implementation by choosing the right
collection of jar files. At the very least there needs to be hard
dependencies between the required implementation jar files.
As long as alternative implementation does not need/want the tooling,
nothing changes. Should it want the tooling, it should be allowed to
plug between new jaxb-core and jaxb-xjc to replace the runtime used by
tooling, so we get sth like:
jaxb-core (new) <- jaxb-impl (smaller) <- jaxb-xjc
and
jaxb-core <- org.eclipse.persistence.moxy <- jaxb-xjc
It is clear that impls will have strong dependency on the new jaxb-core,
exact distribution packaging on the final compatible implementation side
is still TBD. Note that it is not a goal to solve the same issue for JXC
tool right now, that would require more time than we currently have.
thanks,
--lukas
Lukas Jungmann wrote on 4/15/20 4:28 PM:
Hi,
with upcoming major version change, I believe it is the right time to split
the main jaxb-impl.jar back into smaller parts which used to be there in older
versions of jaxb-impl, last was 2.2.11 (I believe). The work which has been done
was "reverted" and both separated components merged back into one jar in 2.3.x
in order to solve the "split packages" problem on JPMS/JDK 9+ as at the time,
changing the package name has not been allowed.
Since the major version number has been already increased, version 3.0.0-M1
which adopted jakarta.xml.bind packages is already available and corresponding
TCKs seems to be updated and working, it is time for the next steps - doing the
actual split of existing jaxb-impl.jar into smaller parts. To make adoption of
this change easier, the plan is to spread the change through multiple M builds.
I'm open for suggestions wrt new package names, I've chosen
"org.glassfish.jaxb" prefix for now as it matches current maven group id, just
keep in mind that there already exists "org.eclipse.persistence.jaxb" (used by
MOXy) - using "org.eclipse.jaxb" could probably easily lead to confusion as in
the past with "com.sun.xml.bind" vs. "com.sun.xml.internal.bind", so I prefer
something with different prefix than "org.eclipse".
As for motivation for this change - allow sharing code between multiple
implementations of Jakarta XML Binding, mainly between jaxb-ri and moxy right now.
Since this change as such is intrusive, possibly controversial and affects a
lot of projects, it would be good to know how others feel about this. Feel free
to reply here or provide comments in the PR with this change:
https://github.com/eclipse-ee4j/jaxb-ri/pull/1428
Expected adoption path, ie for GlassFish but applicable for other projects as
well, would be:
-take 3.0.0-M1 and adopt "javax.xml.bind" to "jakarta.xml.bind" change
-take 3.0.0-M2 and adopt "com.sun.xml.bind.*" to "org.glassfish.jaxb.runtime"
(or whatever else is chosen) change
-take 3.0.0-M3 and adopt remaining "com.sun.xml.bind.*" to
"org.glassfish.jaxb.core" (or whatever else is chosen) change
Should there be no feedback or no strong no from anyone, I'll proceed with
the change on Tue April 21 at the latest.
thanks,
--lukas
_______________________________________________
jaxb-impl-dev mailing list
jaxb-impl-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jaxb-impl-dev