nitrite / nitrite-java

NoSQL embedded document store for Java
https://bit.ly/no2db
Apache License 2.0
841 stars 95 forks source link

"Split package" (JPMS) issue #1035

Closed alexei-osipov closed 2 months ago

alexei-osipov commented 2 months ago

Currently Nitrite is released as multiple JARs with different parts of functionality (that's good).

However these JARs have overlapping package names for some classes causing "split package" problem and triggering errors if Java Platform Module System (JPMS) is used in the app that depends on Nitrite main JAR and nitrite-jackson-mapper JAR.

For instance, there are classes for package org.dizitart.no2.common.mapper in both org.dizitart:nitrite and org.dizitart:nitrite-jackson-mapper JARs.

As result, when JPMS is enabled, app gets errors like this:

error: the unnamed module reads package org.dizitart.no2.common.mapper from both org.dizitart.no2.jackson and org.dizitart.no2

Possible solution: move classes of nitrite-jackson-mapper from package org.dizitart.no2.common.mapper to a dedicated non-overlapping package like org.dizitart.no2.common.mapper.jackson.

anidotnet commented 2 months ago

Thanks for reporting the issue. I need to take a look at this and push the fix in next release.