Java Modules automatic modules with same package

Viewed 158

I develop JavaFX app with Hibernate for database access, and was faced with a problem: I have in my module-info.java, automatic module from:

requires org.hibernate.orm.core; ( org.hibernate:hibernate-core:5.4.12.Final)
requires sqlite.dialect; (com.zsoltfabok:sqlite-dialect:1.0)

They both have the same package "org.hibernate.dialect", since it is prohibited, what I can do to resolve this issue? I certainly could change the project to not use modules, and package it with jpackage as regular fat jar. But I would like to proceed with modularized one. Thanks.

1 Answers

sqlite-dialect uses the same package as hibernate-core which is either a dirty (my opinion) workaround for accessing foreign package private members or completely unnecessary if no package private members are accessed (I haven't checked it). You could make a fork of sql-dialect an change the package name (e.g., com.zsoltfabok.hibernate.dialect.sqllite), try if it works and in case it does use the fork instead (and create a pull request to the original repository).

Related