I have a Java 9 (or higher) project in which I want to include ORMLite with a H2 database. Therefore I need the two maven dependencies
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-core</artifactId>
<version>5.1</version>
</dependency>
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-jdbc</artifactId>
<version>5.1</version>
</dependency>
...
(+ the h2 dependency.)
Since I am using Java 9 I have to add them to my module-info.java:
module my.module {
exports my.package.to.export;
requires ormlite.core;
requires ormlite.jdbc;
...
But now I cannot compile the project anymore because both core and jdbc have the same package com.j256.ormlite.db.
[ERROR] module ormlite.core reads package com.j256.ormlite.db from both ormlite.core and ormlite.jdbc
I understand that this is as it should be, because split packages are not allowed. But how do I handle this, since this is not within my power? At least not in a clean way. I want to keep everything in maven and dont want to combine the packages as suggested in another post.
How can I solve this clean?
(I see that this is already an open issue in the orm-lite Github, but I do want to use it now)