Modularize the Jar
Hopefully self-explanatory.
May be it is easier to set the Automatic-Module-Name: <module name> in the manifest.mf first. This could be done with:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>dev.morphia</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
This would help a lot.
Not sure this addresses the issue I have: I have a small library with the data model which is shared between a server and Android application. For the Android application to work I just need the morphia annotations, but since they are built for JDK 11 this is no longer possible since Android only works with JDK8. Would it be possible to separate the annotations into a separate library with a lower JDK requirement? Shall I fill in a separate issue?
having a mix of the new driver code and the legacy code makes the module system sad. when I can remove the deprecations this should improve. bumping to 3.0.
@evanchooly Are there any updates on this you can share?
The goal is to have 3.0 modularized. Past efforts haven't gone well because some deps haven't been modularized yet but i'm going to push through and that resolved, hopefully, one way or the other by 3.0.
Thanks for the reply. I'm in the same boat with some work I'm doing, so I understand at least a little of the pain. Good luck with it all though. I'll be keping an eye out for 3.0.