11

Hibernate 5 and above supports Java8 DateTime Api through jar "hibernate-java8".
But the MavenRepository shows a message Deprecated - use hibernate-core instead) alongside the title of the hibernate-java8 jar.

Why is the hibernate-java8 jar called deprecated even though it is required to gain the hibernate support for java8?

maven repository hibernate-java8

boraseoksoon
  • 2,164
  • 1
  • 20
  • 25
Akash Raveendran
  • 559
  • 1
  • 9
  • 22

1 Answers1

17

You can see the Migration Guide for Hibernate. It specifies that

Hibernate 5.2 is built using Java 8 JDK and will require Java 8 JRE at runtime (we are investigating whether Java 9 will also work). This has a number of implications:

The hibernate-java8 module has been merged into hibernate-core and the Java 8 date/time types are now natively supported.

(todo) support for Java 8 Optional

(todo) support for other Java 8 features?

The hibernate-java8 module has been removed; that functionality has been consolidated into hibernate-core.

For hibernate-java8 see this ticket for explanation,

As this relies on Java 8 and Hibernate still maintains compatibility back to Java 6, a new module hibernate-java8 was added to isolate the Java 8 compatibility to just these classes. We will fold the classes from this module into hibernate-core once we baseline one Java 8.

Since hibernate no longer maintains the hibernate-java8 and you can see that hibernate-java8 is nothing more than an empty placeholder. Github & JIRA Detail.

So, As the functionality has been merged into hibernate-core; hibernate-java8 now is depreciated.

I hope this answer your queries.

Runcorn
  • 5,144
  • 5
  • 34
  • 52