[hibernate-dev] Depending on JAXB / JDK11 compatibility
Christian Beikov
christian.beikov at gmail.com
Wed May 2 17:40:47 EDT 2018
You are right that people will have to add some other dependencies if
they want to use Hibernate on Java 9+, but IMO we should at least put
the dependencies into the pom.xml that we have a hard dependency on
which in this case is the jaxb-api or in module descriptor speak the
"java.xml.bind" module.
People will have to adapt to this and add their own JAXB implementation,
just like they now use Hibernate as JPA implementation.
Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*
Am 02.05.2018 um 23:24 schrieb Sanne Grinovero:
> On 2 May 2018 at 21:30, Christian Beikov <christian.beikov at gmail.com> wrote:
>> +1 for listing the API dependency "javax.xml.bind:jaxb-api". Not sure
>> about the implementation though, maybe we can use
>> "com.sun.xml.bind:jaxb-impl" as an optional dependency?
> Hi Christian,
>
> right that's what makes it confusing. We might want to list the
> jaxb-api explicitly but it's not enough to make it work: people will
> need to know to list several more dependencies.
>
> This is what I've been experimenting with in the Search testsuite
> (which uses Hibernate ORM):
>
> <!-- All replacements for JAXB -->
> <dependency>
> <groupId>javax.xml.bind</groupId>
> <artifactId>jaxb-api</artifactId>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-core</artifactId>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>javax.activation</groupId>
> <artifactId>javax.activation-api</artifactId>
> <scope>provided</scope>
> </dependency>
>
> I'm afraid that we might as well not list jaxb-api as users need to
> understand this all either way.
>
> Thanks,
> Sanne
>
>
>>
>> Mit freundlichen Grüßen,
>> ------------------------------------------------------------------------
>> *Christian Beikov*
>> Am 02.05.2018 um 20:38 schrieb Sanne Grinovero:
>>> With JAXB being part of the JDK in Java 8, Hibernate ORM doesn't list
>>> it as a runtime dependency.
>>>
>>> Java 9 users have been suggested to use the JVM option "--add-modules
>>> java.xml.bind" to avoid the JVM hiding the JAXB library from
>>> classpath.
>>>
>>> With Java 11 the java.xml.bind is no longer available; what should we
>>> suggest to users?
>>>
>>> Should we list it as an explicit dependency in the released pom files?
>>>
>>> Thanks,
>>> Sanne
>>> _______________________________________________
>>> hibernate-dev mailing list
>>> hibernate-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list